dev@jsr311.java.net

on templating and JAX-RS

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 04 Jun 2009 08:55:05 -0400

Talk to a Seam guy about JSF/templating/JAX-RS.

They had an example of something here:

http://www.seamframework.org/Documentation/RESTfulApplicationsWithSeam#H-ImplementingQconnectedqResources

-------- Original Message --------
Subject: Re: Templating/MVC and JAX-RS
Date: Thu, 4 Jun 2009 14:03:25 +0200
From: Christian Bauer <christian.bauer_at_gmail.com>
To: Bill Burke <bburke_at_redhat.com>
CC: Gavin King <gavin.king_at_gmail.com>
References: <4A27B2DC.2040604_at_redhat.com>
<A8A404DC-F9AE-4B7E-A0DC-F81D24AD1D88_at_gmail.com>
<4A27B4BB.4060808_at_redhat.com>
<8044D65C-076B-4584-83FE-14DCAA2775EC_at_gmail.com>
<4A27B5C4.2090604_at_redhat.com>


On Jun 04, 2009, at 13:53 , Bill Burke wrote:

> Your link is relevant, sort of...Can it be done in JSF/JCDI? I just
> don't want JAX-RS defining their own templating engine.

Well it certainly can be done with Facelets/JSF1 for outgoing
representations, I have tested that already. The same should be doable
in JSF2 with the "integrated" Facelets and even with JCDI although the
outjection part in my prototype is a neat solution.

The biggest issue is: How do you translate an incoming XHTML
representation back into a model graph? I can see several solutions
for that but none of them are easy to implement in JSF1 so I can't say
for sure if it's a good idea overall. I have not touched JSF2/JCDI.

So I'd say: This should probably not be a part of JAX-RS if it can be
successfully prototyped with JSF2/JCDI. Such prototyping might reveal
some minor changes or additions (like an annotation) that should be
made in JAX-RS 2.0 to support that feature.


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com