Over a million developers have joined DZone.

Play: the Good, the Bad and the Ugly

DZone's Guide to

Play: the Good, the Bad and the Ugly

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

While burbling along doing my Play project, I came to a pretty simple need: a table with a list of items, then a checkbox for each, and a button at the bottom for ‘Delete Selected.‘ So of course I need a form. I had already been through the documentation of doing a form and had done a single form with a single entity bound to it. Was pretty satisfied with that: it went pretty quickly and the combination of the tempting and the binding was cool, including making a form object, being able to seed the form, etc. So I thought this was going to be just another piece to do.

Surprise. It‘s actually not part of the documentation, the examples, nay, the framework. Which just completely astounded me. I have been reading the Manning book on Play and in the first chapter, it lambastes JSF and says even the second version was ‘too little too late.‘ (Um, ok, time to whine….) Um the ‘too little, too late‘ framework JSF can do this in a few minutes, with code that is very clean and simple.

I read and read. Seems like maybe there is a hack way to do this with Scala code. Not going there.

What‘s really disappointing is the docs were so good, the sample apps were really impressive, but this is inexcusably silly. There is a way to have cardinal relations in a form. It‘s not clear to me whether that is the expectation, but if it is, the docs don‘t tell us that and neither do any of the SO questions.

One more aspect of this that‘s really depressing: frameworks should provide not just idiomatic solutions, but composable patterns. Have we learned nothing? Components, composite components.

One other ugly piece. The ZenTasks example is nice, and it‘s impressive, but the core of it is a CoffeeScript rendered Backbone contraption. Jesus, really? Super ugly code. Nevermind the fact that I don‘t particularly want to be slubbing Javascript, but it‘s more just depressing what it says about where we all are. The web was a great wonderful thing. The idea of making it a delivery mechanism for applications continues to be an unmitigated disaster.

The second Release Candidate came out today of Bootstrap. The Customizer is back! It is remarkable what you can do quickly with Play and Bootstrap, and not being able to do table-based editing is not fatal, but it is insane that it does not even merit a mention of something that needs to be addressed all these versions later.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}