Rather than complain about things, it would be helpful if you offered suggestions or alternatives. You complained about Lift's use of Maven to bootstrap without offering alternatives.
On Tue, Feb 9, 2010 at 8:54 AM, Hugo Palma <hugo.m.pa...@gmail.com> wrote: > I just read http://wiki.github.com/dpp/liftweb/about-snippets and i > have the following question: > > So is really the only way to avoid having a reflection call every time > you use a snippet What is your objection to using reflection? > to use a DispatchSnippet with a case statement for > every method ? > Keep in mind that a Map() in Scala is a partial function, so you can do the following: class MySnippets extends DispatchSnippet { def dispatch = Map("hello" -> hello _, "bye" -> bye _) def hello(in: NodeSeq): NodeSeq = ... def bye(in: NodeSeq): NodeSeq = ... } > It's just that i don't really think that the case is a very clean way > of doing things. So, what's cleaner? What web framework do you know of that doesn't use reflection, doesn't use XML configurations and doesn't do explicit mapping? > Can be ok for a couple of methods but it can be > really ugly with more than that. > > So, is there any other way ? > There are numerous ways to associate snippets globally or with a particular page. If you could talk about your goals or alternatively the way your favorite web framework does things, that would be a lot more helpful. Thanks, David > Thanks. > > -- > 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<liftweb%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.