Slashdot Mirror


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?"

94 of 519 comments (clear)

  1. ASP.NET and C# by SharkLaser · · Score: 4, Informative

    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.

    1. Re:ASP.NET and C# by Anonymous Coward · · Score: 5, Insightful

      Idiots like this guy here are exactly why there is so much hate for PHP. Here is a classic example of someone comparing PHP - a language - to a full blown web development framework. Ruby on Rails people do exactly the same.

      You can argue about the differences and benefits of ASP.NET vs RoR vs Zend Framework vs Yii vs [insert another web framework here] - but comparing a language to a framework is outright idiotic.

    2. Re:ASP.NET and C# by bhcompy · · Score: 2

      Depending on the enterprise, ASP and C# can definitely be useful. It really depends on the shop. One Fortune 500 I was with worked primarily with ASP, the current one I work with uses ASP, PHP, and Java equally. The small webdev houses I've been with have used ASP more than PHP(that Microsoft Certified Solutions Provider logo seems to impress the businesses you're making stuff for, I guess). Most of my friends that do solo freelance work do PHP.

    3. Re:ASP.NET and C# by Anonymous Coward · · Score: 4, Informative

      Heh. Great advertisement. :)
      Asp.net 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 Asp.net (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.

    4. Re:ASP.NET and C# by ByOhTek · · Score: 5, Insightful

      I... would not use ASP, I'd use PHP before ASP, and Python before that.

      One of the advantages of python, is that, with mod_wsgi, it's very fast.

      Actually, what I'm working on is, a mod_wsgi handler in apache, that sends the request to a back-end server, originally written in python, but now I'm switching to C# (still no ASP). Although there are ASP Modules for Apache/mono, I belive mod_wsgi has much more thorough testing, and will therefore be a better-cross-platform solution.

      In the end, answer these three questions:

      1) What platforms are you most comfortable with? Rank them.
      2) What platforms have the best modules/libraries for what you want to do? Rank them.
      3) What platforms have the best performance? Rank them.

      Now, given the rankings on 1-3, which platform is best for you? Nobody can answer this but you. Without knowing the details of what you want, we really can provide advice on #2 and #3.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    5. Re:ASP.NET and C# by Curunir_wolf · · Score: 5, Insightful

      Because people are looking for actual opinions from developers, not market-speak from commercial marketers. I mean, mod_mono?? Really???? LOL!

      --
      "Somebody has to do something. It's just incredibly pathetic it has to be us."
      --- Jerry Garcia
    6. Re:ASP.NET and C# by Anonymous Coward · · Score: 5, Interesting

      A while back now I had to do a project in ASP.Net, after being a long time PHP developer and I have to say I found it incredibly unpleasant. PHP's problem is that you have to write everything from scratch, however ASP provides you with a tonne of controls that allow you to get up and going really quickly. The problem though, is as soon as you try to do something a bit more complex with ASP.Net controls, it all falls in a heap.

      I remember having to print a list of products, and there would be sub headings mixed in amongst the rows to divide product families....

      Product Family 1
      Product 1 - $Price
      Product 2 - $Price
      Product 3 - $Price
      Product Family 2
      Product 4 - $Price

      Now I was pulling these products from a database as one giant table, and then binding the data set to the Repeater control. The problem is that ASP.Net only has templates for a Row and alternating rows, so I couldn't easily insert the separators for the different Product Familys. All of the sudden I'm having to create my own custom controls that inherited from repeaters and needed to have a detailed understanding of how ASP.Net worked and all sorts of scary things. Needless to say, it was incredibly frustrating.

      On the other hand, the same solution in PHP is solved with,
      if($PreviousProduct.Family != $CurrentProduct.Family))
      { //New Family row code goes here.
      }

      1 Line vs alot + stress. To me, that kinda summed up ASP.Net, great if you don't really know how to program, but for professionals, not so great.

      That said I love C#, and I definitely wish that PHP was more like it, PHP is a terrible mess, but its fast, simple and you can build things fairly rapidly. Combine it with a framework, and you're in pretty good hands. Although I'd really love for them to make it harder for noobs to create security issues. :\

    7. Re:ASP.NET and C# by JAlexoi · · Score: 2, Interesting

      Comparing PHP to a web dev framework is very much appropriate. It is essentially a framework. Just look at it's history... It's Perl with some web oriented tooling, it has changed it's backend but hasn't really evolved much.
      And I'm not saying it's bad or something. It's very appropriate for a lot of projects. Just look at Facebook. And it's one of the most easily scalable platforms out there.
      All of the other frameworks are building on top of PHP and look what they have to do to overcome it's legacy of being a framework language.

      PS: PHP and ASP.NET can be compared, while RoR and PHP can't be. web.py and node.js can be compared to PHP, Django can't. Notice what PHP is missing to be comparable.

    8. Re:ASP.NET and C# by Canazza · · Score: 4, Informative

      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.

      --
      It pays to be obvious, especially if you have a reputation for being subtle.
    9. Re:ASP.NET and C# by ByOhTek · · Score: 3, Informative

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

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    10. Re:ASP.NET and C# by vlm · · Score: 4, Insightful

      Let me help with the standard /. car analogy of why people are pissed off with that answer.

      Question:

      I need to buy a nice set of metric socket sets to work on my car (my car was built in TN by a domestic company last century, yet is almost totally metric), and I'm not buying Chinese chrome plated plastic from walmart, can /. advise me on a nice place to get socket sets or general advice on procurement (note, I'm in market for 6-sides not those "bolt rounder" 12-sides and also I wanna get high grade impact sockets)?

      Answer:

      Well Saturn of Chattanooga never steered me wrong when I needed the plastic thermostat replaced with the brass one back in '98 due to the recall and I'm sure nothing has changed in the last 14 years so I'd go there.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    11. Re:ASP.NET and C# by xaxa · · Score: 3, Insightful

      So I provide a valid opinion and reasons why it's good to do web development with and it gets modded to -1? WTF Slashdot?

      You aren't a subscriber, and your five-paragraph comment was submitted within a minute -- and I'm being generous -- of the article being published.

      You are clearly being paid to post here, so "your" "opinions" are worth less than nothing.

      ("Redundant" would be a better moderation than "Troll".)

    12. Re:ASP.NET and C# by Anonymous Coward · · Score: 4, Interesting

      PHP is nowhere near being a framework. It is a scripting language, similar to Python and the like, but with a few things added in to make it better for web development. However, those things were added in in a time when the web was a lot simpler. Nowadays developers require more - MVC by default, a decent ORM perhaps, that kind of thing. When you need those, you turn to a PHP framework.

      I think that one of the reasons that PHP is criticised so much is that anyone can shove up a .php file and it'll run straight away - it's a lot easier to get into developing with PHP than with other frameworks where you have to learn about MVC, etc. As a result, there's a hell of a lot more dodgy code out there. With languages like Python, however, even using CGI it's a bit more in-depth (and really, you need a framework with Python).

    13. Re:ASP.NET and C# by jez9999 · · Score: 5, Informative

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

      Going down the Microsoft (ASP.net/C#/Visual 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.

    14. Re:ASP.NET and C# by scamper_22 · · Score: 3, Insightful

      Considering PHP was a 'language' built for server-side scripting, it is hardly just a 'language'. There would have been almost no reason to 'invent' PHP just as a language on its own.

      Actually interestingly enough, WIkipedia also generally compares PHP to ASP.
      http://en.wikipedia.org/wiki/PHP

      A programming language in general usage is a function of both its syntax and its libraries and even its tools. A discussion of a programming language just on its 'syntax' would be a fun discussion for a few in academia I suppose. But for the rest of the world, it includes everything.

      In the same vain as those who used to rant about operating systems being just the kernel. It's not. It's about the whole platform and can ever blur into common applications.

      Most often, what is discussed is the basic install provided in the prepackaged form.

      In that way, PHP is indeed comparable to ASP.NET.

    15. Re:ASP.NET and C# by AJH16 · · Score: 5, Informative

      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.

      --
      AJ Henderson
    16. Re:ASP.NET and C# by CastrTroy · · Score: 5, Insightful

      I'm a .Net developer, and I find a lot of what you say is true about .Net especially with respect to the standard controls. However, there's nothing stopping you from writing PHP style code in .Net. That exact line (if statement) you wrote out in PHP could easily have been done exactly the same in C#. Personally, after using .Net for 10 years, I have never actually used the standard controls, but rather just went about using the language to generate HTML because that's what seemed to cause the least friction. You end up generating your own libraries for the standard interface elements your applications uses. I've found this true of just about every programming language I've ever used. The standard stuff is sufficient for getting a prototype out the door quickly, but if you have a big project, you end up having to write a lot of custom code, because the included stuff never dose what it's needed to. The PHP style code ends up being the best starting point, because you don't waste a lot of time trying to bend the included stuff to do things it was never meant to do.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    17. Re:ASP.NET and C# by lucm · · Score: 5, Funny

      Sorry man. I deal with ruby, php, perl, .net, asp.net and bar none, .net and asp.net are not even close to being as reliable as php or ruby. I would never recommend .net to a client, ever.

      This is hugely convincing, I'll bring your valid points to my clients in the future. I think the "bar none" is the big selling point here.

      --
      lucm, indeed.
    18. Re:ASP.NET and C# by Dishevel · · Score: 2

      Not saying he is not a shill but you do realize that you can choose in your settings to not display the fact that you are a subscriber.

      --
      Why is it so hard to only have politicians for a few years, then have them go away?
    19. Re:ASP.NET and C# by rev0lt · · Score: 2

      The big advantage of Zend Framework is that it is an hybrid framework - if you want a specific component, they probably have it. If you want to use the full framework, you can also use it all. You can integrate Zend Framework with your application without needing to rewrite it to use Zend's structure.

    20. Re:ASP.NET and C# by Samantha+Wright · · Score: 2

      Holden: You're in a desert, walking along in the sand, when all of a sudden you look down...
      Leon: What one?
      Holden: What?
      Leon: What desert?
      Holden: It doesn't make any difference what desert, it's completely hypothetical.
      Leon: But, how come I'd be there?
      Holden: Maybe you're fed up. Maybe you want to be by yourself. Who knows? You look down and see a domain controller, Leon. It's crawling toward you...
      Leon: Domain controller? What's that?
      Holden: [irritated by Leon's interruptions] You know what a Windows server is?
      Leon: Of course!
      Holden: Same thing.
      Leon: I've never seen a Windows server... But I understand what you mean.
      Holden: You reach down and you press the domain controller's hibernate button, Leon.
      Leon: Do you make up these questions, Mr. Holden? Or do they write 'em down for you?
      Holden: The domain controller slowly begins to shut down, its hard disks baking in the hot sun, thrashing its write heads as it tries to dump its RAM to nonvolatile storage, but it can't. Not without your help. But you're not helping.
      Leon: [angry at the suggestion] What do you mean, I'm not helping?
      Holden: I mean: you're not helping! Why is that, Leon?
      [Leon has become visibly shaken]
      Holden: They're just questions, Leon. In answer to your query, they're written down for me. It's a test, designed to provoke an emotional response... Shall we continue?

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
    21. Re:ASP.NET and C# by NewWorldDan · · Score: 4, Insightful

      Very well, C# (a language) is a very excellent language. It can be used for server side scripting, just like PHP. Same with Java. However, it's generally assumed that your language of choice is going to be couple with some sort of framework. The great thing about Java and C# is that the skillset is easily transferable to areas outside of writing web pages. This is very important for me, as my application is more than a web page. It's an ecosystem of several applications that work together; emailing reports, collecting data, managing billings, etc. It allows me to reuse code and have one data access layer for all of my programs ensuring that they access the database in a uniform fashion. I don't know if it's possible, but I certainly don't know anyone personally who is writing desktop LOB applications using PHP.

      On a related note, Silverlight is an awesome platform. I won't touch it or use it because I don't think it has a future, which is unfortunate. It's certainly easier, faster, and more elegant that writing ASP.NET web pages. Frankly, web development sucks, and I look forward to a day (and I'll probably be retired by then) when there's a good universal client/server paradigm that's not based around HTML and JavaScript.

    22. Re:ASP.NET and C# by GreyLurk · · Score: 3, Insightful

      Seriously? Mod_mono_module? Have you even tried using that on an existing ASP.NET app? About 1/3 of the important features are broken.

      ASP.Net/C#/MSSQL/Windows/Visual Studio is great as long as you're willing to dump $10-15 grand for the whole stack of software. If you do, a ton of stuff "just works", and you can be incredibly productive. However, take one step outside of that stack, and you're back to writing just as much code as a PHP developer would, and you're due for some major headaches. Swap out your MSSQL server for MySQL or Oracle? Entity framework breaks, and Linq isn't very functional either. You're back to writing ADO.NET. Want to drop the $1500 Visual Studio? Sure you can edit with Notepad and Nant or MSBuild files, but welcome to a world of hurt, not to mention there's barely any documentation or support on blogs, books, or IRC channels. Try running on Mod_mono? Hope you didn't build anything that uses WebForms, or WCF, because if you did, you're going to be rewriting them. Prefer Python over C#? Sure, there's IronPython, but there's basically 0 documentation, and you're on your own.

    23. Re:ASP.NET and C# by elsurexiste · · Score: 2

      Heh, relax. Sure, GP is interchanging those terms and it's wrong, but overall he's right once you filter the crap (C# supports .Net, lol). Besides, on these days, the programming language is named as its main platform or virtual machine (Python, Java and PHP, just from the top of my head). He said that PHP is fine, but ASP.Net, the de facto platform for the web for .Net, have a few advantages. I agree with most of them, but a few are just crazy talking.

      I like my languages dynamic, so I prefer either Linux + Apache + Python + Django or Linux + Apache + PHP (plain, no framework on top of it). Plus, I wanted to try Linux + Haskell + Snap. Obviously, I wouldn't count C# support as an advantage (I could try C# 4.0, but I found the syntax unappealing). I also wouldn't put a language's level of support or paradigm as advantage, since it has more to do with your personal taste and the task at hands. I'm pretty sure that having multiple support for languages is *not* an advantage, though: having three different languages in a single project is a recipe for disaster!

      If I'm developing on Windows, it would be crazy not to use IIS + Asp.Net, as managing the server is a brain-dead activity. Sure, I can do it manually and write my own scripts, but it's easier the Microsoft Way. Management for PHP and Python is mostly by command line. I remember using a neat GUI for managing Apache (rapache, I guess?), but it had problems to represent my particular settings (it had something to do with Proxy / Proxypass or virtual addresses, can't remember).

      Since the IDE is instrumental for development and deployment, it should also be factored. Visual Studio is the best IDE, period. Eclipse's plugin system is utterly broken and Netbeans suffers from instability, so for me it's either gedit or vim for Python and PHP.

      In general, I noticed that, "for the enterprise", people prefer static-typing. A good friend of mine said that Java and C# acted like abusive mothers that will hit you mercilessly. They will stop your show if you mess up your types or common mistakes, so it's nice for novices and people "he can't trust" (yeah, those words). But if he trusted on its team, he would use Python and Werkzeug. I guess that, in that context, it makes sense. To be honest, my only grudge with PHP, as a language, is its idiotic $var[] syntax, and the lack of try-catch-finally.

      --
      I rarely respond to comments. Also, don't ask for clarifications: a brain and Google are faster, believe me!
    24. Re:ASP.NET and C# by Eirenarch · · Score: 2

      So the only reason you have stated is that MS are not developing the Linux port? BTW I have not met a PHP dev who has used ORM yet. I kind of doubt the quality of PHP ORM solutions :)

    25. Re:ASP.NET and C# by stridebird · · Score: 2

      Is that true? Not how I recall it. Classic ASP was/is an application container exposing various web-type things like request objects and the like. Generally, the language was VBScript but it didn't have to be: ECMAscript was an option too.

    26. Re:ASP.NET and C# by anss123 · · Score: 3, Interesting

      A couple of weeks ago I evaluated asp.net vs PHP for a web project I'm working on. Asp.net isn't bad IMO, but it quickly felt like I would have to model my website to asp.net instead of the other way around. I didn't try "doing things from scratch" though.

      I ended up with Apache2/PHP 5.3/MDB2/Smarty3 and the latest oracle client. The biggest frustration with PHP is setting it up really. I haven't bothered getting line by line debugging working, for instance, but got that "for free" with asp.net. Another annoyance is that you have to make sure the various components are compiled against each other, if they're not you get cryptic errors that aren't exactly straight forward to figure out.

      PHP5.3 seems to be surprisingly nice all in all. It got classes, access modifiers, exceptions and even closures now; so that you can do things pretty much the same way as one would in C#. The only annoyance is that you can't "compile" the source files, to check for syntax issues, but perhaps there are dev environments that can do just that.

    27. Re:ASP.NET and C# by spongman · · Score: 2

      great if you don't really know how to program, but for professionals, not so great

      strange, i read your excuse at failure to mean the opposite...

    28. Re:ASP.NET and C# by moderatorrater · · Score: 2

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

      I would go a little further than that, actually. Done right, PHP is as good as any "enterprise" language out there for tasks done on the web. In addition, the language itself is geared towards web development, and there's a library for everything imaginable.

      Outside of web programming it's the wrong choice, but for pure web programming I would probably choose it every time.

      Note: this is coming from a 5 year PHP programmer who also uses many other languages (java, C/C++, python, etc)

    29. Re:ASP.NET and C# by LWATCDR · · Score: 5, Insightful

      Actually PHP is pretty bad as a language. Like Perl it does nothing to encourage proper design or even readability.
      What people don't understand is that a good programer can write a good, stable, and scaleable program in just about any language. The best can do it in Assembly language.
      Bad programers can write crap in any language.
      The problem is that most programers fall in the middle. A good language will help them write good code.

      So what is good about PHP? That is simple, it is popular, everywhere, and has a lot of support. IMHO it is the Microsoft Basic of the web. I have not played with Yii, Cake, or Zend but they all sound very interesting.
      One may want to go one step higher and possibly look at something like Drupal or Joomla instead of a framework. What the original poster wants to do may already be available in one of those CMSs or could be added to it as a module.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    30. Re:ASP.NET and C# by bjourne · · Score: 3, Informative

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

    31. Re:ASP.NET and C# by datavirtue · · Score: 2

      I started building a framework the first time I got serious with PHP and said: "Wait a minute!". That's why I posted this question to /. If I had just continued on the route of building my own framework I sensed it would have worked fine and it would have been simple. I just wanted to exploit the experience of this community so I didn't shoot myself in the foot, and I have limited time. In addition to pursuing CodeIgnitor I will probably dabble in my own framework creation for simple projects. It feels good to work in PHP after nosing through a medium sized Java application for the last five years. With Java there is an hour (or three) of setup before I can get rolling on a simple application. It feels good to work with a simpler scripting language, but here I am again--knee deep in frameworks--and playing with objects. :(

      --
      I object to power without constructive purpose. --Spock
    32. Re:ASP.NET and C# by Oligonicella · · Score: 2

      "A good language will help them write good code."

      No it won't. It's a nice myth, but it's not really true. Programmers will output crap at their level regardless of the environ.

      "Actually PHP is pretty bad as a language."

      Your only argument is it doesn't 'shepherd' the programmer enough. That's not a negative from my perspective.

    33. Re:ASP.NET and C# by Oligonicella · · Score: 3, Funny

      "In the same vain as those who used to rant..."

      You could have probably stopped there and been completely accurate. Good choice of words.

    34. Re:ASP.NET and C# by Mia'cova · · Score: 2

      As a self-described "good programmer," there are a lot of language features which improve my productivity and the end-result. Easy examples include features like typed-variables, garbage collection, and exception handling. I can keep track of all that manually but I don't get it right 100% of the time, especially not the first time. Regardless of the language, framework, and existing codebase quality, we set our test-bar appropriately for the product and schedule the appropriate amount of time to get there. Most of the time, it works out fine. But if you don't think better tools HELP write better code, you're vastly overestimating people's talent. The fewer details I have to think about, the better the end-result.

    35. Re:ASP.NET and C# by Xest · · Score: 2

      "No it won't. It's a nice myth, but it's not really true. Programmers will output crap at their level regardless of the environ. "

      Perhaps he should have phrased it as "will help them write much better code", rather than "good code", if he had then it'd be absolutely right. Code written in C# or Java for example will be inherently better because more errors are checked at compile time (i.e. invalid type conversions), and hence can't result in issues at runtime.

      "Your only argument is it doesn't 'shepherd' the programmer enough. That's not a negative from my perspective."

      It shouldn't be. In an ideal world where all programmers are perfect and there are plenty of programmers you'd be right, but here in the real world truly good programmers are hard to come by and most fall into the middle ground where they simply don't have the skill to be trusted to avoid the pitfalls of a language like PHP day in day out. This is why PHP is far and away the language most responsible for the proliferation of SQL injection attacks on the web to this day- because it encourages use of direct SQL querying, rather than say, parameterised SQL and so forth to perform database tasks to name but one example of the problems it leads to.

    36. Re:ASP.NET and C# by Xest · · Score: 3, Interesting

      Be wary of the number of responses in favour of PHP and the moderations given to posts here, it's hard to have a sensible debate about PHP, because it is so easy to pick up, use, and hack something together it's used by people in greater numbers, coupled with the fact that Slashdot's moderation system is built on numerical consensus means that a popular opinion will get modded up, and an unpopular modded down, but popular does not mean correct.

      So with that out the way, here's my view as a lead software developer at a firm who develops for large clients from BP, to Swiss Re, and from Britain's MoD to GE using a large array of languages from C# to Java, and C++ to Ruby and PHP. Fundamentally if you're a good programmer and know the ins and outs of programming, both generally, and in a language specific way you'll be able to write good PHP code, as the GP says - as good as any other framework to an extent. My only caveat with that would be that PHP just doesn't scale as well at the high end as other languages as the likes of Facebook have found out, hence why they wrote a PHP to C++ translator, and now a Java-esque VM to try and get their PHP to work at the same level of performance as these languages. The flip side of that is that most web applications will never need that kind of performance, and hence good developers can write code with PHP just fine without any real side effects at the end of the day.

      But the reason many professional developers who have experience across many languages look down on PHP are many, the language itself has always been well behind the curve, it didn't properly support fundamental concepts like classes, namespaces, and closures until more reecent years, and that's pretty inexcusable, not in that these are expected features for a modern language, but that they're fundamental to the design of a language and adding them later will only result in headaches, and with PHP it certainly has. It also has many other quirks, associativity of the ternary operator for example is backwards in PHP compared to most other languages, variable scoping is fucked, namespaces use the escape character as the separator and these are the sorts of things that will trip new, and even many moderately experienced programmers up as to why things suddenly aren't working.

      It's also the case that interpreted languages in general face the problem that code can appear to run fine until errors are encountered, whilst with compiled, or bytecode compiled languages like C# and Java more errors are detected, and hence must be corrected at compile time, preventing some nasty errors ever reaching the end user. This in itself is less of a problem if there is great testing supporting for an interpreted language, but even PHP's unit testing tools are way behind the equivalents in again, languages like C# and Java. On top of this, the rest of the tools for languages like C++, C# and Java are just that much more mature offering features that just let you write better code faster.

      Of course, PHP is still used heavily, and this is because it does let you get things done quickly, in the real world there just isn't always time to properly write well architected, and well tested code, this is really sad, as it almost always inevitably leads to problems in the long run, but it's also an unescapable, no matter how unwanted reality. The fact is if you have a pushy client or boss then just may not even have time to write a beautifully architected, well tested C#/ASP.NET MVC, or Java/Spring application no matter how superior that option would be.

      So fundamentally it comes down to how much freedom you have with your software development schedules, if you're being given time to do things right, then use something like C# and ASP.NET MVC, or Java and Spring if you can't use Windows Server to host. If however you're being forced to get things done quickly then you may well find it's best to stick to PHP, but if you do then please, do one thing - work your arse off learning PHP in depth, learn it's quirks, it's pitfalls

    37. Re:ASP.NET and C# by Firehed · · Score: 2

      Security is hard. I agree that yes, most frameworks suck at security (my team has reported security bugs, with implementation details, to the framework authors. They were rejected as "not an issue", demonstrably false by running the example we sent which followed their own best practices guidelines).

      PHP is no exception, but security with it is no harder than with any other language. But as a powerful set of tools with relatively few safeguards, it's easy to do stupid things. And if you know what you're doing, it's also pretty easy to lock down. Some poor default settings did not help here, but they have been deprecated for the better part of a decade (PHP5 was introduced, what, six years ago now?). If Wordpress had been written in Python or Ruby, do you think it would suddenly be more secure? It was written by lousy coders that needed to hack together a functional product, and poor security is part of that baggage.

      --
      How are sites slashdotted when nobody reads TFAs?
  2. PHP is great by InformativePost · · Score: 4, Informative

    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.

    1. Re:PHP is great by Sneeka2 · · Score: 2

      Out of genuine interest, what makes a well written (emphasis on WELL WRITTEN) PHP app so much harder to maintain than an equally well written *.NET app?

      --
      Bitten Apples are still better than dirty Windows...
    2. Re:PHP is great by Rhaban · · Score: 5, Funny

      Out of genuine interest, what makes a well written (emphasis on WELL WRITTEN) PHP app so much harder to maintain than an equally well written *.NET app?

      You have to actually read and write code, you can't just click checkboxes until it works.
      It is really hard.

    3. Re:PHP is great by danbeck · · Score: 4, Insightful

      This is completely true, but very unimportant. PHP under Apache (And really what serious professional would use anything else?) as a module and needs no threads; that's the job of the httpd daemon itself.

      If you need threads; if your Java indoctrination only allows you to solve problems by creating huge monolithic applications, ignoring excellent work by engineers who are much, much smarter than you, then yeah... PHP won't cut it for you. You'll need a language that will be better suited to reinventing the wheel. That is definitely not PHP's strength.

      (Ah, I love it when a good straw man argument comes together.)

    4. Re:PHP is great by ByOhTek · · Score: 2

      Given all the shitty Perl, Python, C#/VB.NET, Ruby and Java code I've seen out there... I'd have to say, hate the developers that made that crap code, and not the language. Any developer can make crap code in any language. Some languages make it easier (Perl, Ruby and Python come to mind VERY quickly), but that certainly doesn't make them bad languages.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    5. Re:PHP is great by datavirtue · · Score: 2

      In a way PHP is like a collection of macros that let anyone just start turning out things that will work. You don't have to be a programmer, know web standards, or understand much of anything to start coding in PHP. Therein lies the danger. Judging from this I can only assume there is a vast swath of "spaghetti code" in production. A lot of companies manage to turn incompetent people loose on "real" languages in more complicated environments so you can imagine the state of some PHP apps floating around. Usually, what starts out being a simple project often morphs into a ZOMG ultra important application, so if you do not plan for this when coding with PHP you will get in trouble fast. Right away I noticed I was going to need some advice when I started playing around with PHP. It was appearant that just barfing up code wasn't going to cut it (as usual), at the least you have to make use of PHP object oriented features.

      --
      I object to power without constructive purpose. --Spock
    6. Re:PHP is great by Xugumad · · Score: 3, Insightful

      Out of curiosity, if I wanted to have a web application that used AJAX to listen for change events from the server (long-poll style), how in PHP would I notify any waiting requests of a new message to be sent out?

    7. Re:PHP is great by CrispyZorro · · Score: 2

      ROTFLMAO! that is every Microsoft developer I've ever met. Microsoft is making developers dumber.

      I couldn't agree more. I feel the same way about word processors. That's why I use LaTeX.

    8. Re:PHP is great by DdJ · · Score: 5, Informative

      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.

    9. Re:PHP is great by mangobrain · · Score: 3, Insightful

      Unfortunately, I don't have a good answer for you. However, I would like to point out that in my opinion, your question typifies what is wrong with trying to use HTML, HTTP and JavaScript as a general purpose development platform. The reason this isn't easy is because long polling is a hack, as are all "push" technologies. HTTP was only designed as a simple, one-way request/response protocol; clients make requests, and the server responds.

      I'm not entirely convinced that running arbitrary code directly from the browser is a good idea, regardless of whether or not it works across many platforms; but if people really want to take application development in that direction, can we please design technologies which are up to the task, and stop abusing ones which were never intended to be used that way?

      Disclaimer: at $DAYJOB I develop a web proxy; HTTP abuse makes me cry.

    10. Re:PHP is great by interval1066 · · Score: 2

      I don't. I don't expect to program anything in PHP, ever. Hopefully.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    11. Re:PHP is great by fyngyrz · · Score: 2

      The "serious professional" doesn't use PHP at all, lol.

      But you carry on!

      --
      I've fallen off your lawn, and I can't get up.
  3. Voting to close by Sneeka2 · · Score: 4, Insightful

    ...as Subjective and Argumentative.

    Oh, wrong site.

    --
    Bitten Apples are still better than dirty Windows...
  4. Django by troon · · Score: 5, Informative

    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 ,df C erb-y go. a Ekrpat t.fxrapev
    1. Re:Django by DarwinSurvivor · · Score: 3, Informative

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

    2. Re:Django by BasilBrush · · Score: 4, Insightful

      If copying and pasting blocks in Python is not working right, then get an editor that is aware of Python indenting. And switch on the option to always convert tabs to spaces.

      Whenever anybody mentions indentation as their one argument for/against Python, I'm pretty sure they know very little about the language. It's like the very first thing about the language you learn.

      How a language denotes blocks is just a detail. You learn best practice for that language and get on with it.

    3. Re:Django by f1vlad · · Score: 2

      Look at Amazon Cloud Services, they give you blank Linux elastic box and you can [relatively] easilily set it up there. Seconding Django. I've been using Django, then hybrid like https://github.com/hmarr/django-mumblr.

      --
      o_O
    4. Re:Django by dbrueck · · Score: 3, Insightful

      I've been using Python for over a decade and the whitespace is a total non-issue. Maybe in theory it could be a problem, but it just isn't in practice. Hate the language for other reasons if you want, but that's just not an actual problem that occurs in the real world.

      Seriously, we've used it on tiny projects to massive applications, from small teams to large, multi-department teams, from "systems programming" to web dev to desktop apps to mobile development, and off the top of my head I can't remember whitespace copy/paste problems. Ever. Maybe it happened once and was noticed and fixed so quickly that nobody ever talked about it? Who knows, it most definitely isn't on our top 100 (or top 1000 AFAICT) problems encountered during development.

      Python is a fantastic choice for many situations. The choice of language to use is somewhat subjective, so if it's not for you, so be it, but IMO it's really hard to argue that significant whitespace is a practical or objective reason to not use it. In fact, I'd argue the reverse - there are real benefits to it. We use a fair amount of C++ and Javascript as well, and all of the code is indented anyway. It always feels strange in those other languages to indent /and/ give some additional cue to the parser about the structure of my code. It's redundant. :)

    5. Re:Django by dbrueck · · Score: 3, Insightful

      I don't think he said that was the only reason for switching languages. Python has a lot of other stuff going for it too - significant whitespace is just one of them.

      Anyway, from the perspective of developers whose first choice is Python, it's just that those curly braces are fluff, they are redundant noise. They don't necessarily make the code more readable (whitespace is used to denote the structure of the program anyway), they exist because the parser needs them, so it *feels* like a weakness in the language. It's like, "I've already taken the time to format the code to make it readable and at the same time to express my intent, unfortunately I also need to put in additional annotation to make the parser happy."

      It's not a huge issue, but it's just one of the reasons I like Python: it doesn't get in my way. Anytime I find myself doing something because the language requires it and not because I need it, it's annoying. If I've been working in Python for a few days and then switch over to C++ or ObjC, I'm always forgetting braces and semicolons. Why? Because *most* of the time they serve no purpose and exist only because the language requires them. Omitting them does not indicate a logical or algorithmic error, rather some busywork required by the language.

    6. Re:Django by lee1 · · Score: 2

      I guess that you know this, but for others reading: you need not use Django's template language, or any template language, to use Django. In fact, Python's string interpolation is so convenient that you can use that instead of a special-purpose template language.

  5. PHP is an ugly programming language by YEPHENAS · · Score: 2

    PHP is an ugly programming language. Just look at a comparison with some other languages to get a feel for its ugliness: http://hyperpolyglot.org/scripting

    1. Re:PHP is an ugly programming language by Anonymous Coward · · Score: 3, Insightful

      Perhaps a better word is 'inelegant'. A massive global name space, inconsistent function names and argument order, tacked on object model, crappy exception handling.

      There's almost nothing that php does better than other modern scripting languages.

    2. Re:PHP is an ugly programming language by Sneeka2 · · Score: 4, Informative

      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...
    3. Re:PHP is an ugly programming language by Dhalka226 · · Score: 3, Insightful

      I don't think that evaluating the elegance of the code is entirely unreasonable. If nothing else, it aids maintainability, particularly as the original developers of projects move on and new people have to get up to speed with the code base.

      However, it should not be a primary concern. Those would probably be performance/scalability and speed of development, the order of which varies person to person and project to project.

      To the OP: PHP is a fine language overall. It is not particularly elegant, but it does scale pretty well compared to alternatives and it also is easy to get started with, and has very good documentation. The most frustrating part of it is probably that there are some annoying internal inconsistencies. The one that always ends up getting to me is stristr( $haystack, $needle ) for checking if one string is contained in another versus in_array( $needle, $haystack ) for checking if an element is contained in an array. The argument reversal is just frustrating.

      So far as PHP frameworks, the one I have used the most is CodeIgniter. It is not bad, neither in features nor in learning curve, and it is reasonably fast. I have also heard some good things about Yii, but do not have personal experience with it.

      I personally really enjoy Ruby and Ruby on Rails as language/framework, but I can not deny that there are scalability issues sooner than with PHP, and it is also harder to find cheap web hosts that support it well if that is a factor. It is a beautiful language though, and you can get a basic website up and running at lightning speed. In my experience it is also a very hot language with good job prospects if that is a goal. Some people worry about using it for their projects because of the comparably small number of developers for it, but those that do typically pay quite well.

      Bottom line: If the only reason you are not using PHP is other peoples' disdain, screw them. It is a fine choice. If you want somebody else to pick the best choice for you and your project, we can not do it; we lack the information, if nothing else, and all you will get is a bunch of replies about peoples' pet frameworks. You seem to like PHP, so go with that. Google "best PHP frameworks" and I am sure you will turn up a chart somewhere comparing a bunch of them for you and you can make the choice from there. All I would really concern myself with is a nice bit of database abstraction (so that it can handle SQL injection issues for you) and performance; the rest is choice or gravy on top. I personally prefer ones that do not have a specific template language and instead just allow me to continue to use PHP in my views. I do not see the advantage of learning yet another "language" and abstracting further away from the code that is ultimately going to be run, but if you do that is your choice.

  6. PHP & Python by truthsearch · · Score: 4, Informative

    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.

  7. J2EE by bfandreas · · Score: 2

    It does have its flaws but there are a plethora of Java based frameworks out there.
    The sheer amount of options you get at zero cost(some of it actually Free) and the quality of API documentation is simply astounding.

    --
    20 minutes into the future
    1. Re:J2EE by Khazunga · · Score: 2

      The J2EE model of web app execution is fundamentally flawed. The logic of keeping one instance of the app alive for each user steers you towards hitting a very fast bottleneck on memory usage. Yes, the model has been adapted, with state serialization and essentially paging out the app when the user is not executing requests, but the root problem is there, and it still shows: It's very very hard to serve a few thousand simultaneous logins.

      --
      If at first you don't succeed, skydiving is not for you
    2. Re:J2EE by Slashdot+Parent · · Score: 3, Informative

      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
    3. Re:J2EE by CynicTheHedgehog · · Score: 2

      In most JEE apps I've dealt with the only think kept alive is HTTP session state. Using a framework like Seam, a session- or conversation-scope component can be instantiated, have the session state applied, have its dependencies injected, process the request, and then be disposed of (although typically object pools are used to avoid the overhead of instantiation).

      (Granted, vanilla JSF is prone to session-scoped managed bean proliferation/abuse. I personally have never managed to get very far with plain JSF before inventing some sort of conversation scope. The view model and its state can get rather large and tends to pollute user sessions, but that can be stored on the client side.)

      In the rare case where a stateful session bean is needed (hardly ever) a similar thing happens with passivation and activation. But more importantly, stateful session beans are released at the end of a conversation/unit of work and are most certainly not kept alive for the duration of the users session.

      Memory was never really an issue for us (except maybe permgen space due to Hibernate proxies). The problems I've had dealt with resource contention in the DB due to JEEs rather aggressive transaction management defaults and distributed transactions. PHP et. al. avoid such issues by leaving transactions entirely in the hands of the user and RBDMS providers.

      If you're writing an application (data model, web services, etc.) then JEE is a good choice. If you're writing what is essentially a group of pages with some dynamic bits, then PHP, Python, etc. is probably a better choice.

  8. Every language sucks by mveloso · · Score: 4, Funny

    Use the language of Money and buy someone to build it for you. Problem solved!

  9. BASIC, of course! by tomknight · · Score: 3, Informative

    ... well, not really. But there is such a thing for the web: http://www.runbasic.com/

    --
    Oh arse
  10. Wt by paugq · · Score: 5, Interesting

    Wt is the best one I have tried. I use the C++ version, although there is also a Java version (JWt).

    What makes Wt unique is its approach: widgets. You develop web applications like you were developing desktop applications. Also, the API is Qt-like (but using Boost).

    I gave up on Rails after I used Wt.

    Want a virtualization console? Take Wt, libvirt and an HTML5 VNC client and you are done.

    Need Active Directory authentication? Wt, Samba (or Windows APIs if you are on Windows), done.

    Streaming? Wt, ffmpeg libraries, done.

    Forgetting about bindings and being able to use the millions of C/C++ libraries out there was a huge relief.

    Also, size: Rails, Django (and even PHP) just do not fit in an embedded environment. Wt does.

  11. Go C++ with Witty! by scorp1us · · Score: 4, Interesting

    Wt ("witty") is a C++ toolkit that is modeled after Qt. It uses boost and STL, but you get to use familiar Qt concepts - signals & slots, Model view, etc. Basically think of Qt-based web pages. It fully supports AJAX and can handle the data server-side or on the client. It also has a C++ -> JS converter so you can just make a function for conversion to JS and have it exec on the client. Of course it runs as a module, or it comes with its own server. It fully supports CSS, DOM, etc.

    I reall like this approach because my two complaints of PHP:
    1. It is unstructured
    2. it is ugly (both syntax, and having code embedded in pages)
    are alleviated.
    1. C++ object orientation encourages a structured approach.
    2. The "it's 100% C++" ensures that you focus less on the presentation in PHP and just on the application logic. This helps encourage a model-view-controller approach. While you might have to write CSS, you will never have to write HTML and you won't ever have to mix the two in a CPP file.

    Another reason is speed. Everything is compiled and runs natively, or compiled to JS and moved to the client.
    Yet another reason is security. Wt has several protections built in. See the features link below.

    If you're looking to do web pages entirely differently, this is it.

    Additional features list

    --
    Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
  12. Nothing wrong with PHP. by gfxguy · · Score: 5, Insightful

    I've been doing a lot of web programming, and I evolved from PERL to PHP to Python. I happen to prefer Python these days, but there's nothing wrong with PHP. I wrote my company's PTO system using PHP (LAMP) and it works great. I would also suggest JQuery or similar for richer content.

    Most "disdain" for any given language is mostly elitism and people self-validating their own choices. It's true PHP can be messy, but I recall having a Ruby developer look at my PERL code and be surprised at how readable it actually was... in other words, it's up to the programmer. I can make some pretty ugly programs in any language.

    --
    Stupid sexy Flanders.
  13. Good luck by beowulfcluster · · Score: 4, Insightful

    You might as well ask which religion is the best one.

    1. Re:Good luck by cshark · · Score: 2

      Oh, Judaism, clearly.

      --

      This signature has Super Cow Powers

    2. Re:Good luck by buglista · · Score: 2

      I know this one! "emacs".

    3. Re:Good luck by ancientt · · Score: 2

      You might as well ask which religion is the best one.

      Oh, Judaism, clearly.

      Please, please, please tell me that there is a programming language named Judaism!

      --
      B) Eliminate all the stupid users. This is frowned upon by society.
  14. Githubs, anyone? by Crimsane · · Score: 2

    Nobody should be allowed to register an opinion in this topic without linking to their githubs.

  15. Don't listen to them. by GNUALMAFUERTE · · Score: 5, Insightful

    Here's a little secret for you: Anyone that uses the word "enterprise" is full of shit. It is used by mediocre developers who work at relatively big corporations and have been forced through the years to work with a bunch of bureaucracy. This people can't release a fucking shell script without 10 formal test cases, 50 meetings, 10 flowcharts, and it's own repository.

    Serious huge projects are written in C++. Serious huge projects that need incredible performance are written in C with assembly optimizations. When somebody tells you that you can't write anything if it's not done in Java, that guy is a corporate droid. If somebody tells you the same for Perl, he's an old monk. If somone tells you that for Ruby/Python/Brainfuck, he's a snob and a fan of that particular language, ignore him too.

    Truth is, leaving aside the obvious differences, when it comes to features that help organize huge projects, C has nothing that PHP doesn't implement on some way. Don't get me wrong, I'm not comparing the base of all modern computing with a modern and not very well designed interpreted language, I'm talking about features that some idiots would call "corporate". And yet, there are incredibly HUGE projects written entirely in C. And yes, there are also huge projects written in PHP.

    Truth is, if you are a good coder, you'll do a good job even if you have to use Basic. And if you are not, you'll write spaghetti code even in C++.

    PHP is a simple, straight to the point language, with a very clear syntax, that is great for web development. It's syntax is very much C-like, just like Javascript, and that certainly helps when you are writting web apps. It's easy to find PHP coders, and that certainly helps too.

    The problem with PHP's reputation is that it's incredibly easy to just write some script or modify an existing one, and call yourself a coder. So the amount of bad PHP code out there is incredibly huge and incredibly public. Of course, if you reviewed each of those Corporate-enterprise-mega-super-jumbo java apps, you would find as many WTFs as you could in your average PHP project, the only difference is that the assholes rooting for Java won't show you their code, and they'll act very dignified.

    Also, avoid the motherfucking frameworks. You don't need them, at all.

    --
    WTF am I doing replying to an AC at 5 A.M on a Friday night?
    1. Re:Don't listen to them. by bongey · · Score: 5, Informative

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

    2. Re:Don't listen to them. by maple_shaft · · Score: 3, Insightful

      You just went full troll... The fact that you got modded +5 makes me lose all faith in the Slashdot community moderation process.

      Somebody who doesn't clearly understand the importance of frameworks, detailed scalable software designs, enterprise level consistency, and maintainable code that is appropriately decoupled and unit tested, is somebody who shouldn't be writing software of any kind. Oh and if given the chance I would very willingly share with you some of my source code, because I am a nice guy and would like for you to learn something about software development in corporate environments.

  16. Re:Catalyst? by oneandoneis2 · · Score: 3, Informative

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

    --
    So.. it has come to this
  17. They all suck by Alkonaut · · Score: 5, Insightful
    Honestly all web platforms have drawbacks, and all of them will have supporters claiming they dont.
    • python: pros: easy, decent tools, good frameworks. cons: syntax is difficult to check for correctness (non-compiled).
    • perl: pros: it's free: cons: Its perl
    • .net: pros: techincally bloody excellent, good tools. cons: practically win-only, no free server software
    • javascript (e.g. node.js): pros: it is the same on the client if you want one. Cons: it is still bloody javascript.
    • java: pros: widespread, good servers. cons: a million frameworks to choose from and none is great, next year all will be obsolete and 100 new ones will come. Slow language development (java 8 is .net from about 2005)
    • php: pros: easy, straightforward, multiplatform cons: practically web-only

    They all suck, which one sucks the least depends on the circumstances of your project (time, budget, techincal aspects, what you already know, what you would like to learn, performance requirements, scalability requirements).

    1. Re:They all suck by dbrueck · · Score: 2

      Python and related languages are compiled on the fly, so you don't get all of the same compile-time checks you would in e.g. C or Java. In practice this isn't usually a bad thing though: if you're testing your code (even informally by just exercising the code), then it's more or less impossible for those errors to slip by, and if you aren't exercising your code, then you have bigger problems to worry about.

      There are of course pylint and other code checkers out there, and a few times in the past I've tried them out for a day or two, but in the end I always abandon them because for me encumbering the dev process a little doesn't provide enough benefit - like I mentioned above, the real problems are caught if you're doing even a modicum of testing.

  18. Start Learning Python by mrtwice99 · · Score: 2

    I'd recommend that you start learning Python. I moved away from PHP to Python in late 2008 and have NEVER, even once, looked back. Its just a better engineered language and the community is more deliberate and professional. SQLAlchemy is the best database library/ORM ever! And there are plenty of web frameworks to choose from (start with Flask or Pyramid).

    Here are some thoughts from 2008 that got me moving away from PHP towards python. The python web community has grown a lot over the last few years, so my comments about Python being hard to get started in can be considered somewhat deprecated:

    http://old.nabble.com/Creole-is-Dead,-long-live-Python!-p20488959.html
    http://propel.tigris.org/ds/viewMessage.do?dsForumId=1093&dsMessageId=88191

    Finally, Python is much more general purpose than PHP, so the Python skills you learn while doing web development can be put to use in other programming areas (I do a lot of scripting and data manipulation with Python).

  19. Modern Perl is worth your time and consideration by PlainBlack · · Score: 2

    First, I should state that it's really not about the language, it's about the coder. You can build great and crappy things with any language. And every language has it's warts.

    That said, the best language I've used in the past 20 years of programming has got to be Modern Perl. Not the chicken scratch Perl you saw 5 or 10 years ago, but Modern Perl. Here are some of the strengths of modern Perl:

    It's object system: https://metacpan.org/module/Moose
    It's web frameworks, especially Dancer: https://metacpan.org/module/Dancer
    It's ORM: https://metacpan.org/module/DBIx::Class
    It's package installer: https://metacpan.org/module/App::cpanminus


    And so much more. Do yourself a favor and at least have a look at Perl.

  20. Re:ASP.NET Is Bloated by ancientt · · Score: 2

    I second the AC, you can use pretty much anything as long as you're good at it, but not ASP.NET. Every implementation I've seen has fared poorly when compared to similar projects done on other platforms. I can't really say why, after all it *seems* like it should do well and developers seem happy at first, but after a couple years, every one seems to falter and either start suffering performance wise (bloat? rot?) or climbing maintenance costs. It shouldn't be that way of course, but that seems to be the common trend.

    PHP is fine if you enjoy working with it and can keep it up to date, particularly if you have a framework you like to use it with... to a point. If you expect the code to be maintained by a team of people in the future, and need the best possible performance you can squeeze out of it, then you might want to look at something else. It is nearly always easier and cheaper to buy more hardware than it is to rebuild code, but sometimes foresight before the project can give you better bang for the buck down the road.

    From a developer standpoint, I've had really good luck with my own PHP. Years after it was written, I've been able to go back in and do maintenance with little effort. Mostly that's because my programming tendencies tend to be pretty static (stagnant?) and I do comment. Facebook is running on PHP and Wikipedia is running on PHP, so there is no question that it *can* handle the big jobs, just a lot of questions as to whether it is best suited or not.

    The same can be said for Perl. If you can handle maintaining it well, and you're good at it, you can work with Perl for years and years and get good performance from it. It runs /. after all, so it can handle a pretty serious load and scale if it really needs to. It has much the same issues as PHP, it *can* but is it *best* is the question.

    By far the best web experiences I've had from the consumer side were compiled code. C, C++, C#, Go, Visual Basic, or whatever floats your boat as long as you're good at it and can manage the support for it. Yet, the difference in performance isn't all that great, so I still do recommend Java or Python. I don't particularly love using either one, but both perform well and seem to be enterprise capable, in fact, I really recommend looking at AppEngine if you can stomach it because it will give you a good testing platform and huge scalability later if you need it.

    --
    B) Eliminate all the stupid users. This is frowned upon by society.
  21. PHP and Python by shish · · Score: 2

    I've done professional projects with PHP and Python (Pylons specifically, with Mako for templates and SQLAlchemy as ORM; and a few small projects with web.py)

    After a couple of years with Python, every week or two I'm still learning a wonderful new thing that makes me smile and makes life easier.

    After a couple of years with PHP, every day (sometimes several times per day) I'm finding some bug, design flaw, or general retardation in the standard libraries that makes me want to simultaneously cry and punch a PHP developer. Taking a look down my commit logs for the past week:

    • - There's no function to modify one part of the URL (eg, input="/foo/bar?a=32&b=cake", "a=123", output "/foo/bar?a=123&b=cake")
    • - "string" + "string" is valid code, runs fine, doesn't raise a parser error. Does it equal "stringstring"? No, it equals numeric zero.
    • - parse_str(). What does this function do? From the name we can gather that it parses... some sort of undefined string? Great. Actually, it parses a URL query string, which is sort of useful. Can we assume that it returns the parsed values as a dictionary, like most functions return their return values? Nope, this one returns null on success and will overwrite any arbitrary global variable with the user supplied data. WTF.
    • - Tons of platform-specific WTFs, like how symlink() works on windows, and will create the NTFS version of a symlink - but then is_link() will return False if you later inspect it.
    • - The abstraction libraries (in this case PDO) will have major differences in behaviour depending on their backends; MySQL has username and password as part of the connection string, Postgres requires them to be separate paramaters. Also, MySQL allows multiple SQL paramaters bound with the same name, and Postgres doesn't. Looking up the bug report for this, it seems that this useful feature used to work fine on all back ends, but they removed it because it wasn't documented as working; but they just didn't do a very good job of removing it from the mysql backend...
    • - Tons of configuration-specific WTFs; lots of things break in weird ways under "safe" mode, things like checking if a disk has space available are banned.

    6 WTFs and it's only Tuesday. This in addition to all the regular and well-known retardations, like how they thought it was a good idea to automatically escape all input data assuming that it would be inserted into a mysql database - but they escaped it in a broken way, so even if you did want to insert it into a mysql database you'd need to un-escape it and then re-escape it properly (remembering to use mysql_real_escape_string, because mysql_escape_string is buggy and insecure. Not that anyone should be building SQL strings by hand anyway...)

    The one and only positive thing I have to say about PHP is that it has a low barrier to entry; any monkey can take your code and install it on their cheapo shared web host, and do simple modifications for themselves.

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
  22. It is an HR issue. by jellomizer · · Score: 3, Insightful

    ASP.NET or JAVA EE are all perfectly fine and their real advantage in Enterprise development is the ability to find good Professional Software Developers.
    PHP as a language is a personal preference... However many of the PHP Developers do not do too much Enterprise coding so PHP code tends to be sloppy. While ASP.NET or JAVA EE Code seems to be written in more of a professional way.

    You can write good PHP Code that does everything that ASP.NET or JAVA EE does and it may even be better and faster. However the people who tend to write PHP do not code thinking of enterprise teer development

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  23. Ups and Downs by GreyLurk · · Score: 2

    So, you have a couple options, each with plusses and minuses:

    1) PHP, with Zend or Cake (or some other framework). PHP is not the fastest executing, but it's easy to learn, easy to find developers for if your project grows, and is perfectly functional for front and back end coding. I strongly recommend going with Zend or Cake. There's a steeper learning curve, because you'll have to pick up some OO principles, but 5 years down the line when someone is maintaining your codebase, they will curse your ineptitude slightly less. Even if that person is you.

    2) Railo with ColdBox. Railo compiles its code to Java Bytecode, and is extremely efficient. It's blazingly fast compared to PHP, still relatively easy to learn, and with the ColdBox framework, you'll still end up with some pretty clean, maintainable code at the end of it all. You have to run it on a Java Servlet Container though, which will have a large server footprint, and carries along with it some higher priced dependencies than just a simple LAMP setup.

    3) Python with Django: Dead simple to get a development environment up, very fun language to code in. A lot of support in the open source community. Python/Django is a very popular choice. Just about any outside communication you want to undertake is well supported in Python, with native libraries often available from the API providers. Moving from PHP to Python may be a bit tricky though, and some people don't like the fact that Python is "whitespace sensitive", so the formatting of your code is very specific.

    4) Ruby and Rails: A TON of support in the Open Source world. Very Sexy, though less so than it was 2-3 years ago. Very easy to code in and update. However, there are downsides: Ruby people are in demand, so hiring extra developers will be expensive, and the Rails framework itself is constantly in flux. Just looking at the last 5 years, Rails is very different today than it was then.

    5) Microsoft Stack: ASP.Net MVC, Visual Studio, SQL Server, IIS. Look, a ton of people hate on Microsoft, but honestly, if you buy their stack top to bottom, a ton of stuff "just works". Building a simple app on MS Servers, with MS tools, in MS's recommended style can be done in no time flat. However, deviate from their master plan just a bit, and watch your house of cards fall apart. Want to run ASP.Net on a linux server? Mono is missing huge chunks of functionality. You'll probably have to re-write your app. Want to Connect to a MySQL or Oracle Database? Suddenly Entity Framework breaks down, and you're back to writing SQL in DAOs if you're lucky. Don't want to pay the $1200 license for Visual Studio? Sure you can try using MonoDevelop, but it'll take you 3 times as long to code your app, and any tutorial or blog posts you read you'll have to put through the "mental translation" of Visual Studio to MonoDevelop. Oh, and that's leaving aside the cost. Potentially tens of thousands of dollars sunk into the stack just for the software, not to mention the hardware that runs it.

  24. You can use any language you want to with FastCGI by rdebath · · Score: 2

    If you write your program as a "FastCGI" process it's running as a normal process that accepts tasks one at a time from the web server and sends the results back for the webserver to forward to the client. Your process keeps running so you don't have the overhead of continually restarting your web program that you get with plain CGI.

    It is, in theory, possible to have a FastCGI server using a shell script. But pointless because FastCGI is supposed to be used to eliminate cost of starting of processes. Otherwise any language that makes normal executable program can be used, if a library exists or you write something following the (pretty simple) documentation, but for really limited languages you may need a wrapper.

    Once you're writing your own persistent program in your own choice of language to service the requests the rest is supposed to be easy. :-)

  25. Don't start a NEW project in PHP by Sloppy · · Score: 2

    Each PHP release is better than the one before it, and it's getting close to being much like a "normal" language.

    Close. It's not there yet, and probably never will be, due to compatibility requirements.

    You can pretty much do anything in PHP you want, but the bigger your project gets, the more you're going to run into its weirdnesses. I don't have a list to enumerate for you, but please believe me, I run into "Holy shit, I don't believe this" language oddities every couple months, where PHP does something just plain weird and wrong compared everything else. After nearly 5 years maintaining some PHP code, I still get surprised once in a while.

    Another thing to look out for is that PHP versions deployed on various web providers vary, so when someone says PHP 5.3 fixed something that had been totally fucked-up-beyond-belief in the language before that, they might be right, but are you sure you're going to be using 5.3?

    Just look at the release notes to get some idea how bad things have been. I'm not saying that's a fair way to judge the state of the language as of the latest release, but when you see quotations from the past (as recently a just 2 years ago) about how great PHP is, and realize just how horrible PHP definitely was at the time the person said that, you'll realize that most PHP recommendations need to be taken with a shovelful of skepticism.

    That said, if you inherit and have to maintain a PHP project, I wouldn't worry too much about it. Your brain will eventually get used to all the damn dollar signs in the variable names, you will be able to get your job done. I've never been in a position where I could say "It's not my fault, PHP just can't do it" because it always can. There's always a way around PHP's problems and it has never stopped me from accomplishing a goal, but you are going to occasionally be expending more effort than programmers who use normal languages.

    Don't spread it. Don't start new projects in PHP, both for your own sake in case the project grows, and for the sake of whoever comes after you. There are plenty of not-broken languages out there.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  26. You're doing it wrong by Galestar · · Score: 2

    I suggest your whole team takes some course on software architecture and design patterns. Contrary to what you say, .Net does not encourage that - you people simply don't know what you're doing. If you write that kind of crap in .Net I'd hate to see your PHP code.

    --
    AccountKiller