+1 I.e., what Rob said.

Take care,
John

On Apr 8, 2009, at 17:15 , Rob Heittman wrote:

> JAX-RS = JSR 311.  JAX-RS is available as a Restlet extension.
>
> I'll point out one elephant in the room, though: the JAX-RS  
> extension has not yet received the same level of attention as other  
> Restlet extensions that were developed by the core Noelios team.   
> Even the Restlet-GWT extension I lead was mainly ported by  
> Jerome ... I just helped over implementation hurdles and provided  
> concrete use cases and documentation.  Anyway.  The JAX-RS extension  
> doesn't feel as "finished" as the core of the project, because it's  
> not.  This probably ain't right.
>
> Also: JAX-RS feels a lot to me like JPA.  I can mark up any old POJO  
> with annotations that brilliantly, even miraculously generate glue  
> for a particular paradigm (REST or relational persistence).  But, to  
> me, either one still amounts to a very lovely, silver filigreed,  
> impeccably wrought glue gun.
>
> If I'm writing RESTful web services, I want a thoroughly RESTful  
> architecture surrounding me, dammit ... which is what Restlet  
> provides.  I want my Resources to know all about it and leverage it  
> to the hilt.  They are where the rubber meets the road; where the  
> underlying system is modeled in a RESTful way.
>
> So I'm kind of like Lars here, a conscientious annotation  
> objector  :-)  But I also think I see what Jerome is doing too --  
> providing annotations that aren't meant to be a generalized glue  
> gun, but a way to straightforwardly tell Restlet things that might  
> take a lot of boilerplate to do otherwise.  This is a neat idea.  It  
> seems like it's not meant to be a generic "RESTify your POJO"  
> mechanism -- which JAX-RS already is -- but a way to author Restlet  
> Resources with less effort and perhaps even less pratfalls.  I  
> haven't played with it enough to know whether it fills that role  
> effectively ... I may not get a chance before it's too late to  
> really comment.
>
> The broader concern I have ...  well, I vainly think I see the point  
> of the new Resource annotations because I have become a hard core  
> Restlet developer.  Still, what does a newbie think?  It's confusing  
> to have two slightly different annotation systems in play at once.   
> It looks like Restlet is taking on JAX-RS with an alternative, and  
> the user must choose one.  The message traffic seems to reflect this  
> confusion is already happening.  I think having a Restlet  
> @Get("form") and a JAX-RS @GET is probably more confusion than a lot  
> of folks can swallow.
>
> Hibernate seems to have played it well by heavily internalizing the  
> JPA spec, using JPA where it fits, and providing custom annotations  
> where it doesn't.  Maybe wrapping JAX-RS in a tighter embrace and  
> making it more core to Restlet is part of the solution.
>
> Or, to solve the confusion, it may be as simple as modulating the  
> annotation names.  I don't know:  @ResourceGets("form") instead of  
> @Get("form") or such.  This would make clear that it's a Restlet  
> thing and not an abstract standards-driven RESTful markup thing.
>
> Anyway ... my personal preference is to leave the darned things out  
> entirely, so perhaps I oughtn't to be operating my keyboard to  
> comment on this.  I only like to use annotations for purely compile- 
> time code management purposes (@ThreadSafe, @SuppressWarnings) and  
> not really ever for functional purposes.  Pass the boilerplate and a  
> side of fries.
>
> - Rob
>
> On Wed, Apr 8, 2009 at 7:35 PM, Erik Beeson <[email protected]>  
> wrote:
> Jerome was on the JSR 311 expert group but Restlet doesn't support it?
>
> --Erik
>
>
> 2009/4/8 Rémi Dewitte <[email protected]>
> I can see that Jérôme has already answered a great deal of my  
> questions in this thread :)
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1596334
>
> Rémi
>
> 2009/4/8 Rémi Dewitte <[email protected]>
>
> Hello,
>
> I struggle to get convinced to the use of annotations for resources  
> from all I can read from various threads.
>
> I have the feeling to lose most of the reasons to use Java.  
> MediaTypes are strings, I find the implementation a bit tricky with  
> reflection forced to be cached to be fast, classloaders issues. I  
> guess there is a rule to handle annotations with class hierarchies,  
> etc.
>
> I totally understand that some people like annotations and the work  
> it has triggered was a good way to get the resource API even better.
>
> What are the benefits of using annotations with Restlet ?
> Restlet annotations are a competitor of JAXRS, right ? To what  
> extend is it better ?
> Will annotations in restlet the "advertised" way of creating restlet  
> application ?
> What are the other planned uses of annotations ?
>
> Regards,
> Rémi
>
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1606738

Reply via email to