Any experience with the java development framework for the "Play" game?

I just stumbled upon the following new java web framework: Play

http://www.playframework.org/

http://www.playframework.org/documentation/1.0/home

with such an amazing list of features, I am very surprised that I have not heard about this before ...

It seems that java web development has promised the land ...

Has anyone tried it? any real experience with him? Do you think it's worth studying it?

+62
java frameworks playframework
Oct 20 '09 at 20:25
source share
9 answers

I agree with Jason that Play might be better than Grails. With four Grails projects under my belt (ahead of two Tapestry projects and one Wicket project), I seriously watch Play Play.

One of the things that I thought was cool about Grails was that "all Groovy." That is, you use Groovy to write everything (except HTML and CSS) - domains, controllers, services, page templates (GSP), tag libraries, Hibernate API (GORM), unit tests (GUnit) and build scripts (GANT). You can even write shell scripts in Groovy. Thus, the ability to encode all aspects of an application using one language again seemed to be a simplification that has long been called - back to the days of writing desktop applications in one language, such as C ++ or Delphi. However, I found out that one size does not fit all.

First, the IDE support for Groovy is small. IntelliJ does a better job, but with Groovy is dynamic, it can go that far. Refactoring tools cannot (cannot) catch everything, so you cannot trust them 100%. This means that you must be especially vigilant in unit testing. Here again, because Grails relies so much on the dynamic “magic” that happens at runtime, unit testing at Grails needs to rely on an extensive mocking layer to emulate it, and this mocking layer is quirky. The third problem is that most of the so-called Groovy code that you write is actually domain code (DSL). (In short, DSLs are Groovy shortcuts, using the fact that Groovy and a lot of syntax are optional.) Grails uses different DSLs for different configurations, URL mappings, etc. And this is inconsistent. For example, as you specify the log4j options, nothing looks like the way you specify data sources, and none of them look like the pure Java Groovy is based on. Thus, the promise of "all Groovy" still falls.

In this case, I see where the Play team comes from.

  • Reverting to plain Java for domains, controllers, services, and JUnits makes sense. Strong typing means that the IDE can reliably help with intelligence, code navigation, refactoring, etc. (And so you don’t have to pay for IntelliJ if you are happy with Eclipse.) You need to write more detailed code to get strong support for the tool, it seems to be very good for me now. We'll see.

  • I like that I still use Groovy in page templates. I'm afraid that in the end I can add more code to the templates than I should.

  • I have no experience with JPA, but it looks like it's pretty close to what GORM does for me, so cool.

  • Spring IOC support in Grails is completely transparent, while Play support seems minimal; however, I believe that IOC is too abusive, and I am perfectly prepared to pass Spring XML code in the rare case that I really need. (One of my open questions is that I assume JPA supports the transaction, so Play doesn't need Spring for what Grails does, no?)

  • I've never been a fan of Python, so I cringed when I read that Play uses Python for its build scripts. But I agree that Grails GANT scripts are pretty slow. Plus, I find that while GANT is a huge improvement over XML ANT, it's still hard to wrap your head around ANT concepts. Grails GANT scripts are pretty confusing. So, I will go to him with an open mind.

  • The Play "application module" model sounds just like the Grails plugin model, so cool.

  • I am very impressed with the Play documentation that I have read so far. I had a huge number of questions, but half of them were answered right away.

I will talk about myself again later when I dive deeper.

+70
Oct 30 '09 at 10:51
source share

I tried Play, and I am impressed: it does a great job of providing a useful development model that is much simpler than most frameworks. "Moreover, being able to run in development mode to analyze .java files is directly worth it: just reloading the webpage in the browser without starting the build script or waiting for redistribution it costs a lot of development speed.The error messages displayed in the browser are really good.

Another thing that impressed me was the general aesthetics: perhaps it’s not only that the training application really looks good (both the code and the design of the web page), but this applies to the whole structure, API, and documentation .

+28
Nov 02 '09 at 13:52
source share

After pushing my colleague, I looked at him, followed the textbook and got hooked. Getting immediate feedback right in your browser means you don’t need to use the IDE. I love Eclipse, but let him take a look: after you have added some additional features, it is not as stable as a simple text editor. On a Mac with TextMate, you can even click on the error message in your browser, and TextMate will appear with the cursor on that line.

Testing in the game is also well done, with one button you run unit tests, functional tests and selenium-based tests.

The game is exciting because it is still small and uncomplicated. It uses only ant to build and does it in 25 seconds. To contribute to the beautiful documentation is to edit the .textile files and reload the documents in any game application.

The way I got into the quest to translate the tutorial to use Scala, adding Scala support, where necessary, to make it as enjoyable as possible.

+9
Nov 10 '09 at 21:31
source share

I like it, I use it for small projects, and so far it is great for work. However, there is one thing I really miss because it was done on purpose: Service Sharing / DAO / Model! The documentation says that one of the goals of the game is to avoid the “anemic data model”: http://www.playframework.org/documentation/1.0.1/model

but in my experience the classic separation of layers Service / DAO / Model saves a ton of development time when the application needs to be reorganized! On Play, you are stuck in static methods that depend on game-specific transaction management and features ...

However, many thumbs up: development speed, clean code and, ultimately, fun!

+9
Mar 15 '10 at 9:10
source share

I used Grails, Tapestry 4/5 and direct Java / JSP / Spring / Hibernate.

I think this is happening in the right direction for the first time in a long time. Grails was a really good first step, but Play! it looks like something that really can have legs. Scala support in 1.1. If it is possible that I can write my controllers / domain in Clojure, I am for sale;)

+6
Oct 26 '09 at 0:56
source share

Starting from a year and without visible errors after 18 small releases, we use Play! 1.2.4 in the production "missing" application for the intranet for the school (actors:> 100 teachers, 700 students, administrative group). The client side is written using FLEX 4.6 from Adobe (very beautiful views). Data is sent and received in AMF3 format (Cinnamon module). We use our own simple dao level based on JPA EclipseLink and MySql for the database. The application is stored on a Linux virtual server. I am a big fan of Play for its simplicity and very productive approach.

+4
Oct 28 '12 at 11:52
source share

I like the look of the Play, but have not tried it. From scanning documents that stood out, there was heavy use of static methods. From the point of view of unit testing, this always makes things a lot more complicated (I think it makes fun), and this is a departure from the OO-everywhere approach in typical Java development. Maybe this is the point, but it's just what made me a little less enthusiastic ...

+3
Oct 29 '09 at 8:19
source share

I am currently creating web applications at work using a playback platform that does massive data processing. I have to say that the speed played alone is significant and more than RoR can provide. In addition, the game is a Java-based platform, and therefore multithreading can be easily performed. Then you can get maximum performance when using java modules such as Japid and Netty, along with play.It, as an infinite number of settings can be made for performance. In my opinion, you have to try.

+3
Dec 16 2018-11-11T00:
source share

I use Play in a small project, and it seems that is exactly what they were talking about. But one function that I think should be present by default within the framework: the ability to work with multiple data sources (for example, use more than one database schema). This is the only missing feature I have found so far.

Regards, Uilian.

+2
Feb 18 '10 at 13:35
source share



All Articles