Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Today's options for an easier migration path to Play 2

I'm new to Scala and to Play, and I'm considering using them for a new project. I see the development on Play 2 is coming along nicely, although the stable version is still 1.x. And there are substantial differences between the two.

What I'm wondering is, if I start a Play 1.x project now, what options can I take that will ease migration to Play 2 in the future?

Namely:

  • Play 2 uses Ebean as the default ORM, would you advise me to use it instead of Play 1.x's ORM (Hibernate)?
  • What about the template system; anything I can do now to make it easier to migrate later on?
  • What else will I have to worry about when I decide to port my app to Play 2 in the future?
like image 691
Filipe Correia Avatar asked Nov 25 '11 01:11

Filipe Correia


People also ask

What are the solutions of migration?

Countries should promote stability, education and employment opportunities and reduce the drivers of forced migration, including by promoting resilience, thereby enabling individuals to make the choice between staying or migrating.

What are the common migration challenges one has to deal?

Lacking a clear strategy determined by business objectives. Cloud sprawl caused by not having a clear understanding of the full scope of cloud environments. Exceeding the planned budget. Security weak points and failures of critical services.


2 Answers

On the migration itself:

  • There're plans to migrate the Groovy templates to Play 2 (I believe is work in progress). You can mitigate this is you start using Play 1.x with Scala, as the template system will be the Scala one.
  • Changing from Hibernate to Ebean should be easy unless you use Hibernate-specific extensions.
  • Configuration and some jobs (like @OnApplicationStart) may change, but this should be quite easy to port (just move them around).
  • There will be changes to the way you access routes and assets, which may give you some extra work adapting code/templates.

In general it shouldn't be too complex, but as @lacy said, it depends on your deadlines and the project itself. If it's a critical project, to be finished before next March 2012, I would go with Play 1.x. If it's a less important project, which could be delayed, and that in any case won't be released before March 2012, try Play 2.0.

like image 152
Pere Villega Avatar answered Oct 31 '22 11:10

Pere Villega


I wouldn't even bother using Play2 on project for the moment. It still lacks some features and even if the development is going forward, I would stick with Play 1.2.x. Even if I have to admit it is tempting to try 2.0.

But I would never chose the in between solution, though. Starting in Play 1.2.x and trying to migrate toward 2.0.0. It is called Semantic Versionning. When the major number increases, there is no backward-compatibility. Meaning, you either use play 1.2.x or Play 2.0. Trying to migrate is going to cause you more stress, problems then you want to.

like image 1
i.am.michiel Avatar answered Oct 31 '22 11:10

i.am.michiel