First of all, thank you very much for providing the all-time-best java RESTful / web framework. We’ve been using it in many projects with great experience!
My question is: what is the community recommended best practice to keep apps up to date?
Recently we are trying to upgrade a legacy app from 2.4.8 to 2.7.3. We end up spending way more effort than originally expected. Mainly because there are so many non-backward compatible changes. For example, we have to use dependency injections for almost everything now, even include exeuction context and things like Play.isProd is no longer compiling.
I understand Play has so many new things to try out, and inevitably many of them don’t work out (which I doubt for some of them). But does that mean we have to decommission them all in the next major release?
Keeping a stable API is not only useful to reduce maintenance cost, but also from developer’s point of view it will be less frustrating when knowing their knowledge is NOT expiring in next 6 months.
I’ve recently worked on upgrading apps to 2.6 and 2.7 and I generally haven’t found it too painful. The 2.4-2.6 changes around global state were definitely the most difficult for many users, as using statics everywhere was pretty much part of Play’s philosophy before 2.4. These days there’s definitely more focus on keeping the Play API stable and making migrations easier.
Which ones haven’t worked out?
Keeping a stable API is not only useful to reduce maintenance cost, but also from developer’s point of view it will be less frustrating when knowing their knowledge is NOT expiring in next 6 months.
I think we agree on that. The one caveat is since Play is designed to be an opinionated framework, there needs to be room for those opinions to be updated from time to time. Moving to Akka Streams and Java CompletionStage are great examples of places where updating those opinions made sense for where the community was going, even though they required changing code to upgrade.
If you’re looking for tips for upgrading, start with trying to follow the migration guide, then if you’re still stuck I’d ask on here.