Simply create a new resource with its own URI. Pretty much any concept you want to make available to a client is a resource with a URI. The resource need not map to an object. The resource could read several objects, do some calculation, combine the object, etc, and then return the result.
Bryan On Jun 19, 2011, at 7:23 AM, infoSyS wrote: > There is this thing which I really can't understand about REST's concept. > Suppose I have a resource called Company which has the following attributes > : name, address, etc... and another resource called employee with the > attributes : name, companyName, etc.. > > The employeeResource class will implement a method to GET the company name > (having the ID identified in the URI) plus the other information ( adrress > ... etc ) > > The employeesResource class will implement a method to GET all the companies > names and relevant information > > same thing for the employee and employees resource class. > > Suppose the client wants to get the name of all employees and the name of > the company they work at and its address. so WHERE should the function that > performs this query be placed ? and what should be the URI in this case ? > here in this case we are not accessing only one resource, but two at the > same time as I can understand. > > PLEASE can any one help me understand this ? > > > > -- > View this message in context: > http://restlet-discuss.1400322.n2.nabble.com/Please-HELP-I-cant-understand-this-concept-tp6492786p6492786.html > Sent from the Restlet Discuss mailing list archive at Nabble.com. > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2769910 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2769923

