Why PHP?

Ultimately the code structure etc comes down to the person writing the code. I’ve seen some crappy code written in Java as well, its not Java or PHP or any other language’s fault.

I’ll second that and just throw out the following tidbit to symbolize it isn’t the language, it is the developer, as the last project I’ve been working on over the past 18 months had what was called a “StringCalculator”. Yes, it does exactly what it sounds: Given “1 + 1” as a string it would return 2. Don’t ask me why on earth anyone would do that in a language that already supports mathematical operations. Needless to say, it was the very first thing I ripped out.

rofl, been a while since I last saw/heard about idiotic code that made me laugh instead of infuriate me! :smiley:

First off, thank you everyone for your replies. Sorry for my late response, I was having trouble with the forum for a little while there…seems to be ok now.

Anyway…

It should be noted that .NET is indeed free. When you have been using the Microsoft stack for a long time, pretty much everything from Microsoft ends up being “free” in one way or another, or extremely cheap. I think I have access to everything from Microsoft except their top-end editions of Visual Studio Ultimate and the related tools, however I don’t need advanced integrated UML modeling or anything like that for what I do.

I am curious about the notion that “PHP can be hosted on LAMP, which is free.” I understand that the LAMP stack uses free technology…however…unless you have your own fixed IP and are running your own servers, you still have to pay for actual LAMP stack hosting, correct? I mean, there aren’t free high bandwidth offerings on the LAMP stack, are there? It used to be that hosting on Linux was cheaper than hosting on Windows, however with services like WinHost, where a 50Gb transfer/mo is only $4.11, and 200Gb transfer/mo is only $9.97…it seems that advantage has disappeared. If there is literally free, high bandwidth LAMP stack hosting, then that would be intriguing… On the other hand, if LAMP hosting is still just “cheap”, I wouldn’t call that an advantage these days.

Anyway, in addition to these reasons:

I also have the advantage of ASP.NET MVC 4, which has the (absolutely WONDERFUL!) Razor view engine, as well as the Web API framework. When it comes to developing web sites and apis, I’ve rarely seen such well thought out frameworks that make rapid, clean, stable code development so easy. I pretty much live and die by MVC, the separation of concerns there is critical to maintainability in my opinion. Does PHP have anything similar? When I see PHP code, it usually reminds me of old ASP (classic!) code. Monolithic, interleaved code + view, which doesn’t gain the benefit of the nice separation of concerns that a proper MVC framework offers. Given that PHP has been around about as long as ASP Classic (~1995), I figure there must be some decent MVC or maybe MVP (not quite as good) frameworks for it. I guess I don’t think I could consider PHP without the MVC option…so if I had to ask for any single framework, MVC would be it! :stuck_out_tongue:

I could probably live with a JavaScript alternative if PHP does not have anything resembling MVC…there are some pretty good template rendering engines for JS now, including JQuote2, Bliss (Razor-like JS view engine, very nice), and a few others. Sometimes, however, the ability to process on the server, cache at the server, offers capabilities you just don’t have on the client.

Anyway,