dev@jsr311.java.net

Re: JSR311: The best practice to return primitive types from a RESTful service?

From: Heiko Braun <hbraun_at_redhat.com>
Date: Tue, 04 Dec 2007 21:12:10 +0100

+1

When thinking about the simple type discussion today I was wondering if
restricting the API in these terms isn't a better way to go.
I complete agree with Roy.



On Tue, 2007-12-04 at 12:05 -0800, Roy T. Fielding wrote:
> On Dec 4, 2007, at 2:00 AM, Liu, Jervis wrote:
> > I think we do need to support " int someMethod ()", this make it a
> > lot easier when people migrating their existing code to JSR-311.
> > For example, I may have following method in my POJO, it is just a
> > matter of adding extra JSR-311 annotations then I can expose this
> > POJO as a RESTful service.
> >
> > int getEmployeeAge(String employeeName) {
> > ...
> > }
>
> No, that would be encouraging folks to migrate one crappy design
> to another -- it has nothing to do with being RESTful. There is no
> way to "migrate" a POJO design to a RESTful design without completely
> redesigning the service. That is, in fact, the entire point -- design
> the service so that it matches the reality of network-based applications
> instead of doing RPC in yet another inefficient syntax.
>
> ....Roy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>