Skip to main content

Playframework vs Ruby On Rails



Yet another LanguageX vs LanguageY question....





Currently I have a bunch of apps built on playframework . For the most part I love it. Moving from PHP a few years ago was almost a religious experience -- an actual functional orm, much less boiler plate code, stuff just worked, etc.





I still have a website running on a a shared hosting service thats built with PHP+ CodeIgniter . Recently I've been adding some features to this site and have been thinking about porting it to either Ruby on Rails or Playframework.





So far though, nothing about rails has really blown me away. It seems like it has pretty much the same featureset as playframework. I like ruby's terseness, and things like blocks, but again for the most part there's been nothing about the language itself that has made me go "oh wow this is 1000x better than java/php/c/whatever!" In fact, some parts actually kind of rub me the wrong way -- I prefer strongly-typed languages for example.





My question is, am I likely to find anything in the framework or language that's really going to differentiate it from java+play for me, or are they pretty much the same and primarily just differentiated by things like personal preference about syntax and developer community?


Comments

  1. Play framework is gracious enough to acknowledge RoR's inspiration. (Unlike some people who copied an entire platform and give absolutely no credit to the original)

    If Play team have done a good job, it's no wonder that a person is not impressed by RoR if he learned Play first. So if you find Play quite comfortable, there's no compelling reason to go RoR.

    ReplyDelete
  2. Play is inspired by Rails frameworks so yes it looks like RoR and Django and Symfony for example... I tried php but I'm not really found of this language even if it brought really good things to the web world... Ruby is also the kind of language I don't really like and as it is said above, it is purely subjective :)... But I also admit it brought really good things in the web world...
    I really prefer Python as a language... Anyway, my skills in Java are far better than in Python and for years, I've desperately tried to find a good web framework in Java not being an horrible heavy-weight JEE/Spring-like stack... I tried Grails and I was quite happy but it has 2 drawbacks to my mind: groovy is really a nice scripting language (I would love to see lots of it in Java directly) but it's not really quick and Grails is based on Spring and it's not much lightweight anymore... Basically, I spent lots of time on Grails but as I wanted to develop an application in Google App Engine, I quit Grails simply because it was too heavy to run on GAE...
    Then, I found Play! and I was amazed to discover it! Really! It is one of the best thing I've seen in Java for some time... really light, really stateless, on-the-fly class recompiling/loading, no deployment required while developing, no huge dev tool required, module+plugin mechanism etc... Moreover Play! has a really dynamic community.

    I don't say everything is perfect but it's evolving and getting better and better. I've been hammering Play! for one year now and I've never been stopped by the framework as I were when using all other java frameworks: I'm just limited by my ideas and my skills sometimes ;)

    So if you like Java, I would really advise taking some time to investigate Play! ;)

    ReplyDelete
  3. Ruby never called my attention, ever... even with the launch of RoR I still was using PHP (with Zend Framework at that time)

    Having used CakePHP and Zend Framework and comparing it to Play! in my experience starting a project with Play! is so MUCH painless than those frameworks I mentioned above, once you know the basics of Play! you will feel productive, the community is always there to back you up (although just searching the mailing list you can already find the solutions)

    With CakePHP, I'm sorry but the console stuff is both confusing and weird the configuration is ok but nothing beats the routes file Play! provides, write your routes fast and continue, ZF is still pretty straight-forward but you will feel like you spent hours configuring it just to get started.

    The only thing that could stall you is the lack of knowledge in Java, but as you go and adapt it will become easier.

    Note, Play! is not perfect, the version 1.2 is coming soon, although 1.1.1 is really pretty stable to use.

    Go ahead and play with it, even if we tell our experiences with Play! it depends on how comfortable you feel with the framework.

    one last thing... I'm wondering... are you porting your site because PHP lacks something or just to jump to another language? also my opinion might be a tad biased, but hey like I said, try it and see how it goes :)

    ReplyDelete
  4. I think that if you prefer strong typed languages, and are looking for an experience similar to rails, right now you don't have many choices, the only thing that comes up to my mind is play. (BTW there's an alternative strong typed template engine, japid, that uses java instead of groovy)

    I think one of the most important differences you'll find comes from the maturity of both frameworks. Rails has a really huge community, with lots of books, sites, blogs, plugins, tutorials and examples. More over, it's code base is well known by many contributors, and after it's merge with merb it has become more modular...

    On the other hand play's community is extremelly helpful and dynamic, and it's growing day by day, but it still is a young project...

    Java affordable hosting can also be a problem...

    But if you have already made your experience with play, and are fond of strong typed languages, I would advice you to go with play...

    More over, when the scala module matures, you'll have more rails-like magic with a strong typed laguage like scala...

    --

    edit: Java hosting is on it's way to become a non issue also, in the last weeks, many options appeared, specially related to cloud offerings, have a look at Experiences on free and low-cost hosting for play framework applications?. red hat's openshift is another alternative that is coming strong, see: http://community.jboss.org/blogs/thomas.heute/2011/08/12/lets-play-on-the-red-hat-cloud-using-the-play-framework-on-openshift-express-and-jbossas7

    ReplyDelete
  5. This is subjective, but I didn't like Play! when I looked at it. If you like staying on the JVM, I'd suggest looking at Grails.

    EDIT:

    When I say that I just didn't like Play, a good summary is provided here:


    Play! is designed to be comfortable for developers coming from scripting languages like Python and PHP. It provides its own build system and management scripts, somewhat like Rails or Django would. Existing build tools and infrastructure (like the Maven repositories commonly used for dependency management in Java-land) will not integrate well with Play.


    Not letting Java developers use Maven would be like telling someone to use Maven for a Rails project to manage dependencies instead of gems - it just feels unnatural. That's why for the JVM I'd suggest Grails (for Groovy) or Spring MVC or Roo for plain old Java.

    ReplyDelete
  6. One main point of differenciation between RoR and Play! is that Java supports Multithreading by default, whereas Ruby does not. So in the long term, for running really processing massive amounts of information, Play! will reign over RoR. And Play! combined with Japid and Netty will give you one heck of a performance.

    ReplyDelete
  7. Foreword:

    I have developed apps in both frameworks (play 1.2X branch and Rails (2branch & 3branch).

    My personal opinionated advice:

    Just stick with the one you know best.
    I personally prefer the play stack as it comes with a really nice ORM layer and the java language has better compatibility with my brain.
    Keep in mind that the plugin ecosystem for play isn't that mature compared to the overwhelming range rails developers are offered.

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex