Play Framework: Views

From working on the Avaje EBean model development and the REST routing, I have not found much to dislike about Play framework development apart from the default settings to lazy load the models when getter/setter methods are not present.

Inflexible Views
My problem with the Play framework is that the template files seem to lack the ability to flexibly pass variables to the view. It is not too hard to add a new field to one scala.html file, but this presents a problem when I edit a scala template such as the main.scala.html. Each scala.html file that calls my main.scala.html file now needs to be modified.

Some assumptions were incorrectly made
During the creation of my models and the related tests, I made some assumptions that were absolutely wrong for request processing. For example, I would create a book instance when an ISBN 13 parameter is found when parsing a form request.

Another assumption I had made was the requests and offers would show everything available rather those a student should view. An example would be I do not need to see another student’s requests, just my own.

Problem: Selenium compatibility with Firefox 20
I have known about selenium for quite some time, but I have always steered away from it due to the complexity. My tests for Fluentlenium failed, because the driver wasn’t able to install on my system with and without administrator privileges. I am running Windows 8 with standard installation of Firefox 20.0.1. A quick search on Google shows that multiple people have this problem. It seems to a combination of the versions for Firefox and Selenium which solves the problem.

Project Status
All I finished so far is being able to create a request for each student. If a request is made and a book does not exists in the database, the user will be able to create a record for the book then resubmit the request.

Also, I added a simple login form that will suffice for development purposes only.

Conclusion
Learning the Play Framework was a neat experience. I had some trouble jumping back and forth between HttpServlet/JSP stack and Play due to the different naming conventions. Especially, the way the Java models are saved and found using persistence rather than result sets. I still dislike the method naming conventions, since many of them do not follow Java’s verb naming convention.

I really dislike Selenium for testing. Not because it is a bad testing API, but due to its reliance on a driver to each browser. Basically, the driver must be updated whenever a browser’s plugin api or even the installation directory changes. With the amount of browsers that exists and the volatility of each configuration, I have real concerns about its sustainability.