Guys, After playing around with integrating Lift and Jersey before the Jersey guys did an 'official' integration and thinking hard about how i wanted to reference locations in data structures via URLs, i realized that zipper<http://en.wikipedia.org/wiki/Zipper_%28data_structure%29>(cf. this explanation <http://www.haskell.org/haskellwiki/Zipper>) is a much better, much more functional, generic and maintainable solution.
Briefly, the way this works is to automate the calculation of a context type, C(T), from a data type T. The context type will allow for the representation of locations in an instance of T in terms of contexts and holes. There's a natural way to get from contexts to paths. So, there's a natural map from URLs (viewed as paths) to locations. One great example of how this works in practice is Oleg Kiselyov's Zipper-based file system. The analogy between paths to files and URLs to resources should be clear. This has led me to look at where to cut the line on calculating zippers. As the wikipedia article mentions above, it is possible do this completely generically, provided one has a notion of differentiation on data structures; that is, the zipper can be expressed in terms of the derivative of a data structure. There are two natural (and somewhat competing) places to hang the differentiation calculation: - the new collections library for scala - the target of a mapping from one of the XML schema proposals to scala types Jorge and i were chatting about this the other day. Either route is a bit of a large task and i've got a bunch of other stuff on my plate right now. However, i'd be very happy to collaborate with anyone who wants to make this happen. Also, by the way, this works really well with a lot of other monadically based machinery. Best wishes, --greg On Fri, Jul 17, 2009 at 8:17 AM, TylerWeir <tyler.w...@gmail.com> wrote: > > >>Wait a few days, and I think there'll be some very good news on this > front. > > Tease! :) > > On Jul 17, 10:51 am, David Pollak <feeder.of.the.be...@gmail.com> > wrote: > > There are benefits to both approaches. I prefer the partial function > > composition, but annotations on Pojos have their place. > > Wait a few days, and I think there'll be some very good news on this > front. > > > > On Fri, Jul 17, 2009 at 7:28 AM, Timothy Perrett <timo...@getintheloop.eu > >wrote: > > > > > > > > > > > > > Hey guys, > > > > > I've been taking a look at Jersey and how it operates with Lift by way > > > of the recent integration that cropped up on dev.java.net... > > > > > From my perspective, I see how having a standard RS service framework > > > could be helpful, but it appears to bypass important lift concepts > > > like SiteMap etc so I'm just wondering what the benefit of using such > > > a layer would be over using DispatchPF etc to create REST services or > > > serving xml fragments for templates? (I have no idea about Jersey > > > apart from the basic docs ive read, so if im missing a major benefit > > > id love to hear discuss) > > > > > Cheers for any thoughts > > > > > Tim > > > > -- > > Lift, the simply functional web frameworkhttp://liftweb.net > > Beginning Scalahttp://www.apress.com/book/view/1430219890 > > Follow me:http://twitter.com/dpp > > Git some:http://github.com/dpp > > > -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---