On 11/07/2013 04:03 AM, James Roper wrote:
> On Thu, Nov 7, 2013 at 9:17 PM, Yevgeniy Brikman <
brik...@gmail.com
> <mailto:
brik...@gmail.com>> wrote:
>
> Ugh, don't even get me started on ThreadLocal. I'll start a totally
> separate discussion for that :)
>
> That said, how do we move this discussion forward? I've seen only a
> few concrete ideas so far:
>
> 1. Stick with the current system, which is a mix of stateful
> singletons and reflection based DI for controllers and plugins.
> 2. The pull request
> 3. The roll-your-own-main method mentioned by Julien. I can't help
Yeah, we do need to fix the singleton app thing but we will have to wait
for 2.4. As James said our priorities for 2.3 are the client side and
the Java side.
Jim: In the meantime is there an easy way to reduce the pain you are
feeling, like:
https://github.com/playframework/playframework/pull/1433
>
> Jim
>
> On Wednesday, November 6, 2013 5:50:29 PM UTC-8,
> implementation in that pull request, but I /really/
> like the general idea. The combination of a simple
> "getInstance" interface used for all controllers and
> plugins seems like an excellent way to make Play
> apps extremely modular and flexible; combined with
> easy access to Play's default injection mechanism
> seems like this would be a nice win. I also wonder
> if this design would allow Play to get away from the
> stateful singletons, such as play.api.Play, making
> testing/mocking/etc far easier.
>
> Did you guys have any concerns about an approach of
> this sort?
>
> Jim
>
>
> On Tuesday, November 5, 2013 8:51:35 PM UTC-8,
>
james...@typesafe.com wrote:
>
> Hi Jim,
>
> Have you seen this pull request?
>
>
https://github.com/__playframewo____rk/playframework/__pull/1433
> <
https://github.com/playframework/playframework/pull/1433>
>
> I think it provides what you want, plus more
> (such as the ability to use DI with plugins, and
> tie that into Play's DI support for controllers).
>
> Out of the box everything still works the same
> way, but any part of the current plugin
> framework can be replaced, including plugin
> location, plugin instantiation, etc.
>
> We're sitting on it because we're not 100% sure
> about what the future requirements for Play are,
> but if you think this will be good, then perhaps
> we might revisit this PR again.
>
> Cheers,
>
> James
>
>
> On Wed, Nov 6, 2013 at 3:43 PM, Yevgeniy Brikman
> <
brik...@gmail.com> wrote:
>
> At LinkedIn, we've made heavy use of Play's
> plugins API: that is, classes that extend
> play.api.Plugin and are added to an app by
> putting them into conf/play.plugins. Some of
> the benefits we've seen:
>
> 1. An easy way to tie into Play's lifecycle
> (onStart/onStop)
> 2. Users can easily pick and choose which
> plugins they want
> 3. Easy to replace a plugin at test time
> using FakeApplication
> 4. Easy to override parts of existing
>
play-framework-dev...@googlegroups.com.
> For more options, visit
>
https://groups.google.com/__grou____ps/opt_out
> <
https://groups.google.com/groups/opt_out>.
>
>
>
>
> --
> *James Roper*
> /Software Engineer/
> /
> /
> Typesafe <
http://typesafe.com/> � Build reactive
> apps!
> Twitter: @jroper <
https://twitter.com/jroper>
>
> --
> You received this message because you are subscribed
> to the Google Groups "Play framework dev" group.
> To unsubscribe from this group and stop receiving
> emails from it, send an email to
>
play-framework-de...@googlegroups.com.
> For more options, visit
>
https://groups.google.com/__grou__ps/opt_out
> <
https://groups.google.com/groups/opt_out>.
>
>
>
>
> --
> *James Roper*
> /Software Engineer/
> /
> /
> Typesafe <
http://typesafe.com/> � Build reactive apps!
> Twitter: @jroper <
https://twitter.com/jroper>
>
> --
> You received this message because you are subscribed to the
> Google Groups "Play framework dev" group.
> To unsubscribe from this group and stop receiving emails
> from it, send an email to
>
play-framework-d...@googlegroups.com.
> For more options, visit
>
https://groups.google.com/__groups/opt_out
> <
https://groups.google.com/groups/opt_out>.
>
>
>
>
> --
> *James Roper*
> /Software Engineer/
> /
> /
> Typesafe <
http://typesafe.com/> � Build reactive apps!
> Twitter: @jroper <
https://twitter.com/jroper>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Play framework dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
play-framework-...@googlegroups.com
> <mailto:
play-framework-dev%2Bunsu...@googlegroups.com>.
> *James Roper*
> /Software Engineer/
> /
> /
> Typesafe <
http://typesafe.com/> � Build reactive apps!
> Twitter: @jroper <
https://twitter.com/jroper>