News for hackers. Stuff that matters.
Re:I Like PHP by acabal on Wednesday August 10, 2011 @02:43PM (#2869605)
I like PHP because it's got a C-like syntax, which is a personal preference of mine. I also like it because it exposes the nuts-and-bolts of web development without any fuss, unlike, say, ASP.NET (though last I touched that was 3 years ago so doubtless things have changed since), and that it has a basic templating system built in, and that it's easy to install and deploy to.

It definitely is deeply flawed for many reasons, which is why I'm still looking for my "white unicorn" language: one with a C-like syntax, no fancy templating or ORM magic (just let me print() html), foss, easy to deploy, and with an established community and searchable "recipes" online.

Lots of languages fit some of those criteria, but I haven't found one that fits them all.

Re:I Like PHP by jrockway on Wednesday August 10, 2011 @06:05PM (#2870420)
Uh, Perl?

I wouldn't write this kind of Perl, but Perl is not going to get in your way. "use CGI; print html(body(p("OH HAI")))".

When you realize that this sucks and you can't maintain it, you'll be able to gradually improve your code. First, you can run your CGI from Plack instead of Apache. Then, you can start using features from a Plack-based framework, like URL mapping. Next, you can move your "print this HTML" into template classes. Then, you can convert these to using TT (or similar), and your app code won't notice. You can start writing unit tests. You can gradually migrate your raw DBI calls to DBIx::Class by using $schema->dbh_do.

You won't have to do it all at once and you won't have to break any code when you do. Perl will grow as you do. Or, you can stick to CGI forever. It doesn't care :)

It's a great language for starting small and building up "complexity" as you learn more about programming.

Re:I Like PHP by ZeSmith on Wednesday August 10, 2011 @02:54PM (#2869654)
For ASP.NET, indeed, WebForms can be a bit violent since it's essentially an abstraction that tries, with mixed sucess, to make you forget you're writing for the Web.

ASP.NET MVC, which came out 2 years ago, is much closer to RoR and other similar frameworks, and is a better abstraction in my opinion.

Re:I Like PHP by MatthewPhillips on Wednesday August 10, 2011 @03:49PM (#2869877)
I don't think Microsoft is even still developing WebForms (last release is April 2010). Too many aspx sites are written in the old version of WebForms which turned the html output into a horrible and ugly mess. MVC3 is pretty much just as good as RoR or any other mvc framework about outputting clean html.