users@jaxb.java.net

Re: What's a good Patern for the following?

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Tue, 25 Oct 2011 19:27:25 -0400

REST is different from SOA in that it focuses on the nouns of the model
(PET, VET) and not the verbs (registerForCheckup etc.).
The operations are the basic GET, PUT, POST, DELETE operations defined
by the HTTP protocol. In your model a RESTful way to do
registerForCheckup type verbs would be to define nouns like "Apointment"
and publish it via PUT or POST.

On 10/25/2011 04:11 PM, John Smith wrote:
> Say i have the following model
>
> class PET
> {
> name
> age
> }
>
> And I want to create a veterinerean REST service where you can
> register it for checkup or operation or what ever.
>
> So I have the following XML
>
> <VET>
> <Username>
> <Passowrd>
> <Pet>
> </VET>
>
> Whats the Best way to represent this as a model?
>
> class Vet
> {
> username
> password
> pet
> }
>
> Now that's just an example...
>
> Say I was creating a REST service for a general interface that gives
> access to various services...
>
> I want the base XML to be...
>
> <Services>
> <Username>
> <Password>
> Service specific XML here?
> </Services>
>
> Is there a specific pattern to this?
>


-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com