The way I see it in REST architecture Resource is anything of interest which
in simple words can be either data or functionality.

After we create ListResource and IndividualResource for each data item we
have in our business domain (which already put 2:1 ratio between resources
and domain model) it is time to add the functionality resource.
In bank application there might be a resource for transferring money between
accounts. There is no TransferMoneyData (although there usually a log entry
for that) but it is an interesting functionality of the service.

My question is Should I have a generic Transaction resource to allow atomic
changes to any resource in my service which represent data?

Thank you,
Ido

On Thu, Dec 23, 2010 at 11:47 AM, Jim Webber <[email protected]> wrote:

> Hi Ido,
>
>
> > BULK resource are not so likable on RESTful people, but I guess it can
> work
> > really well for my case.
>
> I think you're both right and wrong here :-)
>
> You're wrong when you say RESTful people don't like bulk updates. We do,
> but we prefer those updates to be just the same as any other update - that
> is a PUT (usually) to a resource that represents many individual entities in
> the DB.
>
> People who don't understand REST will complain that there is no atomicity
> when the have to PUT updates to individual resources where there is a 1:1
> mapping between resources and the domain model. In general, O(resources) >>
> O(domain entities) in a RESTful system.
>
> You're right when you say it's a good fit for your use case - because it's
> the right thing to do.
>
> Merry Christmas,
>
> Jim
>
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to