users@jersey.java.net

Re: [Jersey] using Lift templates with Jersey (was Re: [Jersey] custom TemplateProcessor not having its constructor injected?)

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 24 Apr 2009 13:30:38 +0200

On Apr 24, 2009, at 12:15 PM, James Strachan wrote:
>
>> I have just completed the JAX-RS 1.1 integration and we are going
>> to cut a
>> stable 1.1.0-ea (we are calling it "ea" because EE 6 is not final)
>> next
>> week.
>
> BTW the jersey-scalar changes are very trivial and low risk (so far
> just one implementation of MessageBodyWriter<NodeSeq>) - how about
> adding the scala stuff to trunk as they will be ready to release next
> week,

Go for it!


> but keeping the lift stuff (which is gonna take a little while
> to get right) to a branch?

OK.


>> I still want to explore this:
>>
>> http://blogs.sun.com/sandoz/entry/using_scala_s_closures_with
>
> Ah great stuff! I'd missed this post. (I'm now catching up on your
> previous scala blog posts... :)
>
> Yeah I'm sure there's loads of ways we can simplify both client side
> and server side handling of invariants/entity tags/conditional
> processing and so forth with Scala. Am sure pattern matching can be
> very helpful too (and on the client side too to conditionally process
> if/when results are returned).
>

Yes, i think we could probably create a new type of client API
inspired by the Java client API but leveraging many Scala features. I
suspect we can reuse the Java-based low-level handlers (reusing the
HttpURLConnection, Apache Client API and JAX-RS integration) but the
builder stuff could be reworked but yet may be compatible in terms of
syntax for easy conversion.

Paul.

>
>
>>> Then I was thinking there could be a separate jersey-lift library to
>>> add lift template support (which would also depend on liftweb). It
>>> might be there ends up being a few different template options in the
>>> Scala world; there's lifts, then Sweetscala uses freemarker
>>> http://code.google.com/p/sweetscala/wiki/MvcView
>>>
>>> folks might wanna use JSP/Velocity too maybe and maybe there'll be
>>> others.
>>
>> Agreed, it is definitely worth considering a number options here.
>>
>>
>>> I saw a JSP-with-scala like thing the other day but can't find
>>> it now.
>>>
>>
>> http://www.nabble.com/-scala-tools--Scala-Server-Pages-
>> td22709066.html
>
> Thats the one! Though I'm personally really liking the lift template
> idea; use real Scala code in Scala classes and just bind methods/maps
> to tags.
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>