Ask Slashdot: Which Web Platform Would You Use?
New submitter datavirtue writes "I'm about to embark on developing active content (database driven, and web services) for the first time for my website and I have grown to love PHP. Knowing that there are other web development platforms available, and noticing some disdain for PHP in some circles, I'm curious to know which platforms slashdotters prefer along with the reasons why. Before I get started into heavy development I would like to get some opinions and more facts. Why shouldn't I use PHP?"
PHP is fine, but if you want to learn about a better, enterprise-ready languages I would suggest using ASP.NET. It integrates perfectly with .NET apps and libraries and comes with a comprehensive library (as it uses .NET). The great thing about ASP.NET is that you can use C# to develop for it. ASP.NET also comes with various functions to make state management easier - an important feature that is completely missing in other languages. It also has built-in cache management.
.NET. This means you can use VB.NET, C#, J#, Delphi.NET etc. And because you compile the code to bytecode, it runs significantly faster. On top of that Visual Studio is a great free (and commercial) development environment.
ASP.NET originally lacked templating engine, but Microsoft introduced it in 2.0 version. You can have master templates that have placeholders for the dynamic content, as well as all the HTML and JavaScript that is shared between all pages.
It is basically more than your off-the-shelf PHP/Python/Ruby. ASP.NET provides much larger library to use, has templating engine, error handling, controls and events (and hence is more familiar to Windows developers), caching, object-oriented design and session control which can even be saved in SQL Server. It's not just a language, it's the complete package.
One of the great things about ASP.NET is also that you can use your favorite language to develop for it, as long as it supports
Oh, and if you want to run ASP.NET under Linux servers, it's easy too. Apache has mod_mono module or you can use it via FastCGI.
Most hate towards PHP comes from elitist snobs who don't know how to use the language. PHP is perfectly fine language to use, and it is extremely powerful and flexible. If you are going to develop for web, I suggest using some framework, as it makes the process much more straightforward, faster and better. I personally use CodeIgniter, which is fast and has a good library of helpers and other essential framework stuff. CakePHP is often suggested for persons new to frameworks, but I would stay away from it. It's slower and it's more pain in the ass to learn.
There's also other good things about PHP. First of all, it works with practically every web host out there, and doesn't require you to play around with it to get it work. It has an extremely comprehensive library, amazing documentation and almost all API's have client libraries for it, if they just have some. PHP, being the #1 platform on the web, gives you that advantage.
I've been using Django for a while now on my web app, having moved away from home-brewed PHP. Very easy to use, and encourages well-written and elegant code.
Ydco co
I use PHP for 90% of my work because it's the right tool for the job. We can also bring other developers up to speed on our own framework and projects pretty fast.
There are times when Python is a better fit. The fact that it remains running across page loads can be very handy (as opposed to every request to PHP being completely distinct, which has its own advantages). A continuously running app is often better for backend processing, especially when interacting with third party systems.
Developers: We can use your help.
... well, not really. But there is such a thing for the web: http://www.runbasic.com/
Oh arse
There's almost nothing that php does better than other modern scripting languages.
Very true; but it's ubiquitous, very easy to get into and has great documentation. Choose your evil.
Bitten Apples are still better than dirty Windows...
Yes, it's still very actively developed. Especially if you throw in Moose and Plack.
So.. it has come to this
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" http://en.wikipedia.org/wiki/Donald_Knuth
So please cut the oh write everything in C/C++ crap, I write in all the languages you mention but there is no reason to write something in language when it isn't needed. If you are writing a web site PHP is just fine(see the big website called www.facebook.com). If you are writing a realtime stock trading application , then use C/C++ would be warranted.
Avoid motherfucking frameworks
See http://badprogrammer.infogami.com/ "3. Deficient research skills / Chronically poor knowledge of the platform's features."
Don't know if you meant "web frameworks" , but writing everything from scratch is just crazy.
We're going to have to agree to disagree on this one, then. I completely agree with all of your points on Java and J2EE being a great platform and community, and I share your concerns about Oracle. But think about the sheer quantity of learning you're asking this PHP guy to bite off, recognizing that his project is probably, at most, something he could hack together in about 20 hours, tops, if he used PHP.
If you look closely, I think you'll see that you're making my point for me. You say that an inexperienced developer could mess things up quite righteously using JSF/Hibernate, and I agree with you. But then you suggest that he use JSP/JDBC? And this is an improvement over Pear/PHP, how? I vomited enough vomit over JSP/JDBC code between 1999-2001 to know that JSP/JDBC is not the correct solution to any problem. In order for the OP to be effective in any Java-based web framework (J2EE, Spring, whateverYourFavoriteMightBeThisWeek), he's in for hundreds of hours of work, assuming he doesn't first give up in frustration.
After considering the matter, I'd advise OP to do his web app in one of the many PHP MVC frameworks. Cake or Symfony would be great choices. That way, he can begin to educate himself on good web design principles using a language that he's already familiar with. Good design principles are always more important than choice of language, anyway.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock