Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playframework and Django

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 this question, the responses, unfortunately don't say much about the framework.

like image 967
n002213f Avatar asked Nov 10 '09 07:11

n002213f


People also ask

Which framework is similar to Django?

Node. JS, Laravel, React are some non-Python frameworks that are also good alternatives for Django if you are comfortable with other programming languages.

Is Django popular in 2022?

Django and Angular have their fanbase and for the fulfillment of web development trends of 2022, both frameworks are going to be very popular, diverse, and useful.

Is Django and Flask are same?

Django is a full-stack web framework that enables ready to use solutions with its batteries-included approach. Flask is a lightweight framework that gives abundant features without external libraries and minimalist features.

Is Django better or Flask?

Flask is considered more “Pythonic” than Django is basically since Flask web application code is, in most cases, more unequivocal. Flask is the choice of most tenderfoots due to the need of barricades to getting a basic app up and running.


1 Answers

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

like image 134
Ryan Christensen Avatar answered Oct 04 '22 07:10

Ryan Christensen