Tim, Dispatching snippets by registering with LiftRules is much faster than the "by convention" mechanism of looking up the class name. It's also type-safe (an issue that Greg Meredith ran into last week.) So, it's a few more lines of code, but better. Unless you've got a Stateful Snippet, you shouldn't be keeping any state information in the snippet instance and thus object is better than class.
Thanks, David On Sat, May 2, 2009 at 7:27 AM, Timothy Perrett <timo...@getintheloop.eu>wrote: > > Guys, > > I noticed that the internal lift snippets (msgs et al) have been moved > to objects rather than classes - there are obvious benefits > performance wise for this, but what should we be supplying to new- > comers as the de-facto snippet implementation style? I know the answer > is unlikely to be clean cut, but perhaps we should document the pros / > cons of both approaches? > > Thanks, Tim > > > -- 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 -~----------~----~----~----~------~----~------~--~---