Hey all. I've got a fairly simple programming assignment to implement a web service utilising a RESTful interface. A large part of it is pre-written and I have to 'implement a RESTful interface for three public methods of a particular class'. I'm programming in Java and using Restlet 1.1 library.
The app is made up of a server, two resource classes, proxies (from which requests are made to the server), a package called 'logic' that contains a number of classes (one of which contains these 3 public methods).
As the thing stands right now, I have to possibly create some new resource classes and map them to URIs in the server class which I'm OK with. What I'm not sure about is if resource classes are intended to only access objects made available through the server's context or whether they can create and invoke methods on their own copies of the object (would this make the interface not restful?).
I'm sorry I can't give more information (I can't paste some code if anyone is interested in taking a look). Am I right in thinking that the idea of the RESTful interface would be that the server has, in it's context, references to objects/services hosted on some machine. The server exposes methods of these objects/services through URIs mapped to (in this case) Java classes. These resources (Java classes) then handle CRUD requests on the objects in the server's context?
I just read my post and it might seem confusing, so apologies if you have no idea what the hell I'm going on about but if anyone can point me in the right direction it'd be much appreciated.
Thanks
The app is made up of a server, two resource classes, proxies (from which requests are made to the server), a package called 'logic' that contains a number of classes (one of which contains these 3 public methods).
As the thing stands right now, I have to possibly create some new resource classes and map them to URIs in the server class which I'm OK with. What I'm not sure about is if resource classes are intended to only access objects made available through the server's context or whether they can create and invoke methods on their own copies of the object (would this make the interface not restful?).
I'm sorry I can't give more information (I can't paste some code if anyone is interested in taking a look). Am I right in thinking that the idea of the RESTful interface would be that the server has, in it's context, references to objects/services hosted on some machine. The server exposes methods of these objects/services through URIs mapped to (in this case) Java classes. These resources (Java classes) then handle CRUD requests on the objects in the server's context?
I just read my post and it might seem confusing, so apologies if you have no idea what the hell I'm going on about but if anyone can point me in the right direction it'd be much appreciated.
Thanks