Okay, having spent some time fiddling about with a toy Play 2.2 project, and studying Marius's excellent
blog post and accompanying
code I feel a bit more availed of the general situation, but I'm still finding the ins and outs of how I'm going to migrate my code difficult to grasp. My particular situation is complicated by the fact that I'm using play-2-auth, which uses a different way of doing action composition.
Bottom line seems to be, as far as I can tell:
- Play 2.0/2.1 made it very easy to use asynchronous, non-blocking operations without worrying about many "futures" you'd eventually end up in, since AsyncResult would just handle it "magically"
- this is no longer the case
- ActionBuilder gives you the flexibility to do async/synchronous stuff depending on context, but is difficult to compose (and, frankly, a confusing API, IMHO)
- the alternative might be to write lots of duplicate async/synchronous versions of plain Actions if you want to compose stuff flexibly
I totally understand why these changes have been made and how the simplified result structure makes it easier to do a lot of useful stuff more easily, but I can't help but feel that one of Play 2's big selling points - working with async stuff is easy! - has backtracked a lot. Then again my understanding is still really limited, and since not many other people have raised objections I must be in quite a small minority here.
Sorry to be gripey - I really do appreciate the fine work the Play devs are doing.
~Mike