Slashdot Mirror


PHP5 Vs. CakePHP Vs. RubyOnRails?

OldJavaHack writes "If you could start a website (with MySQL for persistence) from scratch and you had a choice of PHP5, CakePHP, or RubyOnRails — which would you choose and why? Things to consider in your decision: 1. Maturity of solution; 2. Features; 3. Size of community of skilled users (to build a team); 4. Complexity/ease of use (for neophytes to master); 5. Greatest strength of your choice, and the greatest weaknesses of the other two. Here is a comparison of capabilities."

99 of 469 comments (clear)

  1. Sure by dedazo · · Score: 3, Funny
    1. PHP: What people build real websites with.
    2. RoR: What people build websites with because they want to be kewl and later switch to PHP when they realize it simply does not scale, complete with acerbic "I wanted to believe" blog entry and everything

    Next?

    --
    Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    1. Re:Sure by Praedon · · Score: 2

      I completely agree. PHP5 hands down.

      --
      Just me
    2. Re:Sure by NickCatal · · Score: 5, Funny

      And the award to the quickest troll in the world goes to......

      --
      -nick
    3. Re:Sure by king-manic · · Score: 4, Funny



            1. PHP: What people build real websites with.
            2. RoR: What people build websites with because they want to be kewl and later switch to PHP when they realize it simply does not scale, complete with acerbic "I wanted to believe" blog entry and everything

      Next?


      Pfft.. Real men code websites in Java and ASP. Scalability and performance are for pussies. My server to chugs at 10 hits/minute and it likes it.

      --
      "There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy."
    4. Re:Sure by Max+Littlemore · · Score: 5, Funny

      And the award to the quickest troll in the world goes to......

      kdawson, for posting this absolute shit as an IT story with nothing more than a link to a wikipedia article in the summary!

      Congratulations!

      Hey, kdawson, while you're reading this, can I just grease you up about a story I want to post about how Steam will replace electricity to power the electric kettles of the future? Thanks buddy!

      --
      I don't therefore I'm not.
    5. Re:Sure by jamesh · · Score: 4, Funny

      Pfft.. Real men code websites in Java and ASP.

      I think Real Men would be more likely to build the web server and TCP stack into their web sites, for performance reasons.

      At least that's what we did in my day.

      *cough*
    6. Re:Sure by dedazo · · Score: 5, Interesting
      I should probably clarify my original post.

      I've never used Ruby or RoR, but my impression of it seems to be one of great expectations and not a lot of delivery. I've read way too many blogs by people who built web sites with RoR only to have them crash and burn under load. Also, the language itself seems to place a lot of importance on clever syntactic sugar, which being an old fart I automatically dislike.

      Now, "scale" does not mean the same thing to everyone. There's Digg and Wikipedia, and then there's the vertical business app that gets 200 hits per day. RoR might be a good choice for the latter, not so good for the former.

      Also, although my experience with PHP is limited as well, it seems to me that it's a mature enough platform with a good runtime (that tends to be confusing at times) and a *massive* user base. The amount of readily available PHP code out there is amazing. It will take Ruby quite a few years to get to that point, I think. So maybe Ruby is not a good beginner's environment, application-wise. But that's just my perception of it. PHP is more to the point. On the other hand, RoR might be more mature and stable than CakePHP, just because it's been around longer.

      The best tool for the job and all that, you know?

      Oh... and BTW, first post =)

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    7. Re:Sure by Bogtha · · Score: 3, Insightful

      PHP is what kids write My First Sites with.

      Seeing as "Our team is familiar with..." plays no part in this decision whatsoever, I'd say that we are dealing with kids writing Their First Site. Or, looking at the peculiar phrasing and noting the date, kids who have just received their first homework assignment for a project that requires them to submit a plan first.

      --
      Bogtha Bogtha Bogtha
    8. Re:Sure by crayz · · Score: 2, Interesting

      Can you describe some of your experiences scaling Rails? I'm currently serving up to 250,000 requests per-day with a handful of Rails apps, so I'm wondering where you hit the breaking point and had to switch to the crapfest that is PHP

      There's no doubt that Ruby and Rails especially are much slower in execution time than comparable code written in PHP. That said, the PHP code would be 2-10x as verbose, take far longer to write, and be far less maintainable. With Rails you just throw more hardware at it and it will scale as far as you need to. If you're running up against real walls in Rails scaling, try Merb. If you're just a PHP n00b who wouldn't know decent OO-code if it punched you in the face, then by all means stick with the Personal Home Page language

    9. Re:Sure by speaker+of+the+truth · · Score: 3, Funny

      And the award to the quickest troll in the world goes to......
      --
      -nick [nickcatalano.com] Wow, I've never seen such an honest troll before. My hat off to you sir.
      --
      Using openSUSE instead of Windows since 9th of October, 2007 and liking it.
    10. Re:Sure by dedazo · · Score: 2, Interesting

      Can you describe some of your experiences scaling Rails?

      I work mostly with ASP.NET, really. Like I said in a later post, I have the impression of RoR being problematic for a lot of people, scale-wise.

      There's no doubt that Ruby and Rails especially are much slower in execution time than comparable code written in PHP. That said, the PHP code would be 2-10x as verbose, take far longer to write, and be far less maintainable.

      That is a tradeoff, of course, and it's really up to each person to decide the merits of a platform based not only on raw speed.

      If you're just a PHP n00b who wouldn't know decent OO-code if it punched you in the face

      No, not really. BTW, 250K hits per day is really not that impressive, especially with a "handful of apps". That's ~3 requests per second. I work with a single vertical application that handles roughly three times that at peak times.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    11. Re:Sure by Cafe+Alpha · · Score: 2, Interesting

      That may change. I'm working on a native code Ruby compiler right now.

      It's based (among other things) on the principle that you can optimize to your hearts content as long as you have the ability to de-optimize running code (and data) when something changes and your optimizations are no longer valid.

    12. Re:Sure by suv4x4 · · Score: 4, Interesting

      I've never used Ruby or RoR, but my impression of it seems to be one of great expectations and not a lot of delivery. I've read way too many blogs by people who built web sites with RoR only to have them crash and burn under load.

      You have the right idea about RoR (speaking as someone who excitedly spent /wasted/ a month learning into it). RoR has some hot ideas but it tries to be too smart and locked down for its own good.

      CakePHP is a typical PHP open source project: random code, bloated, no direction. It's also cool, in a way, but I'd never run big project on it.

      One promising framework for PHP appeared to be Mojavi, but it later stalled and was forked into Agavi. Agavi tends to try to be way too flexible for its own good (unlike RoR), and in the end is just not simple to use. There's just too much stuff in there you'll never use in a real world project, which complicates code understanding and development.

      I also find the "CakePHP vs PHP5" question to not make any sense, I'm sorry.

    13. Re:Sure by Baddas · · Score: 3, Insightful

      You have the right idea about RoR (speaking as someone who excitedly spent /wasted/ a month learning into it). RoR has some hot ideas but it tries to be too smart and locked down for its own good.


      The beauty of Ruby is, even if you don't like it the way they do it, you can always monkey patch it. Open up the object and override the method(s) you don't like.

      Try doing that to the PHP core libs. Better know C, and love it a lot.
    14. Re:Sure by saveourskyline · · Score: 2, Informative

      RoR: What people build websites with because they want to be kewl and later switch to PHP when they realize it simply does not scale, complete with acerbic "I wanted to believe" blog entry and everything

      You might want to check out YellowPages.com, Twitter.com, and OpenCongress.org.

    15. Re:Sure by VirusEqualsVeryYes · · Score: 4, Funny

      this absolute shit [for] an IT story [has] nothing more than a link to a wikipedia article in the summary!
      Not to worry, you will be cured of your tendency to RTFA soon. Welcome to Slashdot.
    16. Re:Sure by dk.r*nger · · Score: 4, Insightful

      I've never used Ruby or RoR, but my impression of it seems to be one of great expectations and not a lot of delivery. I've read way too many blogs by people who built web sites with RoR only to have them crash and burn under load. Also, the language itself seems to place a lot of importance on clever syntactic sugar, which being an old fart I automatically dislike.


      You could, you know, link to those "way too many blogs" and thus let the rest of us decide for ourselves if this is incriminating evidence against Ruby.

      "I read it on a blog" does not in any way imply truth.
      "I read it on many blogs" doesn't really make it much better.

      And until then, you shall remain a troll. After you post the links, you'll have your status upgraded to "person with an opinion, willing to discuss".
    17. Re:Sure by marcello_dl · · Score: 2

      > I've never used Ruby or RoR, but my impression of it seems to be one of great expectations and not a lot of delivery.

      YMMV, as a RAD tool running a vertical app with a mostly normalized postgresql db which was created for the task, it delivered a lot to me.

      Of course the article submitter chooses mysql and website building as a task and the stupid comparison of a language vs. frameworks (no matter how powerful the library of the language, working with a framework is a different matter altogether, with pro and cons). So essentially I'm OT. But your generalization was wrong, so there.

      I Spent almost more time playing with the admin interface out of fun than coding it: plugin used is this. PHP equivalents welcome for a comparison, I never looked for any.

      To people complaining about performance: hey didn't you see the logs of your helloworld rails app? requests per second are there. Rails is slow but you discover it after 2 days, not a month. Give it up if rails features are useless to you or use a faster webserver (lighttpd, nginx all under *nix of course), make custom SQL queries instead of iterating with ruby over AR objects and relations (like you're likely to do when quickly prototyping), cache stuff if your app has lots of reads, experiment with ruby 1.9 which is going to boost performance.

      > I've read way too many blogs by people who built web sites with RoR only to have them crash and burn under load.

      Slow down to a crawl, yes, crash I honestly don't recall. I have great uptime on lighttpd and rails.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    18. Re:Sure by Da+Fokka · · Score: 3, Funny

      You fool! Can't you see kdawson is just an evil ploy by CmdrTaco to become more popular! By contrast, his submissions seem like an insightful breeze.

    19. Re:Sure by dedazo · · Score: 5, Informative
      Sure. Here's a quote from an interview with the guy that created Twitter:

      How has Ruby on Rails been holding up to the increased load?

      By various metrics Twitter is the biggest Rails site on the net right now. Running on Rails has forced us to deal with scaling issues - issues that any growing site eventually contends with - far sooner than I think we would on another framework.The common wisdom in the Rails community at this time is that scaling Rails is a matter of cost: just throw more CPUs at it. The problem is that more instances of Rails (running as part of a Mongrel cluster, in our case) means more requests to your database. At this point in time there's no facility in Rails to talk to more than one database at a time. The solutions to this are caching the hell out of everything and setting up multiple read-only slave databases, neither of which are quick fixes to implement. So it's not just cost, it's time, and time is that much more precious when people can['t] reach your site. None of these scaling approaches are as fun and easy as developing for Rails. All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise. Once you hit a certain threshold of traffic, either you need to strip out all the costly neat stuff that Rails does for you (RJS, ActiveRecord, ActiveSupport, etc.) or move the slow parts of your application out of Rails, or both.It's also worth mentioning that there shouldn't be doubt in anybody's mind at this point that Ruby itself is slow. It's great that people are hard at work on faster implementations of the language, but right now, it's tough. If you're looking to deploy a big web application and you're language-agnostic, realize that the same operation in Ruby will take less time in Python. All of us working on Twitter are big Ruby fans, but I think it's worth being frank that this isn't one of those relativistic language issues. Ruby is slow.

      Is that specific enough for you?

      And until then, you shall remain a troll.

      Would you like some salt to go with your crow? Let me know.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    20. Re:Sure by dedazo · · Score: 3, Interesting

      You might want to check out YellowPages.com, Twitter.com, and OpenCongress.org.

      Well, I "checked" Twitter. Are the authors of the other ones also on record saying the technology they chose fails to scale?

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    21. Re:Sure by LizardKing · · Score: 2, Insightful

      PHP users seem to spend inordinate amounts of time worrying about the latest exploit in the PHP engine, or how easy it is to introduce exploits at the application level thanks to the awful library functions, while RoR users end up mulling over the lack of scalability in their apps once the initial prototype is complete. Meanwhile, "boring" Java apps continue to power large scale systems with increasing reliability and maintainability. Perhaps it's because neither PHP or RoR has the depth of experience or literature on best practices that J2EE now has. That's not to say that things have always been so rosy in the Java world - EJB conventions buggered up a lot of projects until a decent set of patterns were identified and people had bought into the ideas behind lightweight frameworks such as Spring.

    22. Re:Sure by oliderid · · Score: 3, Funny

      Real men don't use web server. Real men reply to HTTP GET requests manually. For security reasons.

    23. Re:Sure by CastrTroy · · Score: 4, Informative

      A bit of advice. Use PDO. Don't use MySQL or MySQLi functions. This will not only make your life a little easier if you ever need to switch database engines, but I also find that it makes doing prepared queries much easier (although it's possible with MySQLi). Being mostly a .Net developer, I find it hillarious and sad that most PHP tutorials recommend using the mysql_ functions, along with mysql_real_escape_str() function for doing database queries. One interface for all databases makes a lot more sense, and using prepared queries protects against SQL injection in a way that trying to remember to use mysql_real_escape in every query can't come close to.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    24. Re:Sure by knewter · · Score: 4, Interesting

      Well, you can get specific like that, yes. But please, follow the story to its completion. The issue was solved, and easily solvable from day one. (For a better solution to the same problem, see this link.)

      I currently write chronically non-scaling Rails apps myself. I can write apps in Rails that scale well, but it turns out there's a huge market for sites that don't need to, and that's where I'm spending some time these days. I've also worked on a nicely-scaling social network site in Rails. There are plenty of tutorials on how to make sure your Rails app scales, but here are the things I'll have to do to my company's custom CMS to make it scale:

      1. Make admins visit the site via admin.site.com
      2. Turn off page caching for admin. requests
      3. Turn on page caching for everyone else, and expire the caches every five minutes

      Oh noes! The horror! Then it's up to Apache to handle pretty much every request. Of course, my use case only has to make static content scale. As long as you're actually writing nice stateless apps on the web, in whatever language, they'll scale. If a given URL has static content across visits, they'll scale insanely well, because you don't Mb>use RoR to serve the site in those cases, you use Apache.

      --
      -knewter
    25. Re:Sure by metalhed77 · · Score: 3, Interesting

      You're totally off base but so is this article.

      PHP is comparable to Ruby or ModRuby. Ruby on Rails is a framework.

      Of course there's no scaling issues with these languages because they're just programming languages. Things like load balancing are something YOU have to take into account as you build your website and manually handle. You can architect things anyway you want, so if stuff fails it's your fault. This means DB transactions, sessions, templating, etc. are all things you have to handle. The language can't be at fault for these things.

      Ruby on Rails is slower for many things because it saves you upfront development time and makes refactoring and adding features a breeze. For many people this is perfectly fine. I write intranet apps for my company in RoR all the time, and it's great. We do not handle many users, but we DO care about getting functionality fast.

      Also, for some ridiculous reason people seem to think that RoR does not scale because an out of the box RoR stack may not scale perfectly (like Twitter). RoR may be slower than a tuned PHP script in some cases, but it scales horizontally just fine.

      Lots of people may think Twitter and say RoR doesn't scale. But what they don't know is that twitter didn't scale because their DB didn't scale to handle that many writes. You can always throw more boxen at rails and get a larger pool of Rails processes to distribute the load to. You can throw Memcached at it to speed up queries as well, but at the time the whole Twitter complaint happened Rails only supported one database connection. This was fixed soon after. The fact is though, that once you have a service with so many reads and writes like twitter, out of the box ANYTHING is going to suck. Rails, however, gained the necessary functionality (Magic Multiconnections) and allows for all the custom tweaks, performancing tuning, and caching you'll need.

      --
      Photos.
    26. Re:Sure by outZider · · Score: 2, Insightful

      There's a tad of a failure in logic there. There are high profile sites written in Lasso as well, but that doesn't make it a serious tool, it just makes it a functional tool. PHP was designed to create pages with logic very easily, and it's being bent in a lot of ways now, which is cool in a way, but there's really no reason why anyone should work that freakin hard. At this point, creating an AJAX enabled site is far easier, and still scalable for a competent admin, with Java, or Perl with Catalyst, or Ruby with Rails.

      --
      - oZ
      // i am here.
    27. Re:Sure by Just+Some+Guy · · Score: 2, Informative

      Crud. I replied to the wrong post.

      Does such a concept protect against SQL injection or not?

      No. That is, it's not the right (and easy!) way to handle it, so you can assume that someone will invent a clever workaround that will defeat your code. Really, just use named parameters and be done with it. It's easier than building your queries by hand and far safer, so there's no reason whatsoever not to do it.

      --
      Dewey, what part of this looks like authorities should be involved?
    28. Re:Sure by tenaciousj · · Score: 2, Informative

      As pointed out a few post up, their problem with database scaling was solved quite quickly i believe:

      http://www.loudthinking.com/posts/3-scaling-to-multiple-databases-with-rails

    29. Re:Sure by GrievousMistake · · Score: 4, Funny

      Sure, just log in, go to preferences -> homepage, and uncheck the box that says 'kdawson'. The slashdot admins will instantly take notice of your preference and kick him of the team, and with any luck you'll never hear from him again.

      --
      In a fair world, refrigerators would make electricity.
    30. Re:Sure by CastrTroy · · Score: 2, Informative

      Sorry to tell you this, but it very much doesn't. First, and not even related to whether it protects or not, is that it very much limits when someone can post to your server. If I need to post my name, and my name is Walter, then your script is just going to die. On the question about how well it works for blocking attacks, well, like mysql_real_escape_str, is what happens when you forget to use it. With prepared queries (not talking stored procedures here, so I don't scare anyone away), it's a completely different method of creating a query, and therefore it isn't very easy to "forget" something, and leave a vulnerability. Also, there's probably a large list of words you could be fogetting to check for. Stuff like "RENAME SCHEMA" may not be in your list, but could cause a DOS attack. You wouldn't lose any data, but your database would be renamed and therefore your site inaccessible to users. Your solution would protect against a common script kiddie, but wouldn't protect against someone who is determined to bring your site down. Using prepared queries is very easy to do, makes your code easier to read and maintain, and also speeds up database access. There really is no reason not to use it.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    31. Re:Sure by Tassach · · Score: 2, Insightful

      You have the right idea about RoR (speaking as someone who excitedly spent /wasted/ a month learning into it). RoR has some hot ideas but it tries to be too smart and locked down for its own good.
      I had the same experience. Right now I'm trying out Catalyst + Mason running under mod_perl.

      Catalyst takes most of the good ideas from RoR and combines them with Perl's TIMTOWTDI philosophy, rather than Rails' "our way or the highway" attitude.

      Mason is a PHP-like templating language for Perl.
      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    32. Re:Sure by nuzak · · Score: 2, Informative

      > Does such a concept protect against SQL injection or not?

      DROP TABLE Customers;

      You also forgot to enumerate every stored procedure that might be callable, or guard against injecting unauthorized columns in those really dynamic queries that specify columns as parameters.

      Bound parameters protect against SQL injection without having to interrogate every bit of SQL and praying that you covered every attack. With bound parameters, something that real DB APIs have supported from day 1, you don't need goofy hacks like this. Even PHP supports them for a few databases now, I think.

      They're also faster and actually easier in the long run. Really, it's only PHP and the early-90's VB folks that even have to be told this sort of thing. Everything else got with the program long ago.

      --
      Done with slashdot, done with nerds, getting a life.
  2. ... Robots in disguise ... More than meets the eye by poopdeville · · Score: 3, Funny

    Great, a link to a wikipedia article. Wonderful.

    --
    After all, I am strangely colored.
  3. Isn't this just asking for flamewars? by Anonymous Coward · · Score: 2, Insightful

    This seems to be yet another kdawson story which exists to solely promote the "my X is better than yours" bashing, trolling and flames that always seem to follow these stories. Come on, can we get a new editor already?

  4. Brrrr... by jfclavette · · Score: 2, Insightful

    I can't comment on Ruby on Rails, but PHP (yes, even PHP5) is such an horrible language. Yes, it's widely available and is pretty much the only option out there for free/cheap hosts, but I just don't understand why someone would choose to use it in any serious project.

    JSP and ASP.Net (Yes, I know, this is Slashdot) are, IMHO, much more much more powerful and pleasant to work with. If I had to pick amongst the proposed solutions, I'd pick RoR if only for the fact that Ruby is a nice language. I don't know about Rails' features but I could at least trust the language it's built on.

    1. Re:Brrrr... by Baddas · · Score: 4, Insightful

      JSP and ASP are terrible compared to rails. You really ought to pick up Agile Web Development with Ruby On Rails and go through the sample project at least.

      It'll change the way you think about development for the web.

      Or, if you're really set on Java, try Rails for Java Developers and you'll see how much more concise the exact same code is in Rails.

    2. Re:Brrrr... by @madeus · · Score: 4, Insightful

      Compare a straightforward Java class, with try/catch (a silly example, but obviously just to provide some syntax):

      public class DoStuff {
          protected double someNumber;

          public setSomeNumber( double number ) {
              try {
                  someNumber = number;
              } catch (Exception e) {
                  // See e.getMessage() for error
              }
          }
      }

      ... with some PHP for the same code, which would look like this:

      public class DoStuff {
          private someNumber;

          public setSomeNumber($number) {
              try {
                  $this->someNumber = $number;
              } catch (Exception $e) {
                  // See $e->getMessage() for error
              }
          }
      }

      I don't see how that's wacky syntax in the slightest. Just people people use PHP like it's Perl+Mason doesn't mean you can't use PHP for serious, scaleable, enterprise software. I know from experience that people are just as likely to write nasty Perl, Ruby or ASP as they are nasty PHP.

      Personally I think Java makes it more difficult to be wacky (even though of course it can't force people to write code that's ultimately good) and that has definite benefits in an enterprise environment, but that lack of flexibility (which scripting languages like Perl and PHP have) is also why I don't tend to want to use Java.

    3. Re:Brrrr... by Anonymous Coward · · Score: 2, Insightful

      The problem with java is not the coding, it is the ridiculous amount of hassle you get in deploying multiple apps on a single server. Having to change XML config files buried in archives, ClassLoader problems because two apps need to use the same (or different versions of the same) library. Stupid hassles when versions upgrade which serve no real purpose (moving classes from java.what.ever to javax.what.ever).

      Java is great if you work on a single application with its own hosting environment, if you need multiple websites or webapps it quickly becomes a configuration nightmare. I think that is why a lot of experienced java developers seem to really like Ruby, because right now configuration is the single biggest hassle in the development of java websites.

    4. Re:Brrrr... by BladeMelbourne · · Score: 3, Insightful

      RoR is a framework, you can't fairly compare it to PHP, which is a language.

    5. Re:Brrrr... by shutdown+-p+now · · Score: 2, Insightful

      JSP and ASP are terrible compared to rails.
      In speed of development, yes. But what about perfomance, scalability, and reliability? How about amount and quality of available documentation?
    6. Re:Brrrr... by doktorjayd · · Score: 2, Interesting

      hmmm

      jsp as a presentation layer is fine. particularly for the i18n and heaps of readily available tag libraries which you simply include and scope.

      java as a platform for web applications should really be always said as 'java is THE platform for web applications'.

      once you step away from the 'type 1' or pure jsp ( or asp, or php ) apps and enter 'type 2' or MVC frameworks, your systems development gets a lot faster, more modularised and much more maintainable.

      try struts, springMVC or any of the dozen or so high order open source MVC frameworks. watch JSF mature over the next year or 2.

      scalablitly, speed, and available pool of talented developers... why on earth would anyone go php? ( case in point.. how many bank web systems are php based? )

    7. Re:Brrrr... by jrumney · · Score: 2, Informative

      Having to change XML config files buried in archives

      That would be a problem with a specific application's packaging, nothing to do with the language that was used to code it.

      ClassLoader problems because two apps need to use the same (or different versions of the same) library.

      J2EE specifies application specific library directories, which is how you should be deploying them. If you are deploying your libraries into a shared directory and modifying the classpath, then it is you that is at fault, not Java.

      Stupid hassles when versions upgrade which serve no real purpose (moving classes from java.what.ever to javax.what.ever).

      What version upgrade moved something from java.what.ever to javax.what.ever? I've seen packages move from com.third-party.what.ever to javax.what.ever when they were accepted as a standard library, but never something incompatibly moving within the java/javax namespace.

  5. Rails by Baddas · · Score: 4, Interesting

    I've worked in all three, repeatedly, and there's really no contest. Rails is so much easier to get concepts out, and has so many fewer bugs (in my experience), that it's silly to use PHP at this point, unless you have overriding reasons for choosing it aside from inherent qualities.

    1. Re:Rails by astrotek · · Score: 2, Insightful

      ror is good for concepts but I haven't seen any good examples of it in production.

  6. Errr, this is a new story by Anonymous Coward · · Score: 2, Informative

    This is more an ask slashdot post. And even so, CakePHP and RoR are frameworks while PHP is a language.
    That being said, CakePHP is fantastic and for anything past simple scripts, I am finding CakePHP speeds up development greatly.

    1. Re:Errr, this is a new story by corychristison · · Score: 4, Insightful
      I agree.

      Lately people (aka: script kiddies) seem to be losing the distinction between what is a language, and what is a framework. I cannot remember the last time I downloaded a PHP script and it required PEAR. I absolutely despise PEAR, and all other frameworks that really don't seem to have a place.

      Over the past 5 years or so (I develop websites for a living) I've developed a framework-style setup that I use for all new projects. Most sites don't share the same code as I develop project-specific. But the structure is the same, and in most cases I could grab a pile of files from one site and plop them in the next and it would work.

      Use the tool as it is meant to be used. PHP is a language. A framework is a framework. Please don't compare them on the same level.

    2. Re:Errr, this is a new story by RegularFry · · Score: 2, Insightful

      Use the tool as it is meant to be used. PHP is a language. A framework is a framework. Please don't compare them on the same level.

      Except that in this case, the comparison is valid. PHP without a framework is, if you will, the null framework. Its advantages are that there is no learning curve, deployment is trivial, and there's no runtime framework overhead to heat up your CPUs. On the other hand, it doesn't help you at all in writing the app, and once your site gets beyond a certain size you'll probably end up writing a framework anyway - as it sounds like you've done, after a fashion.
      --
      Reality is the ultimate Rorschach.
  7. Doesn't it depend on what you intend to do? by javakah · · Score: 4, Interesting

    There are different things that you can do with a website, so first of all it really depends on what you are intending. PHP5 will be great for building creating more traditional websites that are driven by HTML forms, and is probably the best thing to use for such purposes. Ruby on Rails seems to be meant for if you are planning to build AJAX apps. It's fairly easy, with a lower learning curve, but does have scalability issues. Another option that you might consider if you are looking for AJAX stuff would be GWT, the Google Web Toolkit. Larger learning curve, but very fast web apps. Really though, comparing PHP5 and RoR seems kind of like comparing apples and oranges. Just remember, figure out what you are trying to do first, then pick the language.

    1. Re:Doesn't it depend on what you intend to do? by AaronBrethorst · · Score: 4, Interesting

      I disagree. Rails is fantastic for quickly rolling database-driven forms apps. It includes some nice helpers for quickly integrating asynchronous behavior (Ajax), but it's certainly not mandatory. PHP5 doesn't include an OR mapper, and nor should it; an OR mapper should be part of a separate framework or library (just as it is with Ruby and Ruby on Rails). I think that Rails actually has a fairly steep learning curve. It has *very* specific ways of handling most things, and trying to fight against these things will only come back to hurt you in the end. Additionally, since it requires you to function in an MVC mode, there might be an additional bit of learning present as you figure out how to properly separate your app into presentation, model and controller layers.

      At the end of the day, it all comes down to need and experience. If you know how to use PHP, why not use it? If you have to integrate a new feature into an existing Rails app, then you'd better learn Rails in a hurry. Personally, I'll build Windows server-targeted web apps in ASP.NET because I know the tooling and the backend. If I'm hosting on Linux or UNIX, I'll write it in Rails because the language and frameworks are so much nicer to use than PHP.

      --
      No, but I used to work for Microsoft.
    2. Re:Doesn't it depend on what you intend to do? by misleb · · Score: 2, Insightful

      Rails for Ajax stuff? There are WAY better reasons for going with Rails than to get Ajax. A proper MVC framework, for starters. Rails is really meant for building *applications,* not necessarily "sites." If you can frame your site as an application, great, but don't expect Rails to power (well) just any old site.

      And, yeah, comparing Rails to PHP5 is kinda dumb because Rails is a framework and PHP5 is a language. The problem with using "PHP5" in any non-trivial application is that you invariably end up building your own framework(s) which can be a huge time sink. Now, comparing Rails and CakePHP would make much more sense. I haven't used CakePHP, but it looks like it has all the major framework features that Rails has. Though being based on PHP is a huge handicap, IMO. PHP is just kind of a dumb language... at least compared to Ruby. Ruby is just an awesome little language. If only it were faster. :-/

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  8. the answer: it depends by david_bonn · · Score: 5, Insightful
    Honestly, great websites and web applications have been written using all three of those products. What the best choice for your website will be depends a lot on what your website is. Each of those frameworks makes certain assumptions about how the world works, and you will be happiest with a framework that is closest to your pwn assumptions -- otherwise you'll spend as much time fighting the framework as writing your website.

    Any halfway skilled programmer will be able to do useful work with any of those frameworks fairly early on, but all of them are also very rich environments, so there's always more to learn.

    I've written web apps in an ungodly tangle of PHP4 and PHP 5 and Perl and using Ruby on Rails. Currently Ruby on Rails is in favor, but is far from perfect.

    Probably most of my frustration with Rails and PHP 5 has to do with Active Record. My big gripes are: (1) Schemas, entity-relationship diagrams, and queries tell me how an application works -- with Active Record this information is strewn across a whole bunch of files (especially in Rails); (2) Database-independence is a nice idea, but in reality, how often over the lifetime of your website will you migrate to a different database? Usually your database is chosen for you. Usually a switching databases involves coordinating with a lot of people who you'd usually rather not have to deal with -- those issues will take far more time and energy than differences between MySQL and Oracle; (3) a pretty common design pattern for web pages is to have a form that let's you fill in a few parameters (date, maybe geographical information) into a huge multi-table select statement -- you can do that in Active Record, but basically all you gain is a marginally fancier wrapper than you would have with DBI.

  9. Focus.. by August+Lilleaas · · Score: 3, Interesting

    May I remind you all of this:

    http://www.flickr.com/photos/planetargon/1279842 54/

    Yes, that's the creator of RoR talking about what he feels about other people not liking his framework. RoR is all about pretty code, if you don't like RoR, use something else.

    So, that sorted that out. Now, troll!

  10. Django by son+of+a+submariner · · Score: 2, Informative

    Django anyone ?

    --
    Son of a submariner ! They'll pay for this...
    1. Re:Django by daeg · · Score: 2, Informative

      And Django isn't limited to blogs, wikis, etc. I run a complete medical management (medical record, inventory, staff tracking, chart/lab tracking, third party medical equipment integration) on Django quite happily out of 20 (and growing) offices across the states.

      The only negative side is the lack of Python developers. I've found a handful around here (Tampa) but they seem to be a rarity. I can find a few Ruby developers, but their extent of Ruby is only RoR tutorials, it seems.

  11. Easy by OriginalArlen · · Score: 4, Informative

    PHP5 Vs. CakePHP Vs. RubyOnRails? Easy - mod_perl.
    --

    Everything I needed to know about life, I learnt from Blake's Seven
    1. Re:Easy by Llarian · · Score: 2, Informative

      http://www.catalystframework.org/

      Catalyst is mature, activly supported, and being used in a lot of locations. (Sixapart's Vox being the largest example)

      So, no, we haven't been pushed out of the web market by other lauguages. Thanks for asking. =)

      (There's Jifty too, but I have no person experience with it)

  12. Django by Max+Romantschuk · · Score: 5, Informative

    Given complete freedom, my choice is Django: http://www.djangoproject.com/

    Check out the tutorial, and you'll know why: http://www.djangoproject.com/documentation/tutoria l01/

    --
    .: Max Romantschuk :: http://max.romantschuk.fi/
  13. Wrong Criteria, Wrong Problem, Wrong Solution by jaaron · · Score: 5, Insightful

    What about the requirements of the, you know, actual website application?

    You've provided no information on the actual website that you intend to develop. That's the important part -- the features and functionality to the customers and end users.

    Instead of considering the features of the language and framework first, how about the features of the application? How many users? Who will be supporting it? What kind of server resources are available? Do you need internationalization? What's the roadmap for the site over the next 3 to 5 years? Maybee then you can map the features of the website to the features of the framework or language, such as the maturity of the libraries directly related to your webapp.

    But picking the implementation language independent of the functionality of the website is a classic sign of solving the wrong problem. I don't care what you program it in, if you're asking these questions first, you are programming it in the wrong language.

    --
    Who said Freedom was Fair?
  14. Tapestry by Anonymous Coward · · Score: 4, Insightful

    Or another Java framework, due to the maturity, scalability, availability of libraries, and number of people who know it.

    Rails just does not have a stable server. Webrick + fastCGI, or Mongrel, they both crash regularly for us. Also I've had to maintain several Rails apps written by others, and it sucks. All those neat tricks that makes it "productive" for the first programmer makes it difficult to understand and maintain for everyone else.

    1. Re:Tapestry by whatever3003 · · Score: 2, Interesting

      dear god no. Tapestry is a pile of poo and should be skirted if ever come upon.

      I work day in and day out with this spectacularly under-documented, over engineered, verbose, often incomprehensible, brittle framework. While it is possible to do most web development you can think of in it, and it does go to great lengths to provide elaborate abstractions for the mundane tasks of forms, validation, widgets (components), parameter passing and so forth, these abstractions are often leaky and not at all extensible. This is a framework for Java enthusiasts only.

      My biggest gripe is that it is ugly ugly ugly. From the sparse documentation, to the vague naming conventions, to the horrific url's that are generated, it's even an embarrassment to have it staining my resume.

      Take a dip in the Django pool and then compare the two. Django will redefine any web developers ideas on how things should be done and how well they can be done.

      www.djangoproject.com

      --
      "Those who do not want to imitate anything, produce nothing." -- Salvador Dali
  15. Python and Django by egrinake · · Score: 4, Informative

    How about using Python and Django? Python is a much cleaner language than both PHP and Ruby, and Django makes it a joy to build web-sites.

    I've been lead developer of a large enterprise system written in PHP for the last few years, and grown increasingly frustrated with just how ugly PHP is. Object-orientation has been tacked on as an after-thought (almost all of the API is procedural, without using exceptions for error-handling), the API is messy and inconsistent, it's somewhat inefficient (has to parse all the code for each request, unless you use an opcode cache), and the syntax is just plain ugly when compared to Python.

    Never tried Ruby on Rails, but you should at least give Django a spin before deciding.

    1. Re:Python and Django by August+Lilleaas · · Score: 3, Funny

      Python is a much cleaner language than both PHP and Ruby

      ...said egrinake, the God that Decides Which Language that Rocks More.

    2. Re:Python and Django by ubernostrum · · Score: 2, Insightful

      Only a python fanboy would call python "much cleaner" than ruby (come to think of it though, one area where python does win big is in sheer quantity of fanboys...

      Yes, damn that Python. I mean, Ruby is so much cleaner. In Ruby, everything's an object! Wait, no, that's true in Python too. But in Python you have to prepend self to talk about an instance variable, that's ugly! Oh, wait, Ruby uses @ and has self for some cases, too. Hm. Well, Ruby's got all that metaprogramming goodness, surely you can't do that in Python! Er, no, forgot about __metaclass__ (which, by the way, doesn't have an equivalent in Ruby -- you have to monkeypatch the class object after it's created), never mind on that one.

      Etc., and so forth. Only a "fanboy" would proclaim one language or the other as being inherently superior; in the long run, the biggest difference between the two is idioms (the languages themselves are remarkably similar once you discount superficial syntax differences; see, for example, Python "fanboy" Alex Martelli explaining how Ruby and Python are far more similar than different). And in doing so you've tipped your hand.

    3. Re:Python and Django by Richthofen80 · · Score: 2, Interesting

      almost all of the API is procedural,

      You're right, but is this necessarily a bad thing?

      The web itself is procedural. Unless you're a sadist, web applications are broken out into different URIs that handle different part of the applications. Administration functions might be in myapp/admin ... and I break up each edit/add/delete into its own .php file. This way, it is inherently clear what the purpose of each file/URI is, and the functionality doesn't bleed over into 50+ deep include'd files so you have to search forever to find what you need. Especially if you're a small staff with a big project, I find that encapsulating the code for the specific job ends up being procedural on the web. The web is stateless so even if you have time to populate some decently complex object, you have to manually persist the object through later requests.

      The only time I've found the web not-so-procedural is with shopping carts. Carts tend to be the kind of thing where an object makes sense $Cart->AddItemToCart(productID); makes sense to me. But on the other types of pages, like web reports, login screens, administration screens, etc? that stuff seems to be a simple branch: if POST, update database fields that map to form fields. If not, show database fields in form fields.

      --
      Reason, free market capitalism, and individualism
    4. Re:Python and Django by nuzak · · Score: 2, Interesting

      The web itself is procedural. Unless you're a sadist, web applications are broken out into different URIs that handle different part of the applications.

      Sounds functional to me. Throw the inherent statelessness of the protocol on top for a bonus.

      --
      Done with slashdot, done with nerds, getting a life.
  16. PHP5 by mrjb · · Score: 2, Funny

    ... because I know it and I know it does the job. Also saves me the work of figuring out what CakePHP and RoR is.

    --
    Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
  17. In other words... by jaaron · · Score: 4, Insightful

    I've never used Ruby or RoR... my experience with PHP is limited as well...

    In other words, you were trolling. :-)

    Having done websites in PHP, Rails, Python and Java, I can say that they all suck one way or another. Ruby and Rails are both very different from PHP and my personal unconfirmed suspicion is that a lot of the Rails problems people have are from programmers who jump over into Rails without first learning what they're getting themselves into. Deploying Rails can be very difficult and you can face a lot of issues that you would never face for PHP.

    Personally, I prefer Python or Ruby over PHP any day.

    --
    Who said Freedom was Fair?
    1. Re:In other words... by dedazo · · Score: 4, Informative

      In other words, you were trolling.

      Nope. I know enough about high-scaling distributed applications to be dangerous, since that's what I do for a living. I know PHP runs sites like Wikipedia and Digg, among others. I know I've never seen a blogger go on record to complain about PHP not scaling as he expected, while for RoR that sort of thing seemed quite common in the last year and a half or so.

      Yes, your execution can suck and so it won't really matter what language or stack you use. But the impression I have of RoR is that it falls apart a lot faster than PHP under comparable loads. Maybe the crappy internal design PHP suffers from might be an advantage in this case, because Ruby is designed better but it seems to suffer from classic bottom-heavy OO problems you see in other languages.

      Ultimately the person who submitted this might be building an accounts receivable app at a little company that gets three hundred hits per day, so it won't really matter if he writes it with Ruby, PHP or Malbolge.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    2. Re:In other words... by SQL+Error · · Score: 2, Interesting

      Nope. I know enough about high-scaling distributed applications to be dangerous, since that's what I do for a living. I know PHP runs sites like Wikipedia and Digg, among others. I know I've never seen a blogger go on record to complain about PHP not scaling as he expected, while for RoR that sort of thing seemed quite common in the last year and a half or so.
      PHP doesn't scale at all. It's a shared-nothing system, so whatever scaling issues you run into are, by definition, nothing to do with PHP itself; they're Apache issues or Linux issues or MySQL issues.

      I use CherryPy, which can be run as a shared-nothing system under Apache or as a standalone multi-threaded server. I haven't used Rails, but I believe it offers the same choice. If so, people running into Rails scaling problems simply weren't using it appropriately.
    3. Re:In other words... by Foofoobar · · Score: 5, Interesting
      I ran PHPulse, the world's fastest MVC framework for PHP with a 10 terabyte database backend gets millions of hits daily and having to send data to our team in Manila and Tijuana. PHPulse gave us near split second page loads. As for not scaling, tell that to all the companies like Disney, IBM, AT&T, MTV and others who use it on their frontend. It's the most widely deployed web language out there and there is example after example after example of it scaling.

      Hell, even the Ruby, and Ruby on Rails site http://shiflett.org/blog/2006/feb/php-easter-eggs> need PHP in order to scale

      --
      This is my sig. There are many like it but this one is mine.
    4. Re:In other words... by nuzak · · Score: 2, Informative

      I think the only languages you can really call "shared-nothing" would be ones like Erlang or Occam -- otherwise, it's an attribute of an architecture, not a language. PHP has built-in support for sessions, which have a larger scope than the interpreter itself. That's shared-something all right, and it kills scalability real good if you don't invent your own session management stuff on top of PHP's built in nonsense.

      I hate PHP with the power of a thousand suns, but scalability isn't one of the reasons. It's just a not very good language (to put my opinion mildly) but it has the library support for enough things from memcached to mqseries in order to build decent and very scalable architectures on. The execution speed of the language is usually adequate, at least for most apps that fit in its domain. It's other pieces of an out of the box LAMP architecture that usually fail: running apache in prefork mode is, for example, not one of the wiser scaling decisions to make.

      --
      Done with slashdot, done with nerds, getting a life.
  18. Have your cake/php/rails and eat it to by jalmond · · Score: 4, Insightful

    What we have here is another usual question that all really depends on your project type. That being said, I'll try to break from the typical, slashdot format and attempt to address your question:

    1. Maturity of Solution: 1st PHP5, then Ruby, then Cake. Shouldn't be a lot of controversy here. PHP has been around since the dinosaur age, ruby came around with all that slick don't repeate yourself talk and then cake came about and tried to add ruby like framework to PHP.
    2. Features is really going to depend on what your looking for. Rails allows you to write a lot of fairly complex stuff quickly, cake arguably has better built in security, PHP5 will scale better then any of them.
    3. Everybody and their mama knows php5, any new kid thats worth a darn is probably learning rails, and then there's cake, which has nowhere near the dev support of the other two.
    4. Rails wins here if your starting from scratch, but since so many devs already have php experience, complexity becomes sort of relative.
    5. For better or worse, if you were to poll most devs that are building commercial production apps (at least out of the three options mentioned) php5 is going to win hands down. For my company it was a simple decision that hinges on two of the points: scaling and experience. We wanted something to scale to slashdot numbers, while being able to hire a bunch of kids from college to help the dev team build it all. Typical of online startups, we wanted the most bang for the bucks, and php5 was the choice.

    P.S. A similar question of Rails vs PHP vs Java question was somewhat subjectively discussed late last year http://www.cmswire.com/cms/industry-news/php-vs-ja va-vs-ruby-000887.php

    --
    Travature.com: Hello...World
  19. Snakes and Rubies by hitchhacker · · Score: 2, Informative


    There was a good video, although outdated (2005), that had two of the main developers of Django and RoR. The video is quite long (3hrs), so I'll link to the Google Video Search. The second and third are each person's presentation, and the fourth, which I recommend, is a Q/A session.

    -metric

  20. Re:the answer: it depends by Bluesman · · Score: 2, Insightful

    "but in reality, how often over the lifetime of your website will you migrate to a different database?"

    If you told me I could pick either the database to use or the scripting language to code in, I'd pick Postgresql and let you pick the language. Most of the things people try to do in scripting languages can be handled in the database much more elegantly and scalably. Of course, most people don't realize this because they've only used MySQL and don't realize how much it's missing.

    If you told me I could pick both, I'd go with Perl, unless I were doing something very simple that's been done a thousand times before.

    PHP is decent enough for what it is. Historically there have been security problems with it, and the design is crappy. But it's quick and easy.

    I've never used Rails, but it sounds like it does a lot for you. In my experience, that can be a blessing if you're doing something textbook. If not, have fun fighting with the assumptions other people made.

    --
    If moderation could change anything, it would be illegal.
  21. Re:with MySQL, eh... so much for having a choice by greg1104 · · Score: 3, Interesting

    I recently finished a long comparison of PostgreSQL and MySQL in the context of mission-critical data that gives a lot more detail on the issues you bring up here.

  22. Re:Django - Fourthed by hpoul · · Score: 2, Informative

    imho django is really the easiest web framework to develop in.. It's ORM is flexible and powerful but compared to hibernate & co so much simpler that it is just shocking ..
    i have developed in perl, php, java (webwork with hibernate and IoC containers and what-not) but with django you can get things done much faster and get cleaner results..

    (and some self-advertising - look at my project http://sct.sphene.net/ - forum & wiki applications based on django)

    --
    Find me at http://herbert.poul.at
  23. Dive into Python by hitchhacker · · Score: 3, Informative


    Whether it's Ruby on Rails, or Django, most developers will have to learn a new language. Python has a book available online: Dive into Python. I found it very easy to switch from C/C++/PHP to python. Django does have a slight learning curve though. Oh, and be aware, the Django documentation online is for their SVN version! Most likely NOT your distro's version. They are still under heavy development.

    -metric

    1. Re:Dive into Python by ubernostrum · · Score: 3, Informative

      Oh, and be aware, the Django documentation online is for their SVN version!

      Well, you can start the tutorial here for the SVN version, or you can read the big warning at the top of the page which links to documentation for the various releases, and find:

      So long as you can read large text at the top of every page, and click clearly-offered links, you can read the documentation for dev version, or for any stable release we've ever done.

  24. It makes little sense to say Rails doesn't scale.. by patio11 · · Score: 4, Insightful

    ... when the complaint is similar to "PHP is a really cruddy language to write a graphics driver in". This is true -- using PHP to write a graphics driver is like attempting to change a car tire with a banana, but thats hardly a knock on PHP, its just a mostly banal comment on choosing the right tool for the job. What Rails excels in is choosing the right job for the tool -- given that you have Rails, you now know with pretty good certainty that you can bang out a CRUD site in your target vertical of choice on a very nice timescale while still being feature-rich. That is a really, really nice feature for a platform to have for small software houses.

    Granted, I wouldn't write Digg in it, but *I'll never write Digg in anything*. Neither will 99% of the world's programmers, and for the 1% that are making social networking sitse with desired user numbers the size of nation states, they have the LAMP stack and God bless them for it.

    As for me, I've got one quite profitable desktop application written in Java (folks laughed at me for that -- what can I say, it got the job done) and am having a bloody ball working on a small business vertical app which, at $15 / account / month and low predicted need for users to interact with the app, would replace my day job income at about three dynamic page hits per hour. I have this funny feeling that Rails will scale that far.

  25. If you've used Rails, then CakePHP /hurts/ by MBoffin · · Score: 3, Insightful

    Sorry, can't say much more than that. If you've never used Ruby on Rails, I'm sure CakePHP would be a joy to work in. However, if you've used Ruby on Rails, then CakePHP will hurt. The Ruby language is beautifully suited to this kind of framework, and PHP is not.

    This is not to knock CakePHP. In its own right, CakePHP is an excellent framework and a lot of quality work has gone into making it what it is. It's a powerful framework.

    The move to this kind of framework can be quite a mind job, whether you're moving to Rails or CakePHP. It requires breaking down very solid foundations of ideas that you've built up over the years on how to build a web application. If PHP is your thing, then weathering that mind job will be all the more easier if you're doing it in a language already familiar to you. But if you're willing to try something new, then it's worth making the jump to Ruby on Rails.

  26. Django. by imbaczek · · Score: 2, Informative

    They all suck anyway, django IME sucks the least.

  27. Nriyh by Anonymous Coward · · Score: 2, Informative

    Well I guess it depends what you are building. Ruby on Rails is certainly a fun framework to work with. The trouble is Ruby itself is painfully slow (see http://shootout.alioth.debian.org/ for data on this) and doesn't get Unicode. So if you're site is going to do anything large or international it would be a poor choice. If not then RoR is a lot of fun - go for it.

    PHP. People do build large apps in PHP. Having used it quite a bit it remains a mystery to me a)how and b)why. Its ugly and handles state poorly - a disaster for a web language in my view.

    Alternatives. Both Java and ASP.NET make sense for large scale applications. Beyond that it depends a lot what you're doing. I would tend to plump for Java since I like being able to pick the right framework for the job I'm doing - so for instance if I'm building a high traffic web app I'd probably go for Struts, if I was building something that needed to be more desktop like I'd probably go for JSF with Seam, and if I was after lots of Ajax bells and whistles I'd probably add GWT into the mix. I also like the richness of the Java toolbox (being able to use JMS to talk to MQ for instance, applets on the client side for certain specific duties), and the Java tools (notably IDEA) are world beating.

    1. Re:Nriyh by Qbertino · · Score: 2, Insightful

      PHP. People do build large apps in PHP. Having used it quite a bit it remains a mystery to me a)how and b)why. Its ugly and handles state poorly - a disaster for a web language in my view.

      It's difficult to understand, since PHP combines the quirkyness of Perl with the syntactic bloat of Java and does have some other shortcommings. However, it handles all web stuff very gracefully. Tons of functions in PHP are built to handle the everyday shortcommings the WWW Inet-service brings along. And they are all come in the box without any classpath or you-need-this-seperate-servlet-running-to-handle-m e crap. Oneliners convert objects to HTML characters, walk arrays or connect to a database. The God-Datatype in PHP is the PHP Array - compareable to Pythons dictionary - and offers tons of functions to handle them and do neat stuff to arrays fast. Despite (or because?) some 300+ core functions it's extremely newbie friendly - no need to add any libs or stuff just to halfway deal with webstuff. There-is-more-than-one-way-to-do-it applies to PHP as much as it applies to Perl, without PHP bugging people with a to terse but arcane syntax.

      PHP is the king of all SSI solutions because it's built for exactly that sort of task and nothing else. That's why the most successfull, non-trivial web applications are built with it. It's the best tool for the job, plain and simple.

      --
      We suffer more in our imagination than in reality. - Seneca
  28. language, framework, framework by fozzmeister · · Score: 5, Informative

    PHP5 is a language, the other two are frameworks. So it can't really be compared. The Zend Framework is a very non-limiting non-rigid framework (it's much more like a bunch of really good libraries atm) which might make the comparison viable.

  29. Uh .. if you're comparing frameworks by aderuwe · · Score: 2, Informative

    If you're mostly comparing frameworks anyway (CakePHP and RoR are frameworks, PHP5 is a language) just substitute symfony for PHP5, and the answer becomes clear: use symfony... The best of PHP5 with the best practices of RoR - just make sure to use an opcode cache because symfony is not the most light-weight.

    Scalable, and loads of fun to program with.

  30. Perl advocates should try CATALYST by jorgegv · · Score: 4, Informative

    I find it strange that nobody yet has given a reference to Catalyst, the best MVC framework for Perl. From people that have tried both (not me), it is said to be the equivalent of RoR for Perl. I can't back that because I'm a perl monk and I don't have time for yet another language (what for, when you have already tried the best language ? ;-)

    Application skeleton and database CRUD in 30 seconds (measured!!!). Try it.

    --
    Reality is a mass hallucination due to lack of alcohol in blood. - DeadLiver
  31. Generate everything on the fly by alexibu · · Score: 2, Interesting

    The paradigm of having web pages that you serve, and that are actually files on the server only works for a short time. Mixing any of these inline scripting languages into the HTML document stinks IMO.

    As soon as your website is a bit dynamic you are better off generating everything on the fly.
    You can describe content with databases and xml and CSS and then have your server generate actual pages from that.

    I personally use c++ cgi scripts to generate all pages, as I need to do some computationally expensive crunching as well. Why learn a dodgy scripting language when you know how to do it properly anyway ? As soon as you need to do something different or slightly complex all these scripting languages start to become painfull and you need to start augmenting them anyway.

    I realise that I am not a cool web developer, and there are potential security problems with using compiled languages, but this works well for me.

    Alex

  32. Symfony (PHP 5 Framework), Notes on other Webkits by Qbertino · · Score: 4, Informative

    As many have pointed out allready, PHP (incl. PHP 5) is a subset of CakePHP, as it is - Tadaa! - a PHP Framework. So if you run Cake on PHP 5 (it runs on both PHP 4 and PHP 5) then you've got both.
    There are a lot of Frameworks recommended here, such as Django, Turbogears and others. They are all very neat. I'd like to add Zope (or it's superset Plone) to that list as it is the oldest and most mature of all these neat OSS Webkits.

    Rails is the first project that emphatically applied marketing tactics to make itself popular, thus the extreme hype surrounding it and the potential critical mass it has gained. It's simular to the hype Zend is putting behind it's Zend Framework right now. Which is also way overhyped with bold claims despite being less than a year old. However Rails is *not* the Framework that invented or first implemented MVC, Scaffolding or all the other concepts associated with it.

    A Webdevelopers 2 cents.

    Feature, concept and technology wise Zope (built with Python) is still unmatched by any other Framework or Appserver available, be it in Python, Ruby, Java or whatever.

    CakePHP is a good Framework - I'm using on PHP 5 it just now to build a larger custom CRM System - and the community is fun (no Forum - we all hang out on IRC) but I recommend Symfony, as it is built entirely on PHP 5 no extra work added for PHP 4 compliance, covers aspects of it job by integrating existing Projects such as Creole and Propel for the DB stuff and it has very good documentation. Including a very well written Book (free PDF version available). Symfony is mature and has been successfully used in very large scale Projects (Yahoo Bookmarks is built on it).

    Bottom Line: I'd be carefull not to blindly follow the rabid hypers of Rails or their fresh PHP equivalent, the Zend Framework bandwagon crew. Check out the Frameworks people have mentioned here and if you want to stick to PHP 5 Cake or Symfony are both fine choices.

    --
    We suffer more in our imagination than in reality. - Seneca
  33. PHP beats RoR on deployment by dankelley · · Score: 3, Insightful

    A key issue, in contrasting PHP with RoR, is deployment.

    Deploying PHP is easy in most environments, perhaps as much because of its age as because of its inherent character. I work in an academic environment, in which all professors and students have the ability to make PHP sites. Each of my personal computers also lets me make PHP sites with no difficulty. Deployment amounts to no more than a file copy, perhaps with a change of file permissions. (I won't mention the database work, because of course it is the same for all schemes, PHP, RoR, etc.)

    But, unless you're using a host that has been set up to server RoR, deployment may involve changing Apache configuration files, compiling new Apache modules, etc. Such changes require root access (not available to folks sharing machines), and have the potential to break the other sites on the machine.

    I think there is a reason why the RoR tutorials, books, and promoters so seldom mention deployment: it is difficult for many people in non-commercial environments that are not set up for RoR.

    Oh, and one more thing. All of this fiddling with apache is boring to those who have set out to create websites. Learning Ruby to do RoR is quite fun, actually, and it has the advantage that it lets you use Ruby for other tasks as well. But learning apache doesn't help you with anything but apache; it's a bit of a single-lane road.

    RoR has a sort of elegance about it, and you gain a great deal of functionality from the system (e.g. for logins, etc.), and so it is a terrific tool for rapid development, particularly of an evolving idea for a site. It sounds crazy, but the optimal path may be to write the site in RoR and then rewrite it in PHP, so that deployment will be easy and so that the site will scale well[*].

    * -- I've not mentioned scaling and speed because these issues are covered in other posts here. Basically, RoR is not impressive on either.

  34. Language comparisons by LuckyStarr · · Score: 3, Insightful

    I've used PHP, Perl, Ruby and Python (in that order) and I can confirm that Python is in fact cleaner. One of the reasons being it's spartan syntax. It's one of the goals of the language. :)

    PHP is just ugly, (see grandparent) Perl and Ruby are quite fun and share the same philosophy (see TIMTOWTDI) where Python is just the opposite (although fun too).

    Python and Ruby also share their deep roots in clean object orientation, where Perl's OO syntax is - though bolted on - very flexible and even more TIMTOWTDI than Ruby's.

    Just to set things straight, I really like Perl, Ruby and Python, though I can confirm that developing web applications with Django is bliss.

    --
    Meme of the day: I browse "Disable Sigs: Checked". So should you.
  35. Ocsigen by Cultural+Sublimation · · Score: 3, Interesting

    If you had really complete freedom and were willing to try out something radically different from existing frameworks, I would suggest you would take a look at Ocsigen. It is based on the OCaml language, which alone implies a different mindset from traditional frameworks based on imperative languages. Some of Ocsigen's cool features:

    • Extends the OCaml type-safety into the generation of XHTML. This means that producing valid XHTML is not only "nice", but actually enforced by the framework: your programme won't even compile otherwise!
    • The entire site is seen as a programme where each public URL is a function. The OCaml type-safety is extended to forms and internal links, meaning there can't be any inconsistencies whatsoever.
    • With database bindings such as PG'OCaml, you can extend the type-safety also to database access. Think about it: the compiler checks at compile-time if your programme is consistent with the database itself!
    • Functional programming is very high-level, which means rapid development and happy programmers.
    • It is fast. And by fast I mean really, really, fast. How would you like your web framework to generate native code whose speed is close to that obtained with C?

    Sorry if this sounds like a sales pitch, but I would just like to point out that there are wonderful technologies out there, if people were just willing to take a step outside the trodden path.

  36. Twitter Follow-Up by jaaron · · Score: 3, Insightful

    And there's a good follow-up by one of his coworkers:

    We've been extremely happy with Rails, and make use of the multitude of helpers that it offers us - like any application on any stack, though, providing fast response times to a (rapidly) growing number of users is a challenge. The solutions are often tightly coupled to the application and its characteristics, and while scaling the most trafficked Rails site in the world, we've run into situations where existing solutions weren't enough.

    Rails is best at database baby-sitting, which is not what Twitter is about and it's understandable they would have issues. Ruby is slow and we need a good virtual machine. Nevertheless, Twitter does run on Ruby which shows that it can be made to scale. Not that Twitter is a good measure of anything other than, well, Twitter. And I'm sure someone could have done it with PHP, Python, Erlang or C.

    Which is always why blanket statements about languages and platforms is always a bad idea. Just look at the comments on this article. It's just a chance for everyone to trumpet their favorite web framework or language. Sure we have our favorite tools, but most of them suck at one thing or another.

    --
    Who said Freedom was Fair?
  37. Turbogears rocks! by SimHacker · · Score: 2, Interesting

    I've developed a large complex project on an earlier version of TurboGears, with CherryPy/SQLObject/Kid, and I love it.

    TurboGears is quite modular, and the newer modules are even better: SQLAlchemy instead of SQLObject (database interface), and Genshi instead of Kid (templating system).

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  38. I learned PHP once by seebs · · Score: 3, Insightful

    Everyone talked a lot about PHP.

    I started learning it. By about a chapter into the PHP book, I was thinking "holy crap, this language is uglier than perl". It has everything you would expect from a language thrown together by people who were either ignorant of software engineering or aware of it, but aggressively hostile to it. Everything global by default? WTF?

    I have never seen a language with so many carefully crafted security holes that the developer needs to learn to avoid. Default behavior for inclusion is to allow URLs, so you can, you know, run code from any site in the world. There's a feature everyone always wanted, which is never going to be subverted!

    I made it through about two and a half PHP books. In that time I learned that the MySQL and PostgreSQL interfaces were substantively different, and of course, used differently-named functions with slightly different calling conventions. Why? Because there's no abstraction or generalization going on; just whatever features sound cool getting thrown in with some name that wasn't previously in use. I learned that this is just BASIC all over again.

    I spent several days thinking hard about bleach, and went back to programming languages that were designed with some kind of consideration given to the development of larger projects.

    Ruby's undoubtedly "slow". That's what everyone said about perl and awk, too. Come to think of it, I've had people tell me that C was too slow. But Ruby has the amazing, shining, virtue that it is not a stupidly-designed or ugly language. I spent a while working with Ruby, and some helpful people pointed out that, in fact, the language does have a gotcha to watch out for. One. Not so many that you have to buy whole books full of things that you'd obviously try that don't work, open your site up to XSS, or behave erratically. No, just the one.

    Can PHP work? Sure. But the tacked-on afterthoughts provided to allow you to, in theory, if you remember to and want to put in the work, use basic software engineering principles, are not enough. The language provides a huge array of runtime functionality, with a function for everything. It doesn't provide the basic tools you want for engineering large projects, meaning that the workload of maintaining big stuff in PHP is exponential, not just quadratic.

    It can be made to work, but it really is that badly considered, and I wish people would stop doing things in it. Life is easy enough for the botnet people already, we don't need a language in which you have to be warned not to set the flag that lets remote sites set every global variable in your program.

    --
    My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
    1. Re:I learned PHP once by quag7 · · Score: 3, Funny

      I think your problem is you don't do enough coding in seedy desert motels doing lines off of methamphetamine-crazed prostitutes, with a tubfull of radiator moonshine, a closet of AR-15 knockoffs and the latest high capacity polymer-grip Europistols, balancing towers of ice buckets full of jacketed hollowpoints.

      You probably sit in some comfortable chair in an air conditioned office somewhere going, "oh, oh, globals, oh no, don't hack me, please!"

      Some of us are too busy balancing our RAD needs while fighting off bikini-clad ninja chicks with harpoons and barbed-wire dildoes to be concerned to get our panties in a bunch over globals.

      Please, you're standing on my dick.

  39. Seriously rethinking RoR by shagymoe · · Score: 2, Interesting

    All the posts I've seen so far complain about RoR's scalability. These people have obviously not worked with RoR because, while scalability might be an issue, if they'd really worked with RoR, they would know that DEPLOYMENT is what kills rails.

    I jumped on the RoR bandwagon full bore and have been developing my app for over 1 year. The Ruby language is awesome and the framework takes the messiness out of web development. When I look at PHP code now I was to puke. With that said, I can deploy a PHP application is seconds...literally. Rails on the other hand, has had me working almost full time for 3 weeks trying to get a fucking test (not production...test) server up and running. It is completely fucking ridiculous to get a server set up that you could seriously test with or, God forbid, move into production.

    I've been a Systems Admin for over 7 years and a programmer for 6 years and using Linux for at least 8 years so I'm no newbie or idiot. I've tried setting up everything manually as well as using Capistrano and Capistrano/Deprec and still haven't had success getting a server setup.

    It is unbelievable how many crazy little nuances and bizarre configuration parameters you will encounter. In a short period of time you are just copying and pasting any random crap someone posted on the net that claims to have a working server. I've followed countless tutorials TO THE LETTER and this shit still doesn't work.

    I even purchased the "Deploying Rails Applications" book from Pragmatic Programmers and STILL CAN'T FUCKING GET SOMETHING DEPLOYED!!! Possibly the worst written book ever and claims to give you everything you need to get the Rails stack set up on Ubuntu Dapper Drake and has almost zero setup commands. What a load of crap. Anyone could have written this book since he just lifted it all from internet posts. Good job asshole, thanks for nothing.

    You know what happens to people who can successfully set up a Rails application? They start a fucking hosting company and make a shitload of money because hardly anyone else can do it. EngineYard, SliceHost, and RailsMachine are all examples of Rails programmers who started hosting companies because they actually made something work. It really just shouldn't be that hard.

    Maybe someday Rails will be easy to deploy, but right now it is a fucking nightmare. It totally ruins all of the great things about Ruby and Rails. I'm starting to think it's all a conspiracy and Rails was just some kind of carrot to lure us all into purchasing expensive hosting.

    The hype about Rails' faster development time is true right up until implementation and then it's a load of shit. Implementing a PHP app is like 2nd grade math, whereas implementing a Rails app is like quantum physics.

    I've never been so fucking frustrated about anything computer related in all my life. If you don't have a high tolerance for wading through tons of bullshit, then I don't recommend trying to implement a Rails app at this time.

  40. Perl Catalyst by mattr · · Score: 2, Informative

    1. Maturity of solution;
    Catalyst and Perl both more mature than the frameworks/languages mentioned.
    2. Features;
    CPAN is bigger, Perl has more functionality which is why there is more than one way to do it (TIMTOWTDI) in Perl.
    3. Size of community of skilled users (to build a team);
    More skilled Perl programmers.
    4. Complexity/ease of use (for neophytes to master);
    Mmmm well can't say. PHP based thing with only one layout you can use might be simplest for a newbie. On the other hand, are you trying to make a serious webapp or just a cookie cutter steaming phpnuke thing? Am interested in Ruby mainly because it just might reduce typing but then again maybe not. Just seems neat. But for making a live system I'd go with Perl.
    5. Greatest strength of your choice, and the greatest weaknesses of the other two.
    Many available modules. Other two have a much shorter [programmer pool size] x [framework and modules powerfulness] vector.

  41. Getting a Rails server up and running in 5 minut by patio11 · · Score: 2, Funny

    Use Deprec (www.deprec.org I think) on a clean Ubuntu install. Seriously, when I found it it was almost a religious experience (and we're talking Baptist-esque rolling in the aisles and PRAISE HIM! OH! religion here).