The Simply Lift REST chapter

274 views
Skip to first unread message

David Pollak

unread,
Mar 8, 2011, 10:20:49 PM3/8/11
to liftweb
Folks,

For those of you who want to do REST web services with Lift, please see:

Note some recent additions to the Lift REST API:
  • prefix allows you to define a path prefix once rather than repeating it over and over (it also works around the nasty Scala pattern matching bug https://lampsvn.epfl.ch/trac/scala/ticket/1133 )
  • An example of RestContinuation.async
  • and the handy dandy mergeJson which is helpful for JSON posts that over-write some fields in a Lift-json serialized object
Thanks,

David

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

Noah Nordrum

unread,
Mar 9, 2011, 12:41:35 PM3/9/11
to Lift
David,

WOW! That must have taken forever to write, but as someone coming into
lift/scala, it was *VERY* helpful.

One of the things I hate about languages that have so many helpers/
dsls (*cough* perl *cough*) is that it totally makes sense if you have
mastered the language, but just looks like gibberish as you're trying
to learn. This helped break down the "gibberish" by showing how we got
there. Reminds me of how you want to punch your Calculus prof in the
face when they show you the trick for doing derivatives after you
suffer for a week doing it the long-form way, but in retrospect, you
understand it better. Maybe not the best analogy since I don't want to
punch you in the face...

Thanks!



On Mar 8, 9:20 pm, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> Folks,
>
> For those of you who want to do REST web services with Lift, please see:http://stable.simply.liftweb.net/#cha:HTTP-and-REST
>
> Note some recent additions to the Lift REST API:
>
>    - prefix allows you to define a path prefix once rather than repeating it
>    over and over (it also works around the nasty Scala pattern matching bug
>    https://lampsvn.epfl.ch/trac/scala/ticket/1133)
>    - An example of RestContinuation.async
>    - and the handy dandy mergeJson which is helpful for JSON posts that
>    over-write some fields in a Lift-json serialized object
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890

David Pollak

unread,
Mar 9, 2011, 12:55:32 PM3/9/11
to lif...@googlegroups.com
On Wed, Mar 9, 2011 at 9:41 AM, Noah Nordrum <nnor...@ideafidelity.com> wrote:
David,

WOW! That must have taken forever to write, but as someone coming into
lift/scala, it was *VERY* helpful.

One of the things I hate about languages that have so many helpers/
dsls (*cough* perl *cough*) is that it totally makes sense if you have
mastered the language, but just looks like gibberish as you're trying
to learn. This helped break down the "gibberish" by showing how we got
there. Reminds me of how you want to punch your Calculus prof in the
face when they show you the trick for doing derivatives after you
suffer for a week doing it the long-form way, but in retrospect, you
understand it better. Maybe not the best analogy since I don't want to
punch you in the face...

Well, I feel punched in the face in the best way possible. ;-)

When I was in high school, I was distracted in calculus by the girl who sat behind me.  I didn't pay attention to the teacher after the first few weeks, so I never learned the shortcuts and every exam was me working through the derivations and integrations from scratch.  Thanks for that most excellent memory and I hope you enjoy Lift.
 

Thanks!



On Mar 8, 9:20 pm, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> Folks,
>
> For those of you who want to do REST web services with Lift, please see:http://stable.simply.liftweb.net/#cha:HTTP-and-REST
>
> Note some recent additions to the Lift REST API:
>
>    - prefix allows you to define a path prefix once rather than repeating it
>    over and over (it also works around the nasty Scala pattern matching bug
>    https://lampsvn.epfl.ch/trac/scala/ticket/1133)
>    - An example of RestContinuation.async
>    - and the handy dandy mergeJson which is helpful for JSON posts that
>    over-write some fields in a Lift-json serialized object
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Blog:http://goodstuff.im
> 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 lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@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

Paul Dale

unread,
Mar 9, 2011, 5:42:06 PM3/9/11
to lif...@googlegroups.com
On Wed, Mar 9, 2011 at 6:41 PM, Noah Nordrum <nnor...@ideafidelity.com> wrote:
David,

WOW! That must have taken forever to write, but as someone coming into
lift/scala, it was *VERY* helpful.

If you like this and are new to scala then you should definitely read Beginning Scala. The thing I liked about his approach was that he builds up to the higher-level concepts in terms of the fundamentals.

tomer doron

unread,
Mar 9, 2011, 9:35:36 PM3/9/11
to Lift
i have a short write up on how to do generic restful "routes" using
the above and reflection. check out
http://tomerdoron.blogspot.com/2010/11/ruby-on-rails-style-routes-with-lift.html

Maarten Koopmans

unread,
Mar 10, 2011, 6:39:43 AM3/10/11
to lif...@googlegroups.com
Thanks for this work, I find myself less needing it, but still peeking every now and then...

Reply all
Reply to author
Forward
0 new messages