Some questions from a newbie in Play 2.5

56 views
Skip to first unread message

Mateus Malaquias

unread,
Dec 9, 2016, 5:36:15 AM12/9/16
to Play Framework
Hi guys :)

I'm a Java EE developer and start working with Play 1. But i want migrate to Play 2.5 and i have some questions about how start study...

1 - I have two books about Play 2.2, can i continue my study of Play 2.2 and implement this in Play 2.5 or everthing change?

2 -
What changes in Play 2.2 to 2.5?

3 -
Who is using Play and what niche Play want focus (here we are using for small projects)?

4 - 
Scala template is good. But for Java people? Nah! Can i change Scala template for Thymeleaf engine in Play 2.5?

5 -
Ebean-ORM what is that? JPA Provider or more like JOOQ?

6 -
Where can i find things about Play 2.5 (no problem with Scala)?

Renghen Renghen

unread,
Dec 9, 2016, 6:13:11 AM12/9/16
to play-fr...@googlegroups.com
1) lots of changes from 2.2 to 2.5,I would suggest that you start with 2.5.10,as you can go directly to akka streams instead of iteratees.
    as of 2.5 depency injection is used as default so as to eliminate global state,etc...

2) the list of changes is huge,check the changelog (https://www.playframework.com/changelog)

3) a lot of companies are using play,for small or large projects (example linkedin)

4) you can use thymeleaf of another templating sytem like velocity or others (https://www.playframework.com/documentation/2.5.x/ModuleDirectory)

5) you can use JOOQ or jpa for the orm, whatever rocks your boat for persistence, in scala world we prefer query type orm like slick,but if you prefer jpa, you can use it.

6) github,https://www.playframework.com or ask help from the community,mail list etc ...

regards

Renghen


--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/fff92817-a782-46a0-b9d0-fd4dc0752df3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
regards

Renghen

Greg Methvin

unread,
Dec 9, 2016, 6:22:10 AM12/9/16
to play-framework
On Fri, Dec 9, 2016 at 2:29 AM, Mateus Malaquias <mateus.m...@gmail.com> wrote:
Hi guys :)

I'm a Java EE developer and start working with Play 1. But i want migrate to Play 2.5 and i have some questions about how start study...

1 - I have two books about Play 2.2, can i continue my study of Play 2.2 and implement this in Play 2.5 or everthing change?

Well, conceptually, a lot of the stuff you learn will transfer over. Understanding the concepts behind reactive applications, asynchronous I/O, etc., is going to still be useful. But many of the APIs have changed.

Some Play 2.5 books to check out:
- Play in Practice (mostly up to date but still in progress): http://shop.oreilly.com/product/0636920035718.do
- Play Framework Essentials: https://www.packtpub.com/web-development/play-framework-essentials (not up to date but there is a github repo with updated samples for 2.5: https://github.com/julienrf/pfe-samples/tree/play-2.5.0)

The migration guides are probably the best place if you want to see everything that changed in detail:
 
2 - What changes in Play 2.2 to 2.5?

Several notable differences:
 - Dependency injection is a first class citizen. Guice is the default DI framework
 - Static state is discouraged/deprecated. Greater focus on testability and modularity.
 - All functionality is supported directly from Java, including filters, custom routers and HTTP request handlers.
 - No more play command. Directly using SBT or Activator is recommended.
 - Java 8 support and moved to Java 8 APIs for functions, streams, etc.
 - Support for various SBT plugins for frontend development: sbt-web, CoffeeScript, LESS, et al.

The biggest change is probably the move away from statics. So many of the APIs you used in 2.2 (like WS.url(...)) have been replaced by the making the same call on an instance. This was one of the things that was carried over from Play 1 in Play 2 that ended up being a bad idea, in my opinion.

3 - Who is using Play and what niche Play want focus (here we are using for small projects)?

A lot of startups are using it and it's getting more popular in the enterprise as well. There are a few Quora posts with more detail:

From what I've seen people are using Play both for the front end user facing app (often with a JS framework like Angular), and also for internal services.

4 -  Scala template is good. But for Java people? Nah! Can i change Scala template for Thymeleaf engine in Play 2.5?

Twirl (the scala template engine) basically compiles your template to a static method. Play doesn't really have any special integration with it besides the fact that SBT calls the template compiler when you recompile the app. There are many template engines that are designed to work with any kind of Java app, such as Jtwig and Freemarker, which should be just as usable from Play. I'm not that familiar with Thymeleaf.

5 - Ebean-ORM what is that? JPA Provider or more like JOOQ?

I have not used Ebean at all, but it's more or less an ORM. It's not built on JPA. Play also supports JPA though.
 
6 - Where can i find things about Play 2.5 (no problem with Scala)?

Check out the tutorials page of the documentation: https://www.playframework.com/documentation/2.5.x/Tutorials
 

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/fff92817-a782-46a0-b9d0-fd4dc0752df3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Senior Software Engineer

Reply all
Reply to author
Forward
0 new messages