opensas opensas - 1 month ago 14
Java Question

advantages of play framework for people coming from php / ruby / python

One of the strongest selling points of play framework is it's development cycle, just fix the code, go back to your browse, hit reload, and go one, all without the write, compile, deploy, hassle typical of j2ee web development.

Nevertheless, for web developers coming from php, ruby or python this is hardly surprissing, moreover it's considered the natural way to develop web apps.

Moreover, many of the advantages of play, (efficient template system, resolve errors quickly, stateless, fun & productive) are taken for granted in those frameworks...

So I'd like to know what do you think are the main advatages that play framework brings to web developer coming from dynamic languages.

Answer

From my point of view these are the main advantages

  • it's java, so if you don't feel confortable with java, and you are not willing to learn it, that might not be an advantage. On the other hand, if you HAVE to use java, coming from php or rails you will feel right at home with play

  • it's static (except for templates and routes, that's about to change on the next version), so you have compiler checks and safe refactoring.

  • tool support: IDE support (eclipse, intellij, netbeans)

  • endless collection of libraries to do everything you want, well, it's just java

  • runs on the jvm, which has years of experience and optimizations

  • it's compiled, so you may expect better performance

  • it's really fullstack: it comes with everything you need to develop a web app, compiler, web server, in memory db server, offline documentation, integrated database manager, local and distributed cache management, fixtures, evolutions, dependency management, lots of utility libraries, unit tests, selenium tests, ide support. You need no apache or mysql setup to get up and running

  • it has advanced features, like asynchronous requests, web sockets, asynchronous jobs

  • zero development environment setup: just unzip play.zip, play new my app, play run myapp

  • excellent documentation

  • great and fast growing community

  • scala is firmly in it's horizon, if you come from a dynamic language you might feel more comfortable with a language like scala, even though it's static

  • can be deployed to any servlet container, like tomcat, but also comes with it's own lightweight server

  • it's got an ever growing collection of community contributed modules

  • it's cloud friendly, works on gae, heroku, playapps, cloudbee, dotcloud, etc... (see this question)

  • source code: this is one of it's main advantages, even though it's often neglected. The source code is pretty readable, understandable and not over engineered. Even without much java knowledge, it's possible to have a look at the code, understand it, and begin contributing to the project

In my particular case, coming from a php & classic asp background, play allowed me get a web application up and running while learning java at the same time. it really let me enjoy my transition from dynamic languages to java...

Play has some advantages compared to other dynamic web frameworks, but I think that if you are proficient in codeignter, rails, django, etc, and if you are not willing to benefit from java's (or scala) ecosystem, you should stick to what you know...