Simon Laws wrote:
On 8/31/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

Oisin Hurley wrote:
>> I am not sure I understand the issue with create/delete (except if
>> PUT and DEL are disabled). Posting/putting to a URL that doesn't
>> exist yet to create that resource can be troubling. Is that the
>> issue? Are you looking for some kind of factory service pattern to
>> create resources?
>>
>> Or am I completely mis-understanding the issue you're describing
>> here? :)
>
> Apologies for not making the context clearer - however, you've got the
> point:  there needs to be either a resource factory, or a generic
> resource
> holder to process create/delete of resources. I think I was attempting
> to say that a first cut would be ok to support just the GET/POST (as the > most pressing scenarios) and then the PUT/DEL and factory approach could
> follow as a feature improvement.
>
> I will put up a wiki summary on this thread.
>
>  cheers
>   --oh
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Yes, GET/POST first, PUT/DELETE later sounds reasonable to me.

I've been struggling myself with the question on whether or not we need
some kind of resource holder/factory to create resources, and I'm now
starting to think that it really depends on how you view your resources.

Just a wild thought here...

If you view your resources as objects, you'll probably say that you need
a factory to do customerFactory->create("http://..../customer/1234";).
Then you'll say customers->get("http://..../customer/1234";) to retrieve
your customer object.

If on the other hand you view the Web as a giant distributed file
system, then it's not so shocking to say:
customers->createFile("http://..../customer1234";);
customers->getFile("http://...../customer1234";);

Thoughts?

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Hi Sebastien

It's not clear that there is a difference between customers and
customerFactory in your example. You are saying that there is some resource
that causes the correct interpretation of PUT type requrests
w.r.tgenerating/recording new resources that represent customers. This
resource
itself may, for example, represent the list of customers it has created in
response to GET type requests. The relationship between Customers and
Customer is not a wired relationship in the SCA sense but  a resource
relationship as dictated by the URLs used to represent endpoints.

Regards

Simon


Simon,

I agree with what you're saying. I think that we've now closed a loop :) and that what you're saying is in line with the proposal at the bottom of http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg06704.html

Then we raised the question of whether or not the create verb in particular should be handled by a separate factory.

And in this last email I was trying to say that somebody coming with an OO view would probably want that factory separate from the actual resources (and that I was initially in that camp some time ago), but that now I'm seeing these resources more like a file system (with no separate factory) where: customers.get("http://my.customer.database.com/customers/1234";); returns an instance of the Customer XSD complex type for customer 1234 customers.put/post("http://my.customer.database.com/customers/1234";, customerDataObject / or a diff) creates/updates customer 1234 with a Customer instance. customers.get("http://my.customer.database.com/customers/";) returns a list of URIs to the customers.

Is that consistent with your view?

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to