dev@jsr311.java.net

Re: Goal: POJO-based

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Mon, 23 Apr 2007 19:59:28 +1000

Hao,

I am with Jerome on this. I dont really see how representational state can
leak java idioms--can you give us any examples? I really dislike the idea of
contract-first programming (we're back to SOA and wizdull).

Also xml is not a platform or language-independent medium. When you convert
something to xml, you're dependent on xml and all the problems it entails
(schema, versioning, legacy dtds...). The advantage of API-neutral web
services (a la RESTful web-services) is that we have no such dependence
(except on the web and its idioms--i.e. http and http methods). It's
conceivable that a web service is consumed as Json, html, or raw formats
(like fastinfoset or jpeg). I would hate to think everything is converted to
text/xml as an intermediary! =)

Dhanji.


On 4/23/07, Stefan Tilkov <stefan.tilkov_at_innoq.com> wrote:
>
> On Apr 23, 2007, at 9:34 AM, Hao He wrote:
>
> > hi, Jerome,
> >
> > I guess that the issue is more at the architectural level rather
> > than at the API level. Surely you can model resources using POJOs,
> > but it will leak Java semantics. This would cause interoperability
> > problems to others on other platforms. I know I am very XML biased,
> > but isn't the idea of XML is to have a platform/language
> > independent data format?
> >
>
> But we're not concerned with language independence, are we? After all
> this is a Java API.
>
> I have some understanding for your concerns, given that I positively
> hate the approach taken by most Web services toolkits, including .NET
> (defining service contracts in the programming language, i.e. code-
> first vs. contract-first). But we don't *have* a contract -- I have
> no objections to WADL as long as it's a by-product and not a pre-
> requisite.
>
> Stefan
> --
> Stefan Tilkov, http://www.innoq.com/blog/st/
>
>
>
> > Regards,
> >
> > Hao
> >
> >
> > -----Original Message-----
> > From: Jerome Louvel [mailto:jerome.louvel_at_noelios.com]
> > Sent: Mon 23/04/2007 17:19
> > To: dev_at_jsr311.dev.java.net
> > Subject: RE: Goal: POJO-based
> >
> >
> > Hi Hao,
> >
> > In the REST style, the same resource can have multiple
> > representations: XML,
> > JSON, HTML, etc. I don't think that designing a RESTful application
> > around
> > XML documents (as a contract) it the only or best way. Relying on
> > POJOs to
> > model resources seems a good approach to me.
> >
> > Best regards,
> > Jerome
> >
> >> -----Message d'origine-----
> >> De : Hao He [mailto:Hao.He_at_objectconsulting.com.au]
> >> Envoyé : lundi 23 avril 2007 09:10
> >> À : dev_at_jsr311.dev.java.net
> >> Objet : Goal: POJO-based
> >>
> >>
> >> I have a mixed feeling about this goal here. On one hand,
> >> the goal of the Web is to integrate with everything.
> >> Clearly, a POJO is something valuable and it makes sense to
> >> expose it as a Web citizen. On the other hand, if we think
> >> about SOA, the danger is that a developer may use a POJO as
> >> the interface contract rather than, say, a predefined XML
> >> document. Is this issue in-scope for this API?
> >>
> >> Hao
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> > For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
> >
> >
> > <winmail.dat>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> > For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>
>