Re: [Lift] Snippets in subpackages?

2010-03-03 Thread David Pollak
On Tue, Mar 2, 2010 at 11:42 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 On 3 March 2010 00:03, David Pollak feeder.of.the.be...@gmail.com wrote:



 On Tue, Mar 2, 2010 at 1:05 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,

 Isn't it possible to put snippets in subpackages of xxx.snippet?
 Something like lift:snippet
 type=com.acme.snippet.subpackage.SnippetClass?

 If not, what's the best way to deal with a large number of snippets?


 Explicitly registering the snippet dispatch in LiftRules is the way I'd
 recommend doing it.  If this is less than 100% optimal for your use case,
 let's learn more about your use case and see if we have to expand how
 Snippets are looked up.


 Well, registering quite a lot of snippets is indeed less than 100% optimal.

 OK, I have got a not-so-small website with about 100 templates and
 snippets. The templates are organized as a tree, e.g. /login/signup/seeker,
 /login/signup/offerer, etc. There is not a perfect 1:1 relationship between
 templates and snippets, but for sake of simplicity let's assume so. Hence I
 would like to organize my snippets in packages according to the templates,
 e.g. ...snippet.login.signup.Seeker, ...snippet.login.signup.Offerer, etc.


One of the things I do with page-specific snippets is call them out in
SiteMap:

Loc(..., Snippet(foo, snipetFunc))

But it might also be interesting to explore a model like Wickets:

foo/bar/page.html - look in snippets.foo.bar in addition to the normal
snippets package... would that help?



 Thank you,

 Heiko

 Company: weiglewilczek.com
 Blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Snippets in subpackages?

2010-03-03 Thread Ross Mellgren
On Mar 3, 2010, at 11:25 AM, David Pollak wrote:
 On Tue, Mar 2, 2010 at 11:42 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:
 On 3 March 2010 00:03, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Tue, Mar 2, 2010 at 1:05 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:
 Hi,
 
 Isn't it possible to put snippets in subpackages of xxx.snippet?
 Something like lift:snippet type=com.acme.snippet.subpackage.SnippetClass?
 
 If not, what's the best way to deal with a large number of snippets?
 
 Explicitly registering the snippet dispatch in LiftRules is the way I'd 
 recommend doing it.  If this is less than 100% optimal for your use case, 
 let's learn more about your use case and see if we have to expand how 
 Snippets are looked up.
 
 Well, registering quite a lot of snippets is indeed less than 100% optimal.
 
 OK, I have got a not-so-small website with about 100 templates and snippets. 
 The templates are organized as a tree, e.g. /login/signup/seeker, 
 /login/signup/offerer, etc. There is not a perfect 1:1 relationship between 
 templates and snippets, but for sake of simplicity let's assume so. Hence I 
 would like to organize my snippets in packages according to the templates, 
 e.g. ...snippet.login.signup.Seeker, ...snippet.login.signup.Offerer, etc.
 
 One of the things I do with page-specific snippets is call them out in 
 SiteMap:
 
 Loc(..., Snippet(foo, snipetFunc))
 
 But it might also be interesting to explore a model like Wickets:
 
 foo/bar/page.html - look in snippets.foo.bar in addition to the normal 
 snippets package... would that help?

I have wanted this for a while, I think it would be great.

-Ross

-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Snippets in subpackages?

2010-03-03 Thread David Pollak
On Wed, Mar 3, 2010 at 8:27 AM, Ross Mellgren dri...@gmail.com wrote:

 On Mar 3, 2010, at 11:25 AM, David Pollak wrote:

 On Tue, Mar 2, 2010 at 11:42 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 On 3 March 2010 00:03, David Pollak feeder.of.the.be...@gmail.comwrote:

 On Tue, Mar 2, 2010 at 1:05 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,

 Isn't it possible to put snippets in subpackages of xxx.snippet?
 Something like lift:snippet
 type=com.acme.snippet.subpackage.SnippetClass?

 If not, what's the best way to deal with a large number of snippets?


 Explicitly registering the snippet dispatch in LiftRules is the way I'd
 recommend doing it.  If this is less than 100% optimal for your use case,
 let's learn more about your use case and see if we have to expand how
 Snippets are looked up.


 Well, registering quite a lot of snippets is indeed less than 100%
 optimal.

 OK, I have got a not-so-small website with about 100 templates and
 snippets. The templates are organized as a tree, e.g. /login/signup/seeker,
 /login/signup/offerer, etc. There is not a perfect 1:1 relationship between
 templates and snippets, but for sake of simplicity let's assume so. Hence I
 would like to organize my snippets in packages according to the templates,
 e.g. ...snippet.login.signup.Seeker, ...snippet.login.signup.Offerer, etc.


 One of the things I do with page-specific snippets is call them out in
 SiteMap:

 Loc(..., Snippet(foo, snipetFunc))

 But it might also be interesting to explore a model like Wickets:

 foo/bar/page.html - look in snippets.foo.bar in addition to the normal
 snippets package... would that help?


 I have wanted this for a while, I think it would be great.


Does that mean you just signed up to write it? ;-)



 -Ross

  --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Snippets in subpackages?

2010-03-03 Thread Jeppe Nejsum Madsen
David Pollak feeder.of.the.be...@gmail.com writes:


[...]

 One of the things I do with page-specific snippets is call them out in
 SiteMap:

 Loc(..., Snippet(foo, snipetFunc))

That's actually a neat trick! I've been using this as well, but more in
a CRUDify style way. I'm still trying to come up with some good ways to
organize this in a modular fashion...

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Snippets in subpackages?

2010-03-02 Thread David Pollak
On Tue, Mar 2, 2010 at 1:05 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Hi,

 Isn't it possible to put snippets in subpackages of xxx.snippet?
 Something like lift:snippet
 type=com.acme.snippet.subpackage.SnippetClass?

 If not, what's the best way to deal with a large number of snippets?


Explicitly registering the snippet dispatch in LiftRules is the way I'd
recommend doing it.  If this is less than 100% optimal for your use case,
let's learn more about your use case and see if we have to expand how
Snippets are looked up.



 Heiko

 Company: weiglewilczek.com
 Blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Snippets in subpackages?

2010-03-02 Thread Heiko Seeberger
On 3 March 2010 00:03, David Pollak feeder.of.the.be...@gmail.com wrote:



 On Tue, Mar 2, 2010 at 1:05 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,

 Isn't it possible to put snippets in subpackages of xxx.snippet?
 Something like lift:snippet
 type=com.acme.snippet.subpackage.SnippetClass?

 If not, what's the best way to deal with a large number of snippets?


 Explicitly registering the snippet dispatch in LiftRules is the way I'd
 recommend doing it.  If this is less than 100% optimal for your use case,
 let's learn more about your use case and see if we have to expand how
 Snippets are looked up.


Well, registering quite a lot of snippets is indeed less than 100% optimal.

OK, I have got a not-so-small website with about 100 templates and snippets.
The templates are organized as a tree, e.g. /login/signup/seeker,
/login/signup/offerer, etc. There is not a perfect 1:1 relationship between
templates and snippets, but for sake of simplicity let's assume so. Hence I
would like to organize my snippets in packages according to the templates,
e.g. ...snippet.login.signup.Seeker, ...snippet.login.signup.Offerer, etc.

Thank you,

Heiko

Company: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net

-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.