Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
PHP Databases Programming Ruby

Ask Slashdot: Which Web Platform Would You Use? 519

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?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Which Web Platform Would You Use?

Comments Filter:
  • ASP.NET and C# (Score:4, Informative)

    by SharkLaser ( 2495316 ) on Tuesday January 03, 2012 @10:53AM (#38571774) Journal
    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.

    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 .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.

    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.
  • PHP is great (Score:4, Informative)

    by InformativePost ( 2544774 ) on Tuesday January 03, 2012 @10:53AM (#38571780)
    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.
  • Django (Score:5, Informative)

    by troon ( 724114 ) on Tuesday January 03, 2012 @10:57AM (#38571814)
    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.
  • PHP & Python (Score:5, Informative)

    by truthsearch ( 249536 ) on Tuesday January 03, 2012 @10:59AM (#38571836) Homepage Journal

    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.

  • BASIC, of course! (Score:4, Informative)

    by tomknight ( 190939 ) on Tuesday January 03, 2012 @11:07AM (#38571916) Homepage Journal
    ... well, not really. But there is such a thing for the web: []
  • Re:Django (Score:4, Informative)

    by DarwinSurvivor ( 1752106 ) on Tuesday January 03, 2012 @11:10AM (#38571950)

    Whitespace is something the human eye is VERY good at seeing, a missing curly-brace on the other hand is NOT. Every language has it's pitfalls, but honestly, code indenting in python is usually not a problem after a couple weeks at the most.

    I personally use django for a number of my projects and my only problem with it is the templating language. It's fine for most stuff, but I'm going to look into more powerful templating languages for my next project (preferably something DOM-oriented).

  • Re:ASP.NET and C# (Score:4, Informative)

    by Anonymous Coward on Tuesday January 03, 2012 @11:11AM (#38571958)

    Heh. Great advertisement. :) sucks.
    Not everything that works on windows, works on linux - so it's "almost" platform independent the fact that MS does not develop mono guarantees that linux version will not support the latest stuff. Only recently has Microsoft developed semi serious ORM and it still has bugs.
    Windows hosting is much more expensive than linux hosting.

    PHP with one of the popular frameworks, and bytecode interpreter (like facebook's hiphop vm) can match the speed of C#, and language is not always the bottleneck. SOmetimes the architecture of the software is the problem.

    As a person who develops in both (Webforms and MVC) and PHP (with various frameworks) i would recommend anything BUT ASP.NET. Ruby on Rails is great. Pythong has some great frameworks too ... ASP.NET is the worst choice OP could make.

  • by Sneeka2 ( 782894 ) on Tuesday January 03, 2012 @11:23AM (#38572142)

    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.

  • Re:ASP.NET and C# (Score:5, Informative)

    by Canazza ( 1428553 ) on Tuesday January 03, 2012 @11:23AM (#38572158)

    Frankly the submitter should be likewise ridiculed. If he's heard disdain for a language with no qualifiers or reasons, they should know it's likely the same kind of person as the GPP.

    PHP is a fine language, with the right framework. Although most people think "PHP" and "Zend Framework" are synonymous, and don't know there are others (like Yii or Cake).

    A quick google brought up this wikipedia page: Comparison of Web Application Frameworks []

    In the case of Zend, it has tended towards bloat for the sake of backwards compatibility (atleast the last time I went back to use it after a few years hiatus I found half of the functions I normally used flagged as depricated, yet not removed) and I think that's where alot of the ire is raised.

    If the submitter does decide to dump PHP, then Python has a fast growing userbase, and the Parent post mentioned Ruby. I can't really comment on either since I've only brushed over Python and never touched Ruby.

  • Re:ASP.NET and C# (Score:4, Informative)

    by ByOhTek ( 1181381 ) on Tuesday January 03, 2012 @11:27AM (#38572200) Journal

    I should add - PHP is *NOT* a bad solution, depending on what you are doing, the very large library of available functionality built into it, is EXTREMELY nice. It simply is not my first choice, as much of that functionality can be obtained from Python or C# with only a little more effort (finding the correct library to download), and it is easier to call C libraries from Python or C#.

  • Re:Catalyst? (Score:4, Informative)

    by oneandoneis2 ( 777721 ) on Tuesday January 03, 2012 @11:35AM (#38572352) Homepage

    Yes, it's still very actively developed. Especially if you throw in Moose and Plack.

  • Re:ASP.NET and C# (Score:5, Informative)

    by jez9999 ( 618189 ) on Tuesday January 03, 2012 @11:41AM (#38572446) Homepage Journal

    OK; because for some strange reason nobody has raised this criticism, I will:

    Going down the Microsoft ( Studio/SQL Server/etc.) route is EXPENSIVE. You will have to pay ongoing licensing fees for EVERYTHING. It simply isn't an option for a small-time developer without much cash; you need to be a small-to-medium sized business at least, I'd say.

    That's a significant consideration, and is the primary reason I tend to avoid it for my personal projects.

  • Re:ASP.NET and C# (Score:5, Informative)

    by AJH16 ( 940784 ) <aj@gc[ ] ['caf' in gap]> on Tuesday January 03, 2012 @11:47AM (#38572540) Homepage

    To throw my personal thoughts in to the fray. It really depends on what you are trying to do. For slimmed down front end, I prefer PHP. If you came from a PHP background, I would expect ASP.Net's UI to be infuriating to get used to. (I also come from a very strong PHP background and the shift to ASP.NET webforms for a project at work has been a major headache.) That said, ASP.Net MVC functions much more in the PHP style that you are used to. Overall though, unless you need to have the same front end and back end, I would recommend working the front end in whatever you are the most comfortable with. If that is PHP, I don't see any reason it should cause you trouble.

    As for the backend, it could be done in PHP and I've done back ends in PHP before, but you will need to either use a third party framework or write a lot from the ground up. My preference has been to build from the ground up, but I've also typically worked on very specialized solutions. This is where ASP.Net really shines though. In terms of data handling and providing web services to back your site. C# and .Net offer a lot of very powerful tools and nice enterprise compatibility. The debugging tools are also excellent. If you are using MSSQL to back the project, then it is almost a no brainer, but my understanding is that MySQL and Postgres support isn't bad either. ASP will also let you easily switch the type of web service you are using by simply swapping out the interface or in some cases, simply updating a config file.

    If it is just your personal site though, then again, PHP will probably serve you just fine, particularly if your hosting provider doesn't support ASP.Net.

  • by bongey ( 974911 ) on Tuesday January 03, 2012 @12:39PM (#38573160)

    "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" []

    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 If you are writing a realtime stock trading application , then use C/C++ would be warranted.

    Avoid motherfucking frameworks

    See [] "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.

  • Re:PHP is great (Score:5, Informative)

    by DdJ ( 10790 ) on Tuesday January 03, 2012 @12:54PM (#38573372) Homepage Journal

    Most hate towards PHP comes from elitist snobs who don't know how to use the language.

    Maybe. But not all of it.

    I have been using PHP, for both business and personal stuff, since it was called "PHP/FI" ("personal home page / forms interface"). My old startup company would never have been successful without stuff we did in PHP. I've written and contributed C-based PHP extension code which was distributed with the core for years (until the underlying libraries fell so far out of use that there was no point including it anymore).

    I still use PHP sometimes. But I prefer not to use it for important stuff that needs to stick around for a long time if it has any complexity.

    Here's why: in my own personal experience (YMMV, of course), PHP has not been terrific about separating security fixes and bug fixes from feature evolution. It was far too easy to write code that would break with a version upgrade (eg. because an API or behavior changed), and to be forced into that version upgrade because security hole fixes were only available for the newest versions.

    It's certainly the case that if you were very careful, you could avoid the problems. But, you had to be careful, and I saw a lot of novice programmers who weren't. (Our startup company provided PHP APIs for our product -- as well as Perl, Python, Java, and even TCL, this being the mid-to-late 1990s -- so I got to interact with a lot of novice PHP programmers.)

    It's also certainly the case that for home/hobbyist use, you can mitigate some of the trouble by getting your PHP as part of a Debian distribution instead of getting it directly from upstream sources. The Debian folks are kinda insane about backporting security fixes to regarded-as-obsolete versions of software, and I love 'em for it. This is what I do on my household servers. (Yes, I still run my servers myself, not via a hosting provider -- have since about 1988, when they were Sun and VAX systems instead of the Linux I use today.)

    It's certainly possible that PHP has gotten significantly better about this than it used to be. I haven't had reason to go check.

    But anyhow, that's where my own ... hatred is too strong a word, let's say maybe "concern"? ... for PHP came from.

  • Re:ASP.NET and C# (Score:4, Informative)

    by bjourne ( 1034822 ) on Tuesday January 03, 2012 @01:47PM (#38574134) Homepage Journal

    This is mostly correct. The ORM:s developed by MS are mostly crap. First there is the Entity Framework which is a bloated overcomplicated steaming pile. Then there is Linq2sql which actually is a passable ORM - to bad they deprecated it in favor of the EF! With MS, there is just as much api churn as with the most extreme free software projects and you get none of the benefits the latter has, such as ability to see the source and hack it yourself in case the provider discontinues it. But is (mostly) not tightly integrated with any persistance provider, so you can swap it out for NHibernate which is exactly like Hibernate, except for .net. You just lose some databinding controls such as LinqDataSource and Visual Studio support.

  • Re:J2EE (Score:4, Informative)

    by Slashdot Parent ( 995749 ) on Tuesday January 03, 2012 @02:03PM (#38574352)

    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.

Any sufficiently advanced technology is indistinguishable from a rigged demo.