I keep thinking that Play should generate all routes in a “routes”
root package (and then it should follow the path given in the
conf/routes file).
Guillaume, do you see any jeopardy in this approach?
@controllers.foo.routes.Home.index()
It's done this way to "see" the routes subpackage relatively from any
controllet package as "routes"
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
--
Guillaume Bort
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
I second Julien on this one - I don't find it very intuitive either
that routes are generated on a per-subpackage level rather than at a
root level. I mainly see 3 issues:
- this convention is more complex than having all routes in a "routes"
root package (where the same rule would apply in all cases and there
wouldn't be a need to think about edge cases)
- it probably makes it harder to implement IDE support
- it is one more change when coming from Play 1 which makes migration
more difficult
Manuel
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
Hi,
I second Julien on this one - I don't find it very intuitive either
that routes are generated on a per-subpackage level rather than at a
root level. I mainly see 3 issues:
- this convention is more complex than having all routes in a "routes"
root package (where the same rule would apply in all cases and there
wouldn't be a need to think about edge cases)
- it probably makes it harder to implement IDE support
- it is one more change when coming from Play 1 which makes migration
more difficult
Manuel
On Sat, Jan 14, 2012 at 9:48 AM, Julien Richard-Foy <j...@zenexity.com> wrote:
> The problem is that I don’t find intuitive the way play will add the
> routes package.
> Consider e.g. the following controller: http://paste.pocoo.org/show/534614/
> What I am supposed to expect from Play? Where will the routes be
> generated? I’m not even sure it will work (see:
> https://github.com/playframework/Play20/blob/master/framework/src/play/src/main/scala/play/core/Router.scala#L964).
>
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
Actually I think in real life developers may name their Scala objects
in upper camel cases so the current Play code should work in *most*
situations.
What I wanted to point out is that the reverse routing code generation
relies on a weak convention which might not be followed in some cases,
leading to limitations. On the other hand, putting all the reverse
routing code in the root package “routes” would not suffer of this
issue.
On Sat, Jan 14, 2012 at 2:00 PM, Sadache Aldrobi <sadek...@gmail.com> wrote:
> Well having everything in the routes package makes them not directly
> accessible from the same package/controller.
Hm, why is that a problem?
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/xx5Sjg6KtVUJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
--
Guillaume Bort