News for hackers. Stuff that matters.
Re:The Play Framework at LinkedIn by brikis98 on Thursday February 21, 2013 @02:50PM (#5259775)
Play actually has a really nice plugin system, which we used extensively to integrate Play at LinkedIn. The plugin system offers lightweight support for DI. For example, to use a FooPlugin, you don't use it directly, but ask Play for an instance of it:

FooPlugin foo = Play.current.plugin(FooPlugin.class); foo.doSomething();

What instance you get depends on configuration (typically, a play.plugins file), which makes it easy to swap out implementations at test time. Much of Play's built-in functionality is implemented as a plugin too, including the DB code, so writing unit tests is pretty simple. There is strong support for "fake applications", integration tests, etc: http://www.playframework.com/documentation/2.1.0/ScalaTest

We'll blog more about Play plugins in the future.

There are no comments on this comment yet.