Followers of my blog will know that I’m not a fan of Java and its frameworks. I’m even more pessimistic for its future with Oracle but that’s not the point of this post.
For a school project I had been forced to write Java (please, there are other languages too…). Anyway, as a group we have debated on how to write it, as there wasn’t much Java developers in the group. Someone was arguing that we should be using Spring+Hibernate duo (they don’t make the trio so they fail :) and I suggested Play!. Not that interestingly, we have finally chosen Play!.
We were discussing a lot about it, as Play! looked pretty unorthodox for Java frameworks. As it had taken an inspiration from RoR, it was pretty straightforward to work with it. What surprised me more was that developers of Play! are exceptionally good at documenting. Tutorials, screencasts are enough to do almost everything with it. I have really started developing Play! only with watching the screencast and reading the yabe! tutorial.
I was intending to write some tutorials but I now find it pretty meaningless as they are already there! Instead I have decided to talk about my opinions about it. I loved it pretty much. It’s easy to develop (you don’t need to restart the container(server) and compile in order to see that single change you have made in the class, Play! handles these kinds of changes pretty well, except some cases like adding more import statements or modifying annotations. Not restarting the server is really important to me!), fast, and it has a pretty easy layout. It was really to understand it!
I have some worries about “big” projects by using Play!. There ise basically only three folders in a standart layout: controllers, views and models. What I learned is, you can create sub folders for them like: controllers/admin. In order to use some of the modules of Play! (crud and security i.e.) you will have to manually import controllers.CRUD and controllers.Security and it’s done.
This manual import problem also applies for creating sub-packages in the models package. However with such subdirectories, you might manage your code base much better then a single directory. This might help you for managing “big/enterprise/professional” projects.
You should not bable about “you cannot write multi-tier applications with this”, because it’s not the point! Play! intends to be an easy to use, scalable, stateless framework. We might say, it has its own “Play! Way”. And in my opinion a “bad designed” multi-tier application is just a pita and creates a lot more problem then it solves, hinders development process and educating new ones.
I’m still not sure if we can use Play! in an enterprise framework, not because it’s not mature, or multi-tier applcations but I don’t know if it might scale well or not (or how it will behave on WebLogic and Oracle, I think I should give it a try and see how it fares). I have looked around and found out has a good customer base and these customer should be needing scaling. There are also two different cloud hosts for it: PlayApps and Heroku. Perhaps I’m worrying too much but this is because I don’t fully understand the underlying architecture as I’m new to it (Ask me about scaling PHP and I will be more confident how much it will scale :).
For PHP lovers out there, Play! is a nice “way” to try a Java framework. It will be much familiar to you and it might work well for relatively simple projects like simple blog projects etc. For bigger ones, give it a try and don’t forget to tell me the results :)