Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Struggling with packages
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim P  
View profile  
 More options Oct 8 2012, 4:59 pm
From: Tim P <tim.pig...@optrak.com>
Date: Mon, 8 Oct 2012 13:59:04 -0700 (PDT)
Local: Mon, Oct 8 2012 4:59 pm
Subject: [2.0.4] Struggling with packages

Hi
Almost all examples seem to ignore the issue of packages. I'm used to
putting my code in a package something like
<com>.<company><application><module> and I've tried to do the same with
play - but I end up with huge package strings everywhere - and then it (or
I) seems to get confused with error messages like "object Application is
not a member of package controllers" from routes_routing.scala.

So does everyone just throw the whole package thing out of the window - at
least for controllers and views? What is the recommendation?
Thanks
Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Felix  
View profile  
 More options Oct 8 2012, 5:24 pm
From: Thomas Felix <thomas.feli...@googlemail.com>
Date: Mon, 8 Oct 2012 14:24:02 -0700 (PDT)
Local: Mon, Oct 8 2012 5:24 pm
Subject: Re: [2.0.4] Struggling with packages

Personally I just use the default structure for the play app (so just a
package for controllers, views and models). But when I do a play module
which might get included in other apps I will stick to the "standard"
approach. I looked how the deadbolt plugin did it:
https://github.com/schaloner/deadbolt-2/tree/master/project-code/app look
at its package structure. Thats my approach. :)

Am Montag, 8. Oktober 2012 22:59:04 UTC+2 schrieb Tim P:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Roper  
View profile  
 More options Oct 9 2012, 12:08 am
From: James Roper <jrop...@gmail.com>
Date: Mon, 8 Oct 2012 21:08:11 -0700 (PDT)
Local: Tues, Oct 9 2012 12:08 am
Subject: Re: [2.0.4] Struggling with packages

One of the goals of play is to minimise complexity and code boiler plate.
 When writing a library that other code will depend on, name spacing things
carefully in packages that you know are going to be unique is very
important.  When writing a web application that you know no code is going
to depend on, then long package names just become boiler plate bloat that
you always have to deal with but never see the benefits of.  So Plays
philosophy is to keep things as short as possible, define conventions for
where to put classes (eg models, controllers, views) and add default
imports for example to templates for everything in these packages, and it's
not afraid to break old conventions to do this.

If you want a great play experience, then I'd advise that you go with the
flow and follow its conventions.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »