Hi Dan,

As hinted at before [1], I have to integrate with Joomla CMS (which is 
PHP-based) - where "user" objects must be created within Joomla (to 
ensure all tables are correctly populated, even as the database 
schema changes).

I have found a sort-of REST API for Joomla[2] which takes any URL of 
the form: 
http://server.domain/rest/<action>.<rep>
and invokes the (PHP) function called "action", encoding the data 
based on "rep" (e.g. .xml, .json, etc). Example:
http://server.domain/rest/newuser.json
http://server.domain/rest/newuser.xml
http://server.domain/rest/finduser.json
http://server.domain/rest/listusers.json
etc
(ok, not quite adhering to the REST spec,  but useable for my 
purposes, I hope - I think the spec would be closer to having just 
"user.json", and letting the invocation method GET, PUT, POST 
determine what happens - all this in controlled by the "user.php" class, 
which I write)..

Thus, in Isis, I have a workflow that looks a little like this:
*) An Isis service action is invoked to request that a new user is 
created,
*) That action invokes the REST service on Joomla, the result is the 
user ID..
*) etc.

Later on, when a user administers their personal information via the 
Isis application, certain updates need to be pushed back to the Joomla 
system, again, via REST (update user).

I have some complex workflow rules that I don't want to recode in 
PHP... (e.g. when a user changes their email address, postfix must be 
called to rebuild the alias table) and Joomla offers reasonable CMS / 
blogging functionality.

There is another idea to fully use the Joomla REST API as a full-
function objectstore for the user objects...

Robert has given me some guidance on how to make an objectstore 
that should be able to map only "user" objects onto the Joomla REST 
service, while all other objects map onto (for example) a SQL 
objectstore. When I get it working, I'll post a summary here (and 
probably add it to the Isis domain library).

Regards,
Kevin



[1] http://www.mail-archive.com/[email protected]/msg02312.html
[2] http://techjoomla.com/joomla-extension-news/joomla-rest-api.html

On 26 Oct 2011 at 17:16, Dan Haywood wrote:

> Hi Kevin,
> I've used the client-side library within JBoss Resteasy, which is pretty
> lightweight/low-level.  Basically it will generate client-side proxies, cf
> Axis stubs.
> 
> Whether that's RESTful is another matter... purists would probably argue
> that it's creating a coupling between client and server.
> 
> The other question to consider is what representations you'll be processing.
>  As you know, the json-viewer I'm working on in Isis uses, erm, Json.  The
> json-applib is a client-side library that runs on top of Resteasy with
> additional support for processing JSON representations (that conform to the
> spec I've been defining at http://restfulobjects.org).
> 
> Can you provide some more detail on what you want to do?
> 
> Dan
> 
> On 26 October 2011 17:01, Kevin Meyer - KMZ <[email protected]> wrote:
> 
> > Dear all,
> >
> > I was looking for a Java REST client....
> >
> > I did a quick net search and hit a StackOverflow question[1] with a list
> > of suggestions.
> >
> > Has anyone used any of the following:
> > rest-assured [2]
> > REST with ease [3]
> > resting [4] with a quick tutorial [5]
> >
> > Or would one of the Apache projects (e.g. CXF [6]) be more
> > appropriate - but conside that I just want a lightweight client....
> >
> > Jersey? [7]
> >
> > I'm tempted to use resting or rest-assured...
> >
> > Regards,
> > Kevin
> >
> > [1] http://stackoverflow.com/questions/221442/rest-clients-for-java
> > [2] http://code.google.com/p/rest-assured/
> > [3] http://igorpolevoy.blogspot.com/2011/01/java-rest-with-ease.html
> > [4] http://code.google.com/p/resting/
> > [5] http://code.google.com/p/resting/wiki/TwoMinuteTutorial
> > [6] http://cxf.apache.org/
> > [7] http://jersey.java.net/

Reply via email to