[Lift] Re: convention how to name classes in snippet package

2009-04-13 Thread Timothy Perrett


Tobias,

There is no need to have a direct relation between snippets and model
classes - why would you need to have a relationship? Snippets usually
encompass a small element of functionality that might be related to one or
more models - mapper or otherwise.

Personally, I like that fact there is no coupling out of the box. Of course,
you are free to name your snippets however you wish - if this involves some
postfix, you can do that no problems at all.

Cheers, Tim



On 13/04/2009 11:04, Tobias Daub hannes.flo...@gmx.li wrote:

 
 Hi There,
 
 Is there any convention about how to name classes in the snippet package.
 
 In the ToDo example the snippet that corresponds to the ToDo Model was
 named TD which is maybe not the best name.
 
 Would it be possible to prefix the class name with something, e.g.
 ToDoFactory? Factory is probably not a really good name as well...



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: convention how to name classes in snippet package

2009-04-13 Thread David Pollak
On Mon, Apr 13, 2009 at 3:04 AM, Tobias Daub hannes.flo...@gmx.li wrote:


 Hi There,

 Is there any convention about how to name classes in the snippet package.

 In the ToDo example the snippet that corresponds to the ToDo Model was
 named TD which is maybe not the best name.

 Would it be possible to prefix the class name with something, e.g.
 ToDoFactory? Factory is probably not a really good name as well...


Yeah, well... the problem was that I named the classes and methods and I
generally am sub-optimal at naming stuff.

There's no correspondence between model names and snippet names.  The
snippets are looked up by convention (although you can register snippet
handlers globally and on a page-by-page basis).  Name them how you want in a
way that makes sense for the over-all logic of what you're building... and
never, ever, ever, take my advice on naming things (except maybe Lift...
which turned out to be a good name.)




 thanks
 Tobias

 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---