views:

1140

answers:

3

I have worked with Django before and have recently seen the Play framework.

Is this the Java community's answer to Django? Any experiences with it? Any performance comparisons with other Java web frameworks?

Edit:Almost similar to http://stackoverflow.com/questions/1597086/any-experience-with-play-java-web-development-framework, the responses, unfortunately don't say much about the framework.

+3  A: 

The Play! framework is a really good piece of software, and that the JavaEE bloated environment should be inspired from.

I moved from Java -> Django because of the fast cycle "modify file" / "reload browser", and the Play! framework makes me came back to my favorite Java language.

It could also be compared in some terms to what Grails and in general dynamic languages in Java (Groovy is used in Play!) are trying to import: simplicity, speed and reliability.

Lastnico
I thought unit tests reduce the need for code, build, deploy, test cycles in JavaEE, by the time you get to the browser, you are certain it works.
n002213f
yes, but unit tests are useful to test the business logic, nothing else (testing the Web interface is always a pain). So, no choice, if you want to be efficient in web interface development, the only way is too increase the speed of build/deploy cycles.
Lastnico
+10  A: 

Play! is a breath of fresh air into Java and bypasses all the Enterprise cruft that has evolved over the years. Even the namespace is just play not come.playframework. It is supposed to be an answer to Rails, Django etc and is MVC based. It is needed for Java to stay relevant in all but deep entrenched enterprise shops.

Play! reduces the overabstraction and painful configuration of old Java. It is a complete stack it does not rely or play to the old Servlet/EJB methodology like Restlet tried to do (making REST easier in Servlets). Play! is a great REST based Java framework that is a valid contender to other platforms MVC frameworks.

It is very RESTful and it is easy to bind a parameter to a java method. They have also made JPA much easier to use through their play namespace.

play.db.jpa.Model

public void messages(int page) {
    User connectedUser = User.find("byEmail", connected());
    List<Message> messages = Message.find(
        "user = ? and read = false order by date desc",
        connectedUser
    ).from(page * 10).fetch(10);
    render(connectedUser, messages);
}

Python is used for scripting instead of builds with Maven which might save a few lives.

I haven't been this excited about a Java framework since Red5 or Restlet. A bonus is they have easy ways to get your app up on Google AppEngine as well using the Java version of GAE.

Ryan Christensen
+1  A: 

I am also a Django user. I've just visited the Play framework and skim thorugh its documentation. It has the simplistic design Django has been known of. It even has app engine support built-in. I'm sure many java developers will support it, and it only need some time to see cool plugins from the community.

koko