Is it possible to mix NakedObjects and RestfulObjects?

Jun 14, 2012 at 4:44 PM

I have an existing NakedObjects based service (ModelFirst from pre-existing database) that is both as  a useful tool and a way to prototype and demonstrate capabilities to endusers . Ideally I would like to evolve from the existing NakedObjects based system towards a future RestfulObjects based system as I develop my understanding and detailed usecases.

This implies having one domain model accessed by both  NakedObjects and RestfulObjects, with some interfaces provided through NakedObjects and other  interfaces through RestfulObjects, and looking to end users as one system (although with different cosmetic styles depending on which interface is being used)

Is this possible?  If I can't then I will have to be ingenious in my change management!

Thanks

Laurie

Jun 14, 2012 at 4:56 PM
Hi Laurie.

We are planning to do exactly the same thing and it is completely possible.
If I understand right, Naked Objects MVC will be upgraded to work with MVC 4 as soon as the latter is released, and then you can run the Naked Objects and Restful Objects interfaces in the same MVC project / host application.
This will make things really simple I think.
But Richard will be able to give you more info on this.

Jacques
Developer
Jun 14, 2012 at 5:29 PM
Edited Jul 10, 2012 at 12:13 PM
In fact, this is doable right now, albeit using two different web projects against the same domain object.
When I run in dev mode, I have NO MVC on port 8080 and RO on port 7070. When deployed, I have NO MVC on http://localhost:80/App and http://localhost:80/Rest.
I can also point you to some code [1]. This is actually a demo for a talk I'm doing (tomorrow, as I right this) in London at [2]. So consider this a sneak peak... it's my version of Jim Webber's "RestBucks" example [3] (nb: this link does not constitute an endorsement of that book!)
Cheers
Dan
Coordinator
Jun 14, 2012 at 8:46 PM

Another useful point is that -  if you run this as two parallel apps (sharing the same data and same model projects) you can use authorization to control which parts of the model are visible to users of the two different interfaces (MVC and RO).

Jun 15, 2012 at 12:45 PM

Thanks for the input, Tally Ho!

Laurie