This is just a short post illustrating the latest updates in my Play-Angular-RequireJS Seed.
The biggest obvious change is the update to the latest version of the Playframework, 2.4. Play 2.4 offers several ways of using Dependency Injection. In my opinion, a Scala project should aim to use compile-time DI, so the seed uses exactly that. It’s simple to use, type-safe, and eliminates a lot of global state. If you prefer using Guice or any other runtime DI mechanism, it shouldn’t be too hard to change that.
This is also means the seed now uses the injected router, and controllers are no longer objects but classes that get instantiated in
AppLoader, which replaces
Angular is now at version 1.4 (it’s hard to keep up-to-date with latest minor version though). RequireJS, Underscore, and so on have been updated as well.
Mucki Seiler updated Bootstrap to 3.3.5, and also added two new base LESS files that make it super easy to change Bootstrap’s layout and colors.
The seed now also uses
JodaDate instead of
java.util.Date, which you should do in all of your projects.
Thanks go out to all the other pull requests for version updates!
I’ve added a really helpful compiler flag I recently discovered,
-Xcheckinit. It helps you track down initialization problems when mixing many traits, which is typical when using the cake pattern. And since Play 2.4 requires Java 8, the target JVM is now 1.8.
Resolvers now use https instead of http. Make sure to update this in all of your projects, otherwise you are running at a serious security risk!
If you have anything that’s missing from the seed, please open a GitHub issue.
As usual, the easiest way to get started is to create a new project using Activator by typing
activator new and then enter
play-angular-require-seed as the template. In the newly created project, look for all the
TODO you have to fill or change.
Finally, if you’re interested in receiving news about the blog and about the seed, please sign up for my newsletter. I’m also planning to release a “Pro” version of the seed in the future.