Client framework for RO?

Jun 26, 2012 at 1:13 PM

Hi there.

Do you guys have a list of client framework implementations to work with RO?

Coordinator
Jun 26, 2012 at 1:58 PM

There are no complete ones that we know of, although several under way.

- Johan Andries started one here: http://code.google.com/p/restfulobjects-js/   but I don't think it's been kept up to date.

- Similarly, our own first experiment exists here in the Restful Objects for .NET codeplex repository as 'RestfulObjects.ExampleSinglePageApp'.

- Stef is currently starting to explore a new, more sophisticated implementation using Backbone.js  - but it is not yet in a state worth making public.

- I think that Jeroen & Dan are planning another, but don't know of its status...

Developer
Jun 26, 2012 at 2:26 PM


On 26 June 2012 14:58, richardpawson <notifications@codeplex.com> wrote:

- I think that Jeroen & Dan are planning another, but don't know of its status...


Yes, there's a good chance that an ExtJS-based one will get written, but it's not at the top of our project plan. Realistically, nothing before Q4, and a good chance it'll roll over into 2013.

Dan


Jun 26, 2012 at 2:41 PM
Great, thanx guys.
Developer
Jun 27, 2012 at 7:49 AM

Just to say, over on Apache Isis we now have another contributor, Adam Howard, whose working on a viewer very similar to Johan's DnD viewer.  Note: this is against RO v0.56, so isn't compatible with RO.Net yet, but it will be, in time.

You can read Adam's email here: http://mail-archives.apache.org/mod_mbox/incubator-isis-users/201206.mbox/%3CCAN5Lg04BPa4Sbnejf6VVgiOhjmoKfVxbJNii7q3fc27bTtt_ww%40mail.gmail.com%3E

Dan

Jun 27, 2012 at 7:59 AM
Thanx
Coordinator
Jun 27, 2012 at 8:28 AM

That's good to hear, Dan  -  but wouldn't Adam be better off coding against RO v.1.0.0  (perhaps using our demo application temporarily) from the outset?  It would mean a lot less re-work for him as Apache Isis catches up with the spec.

Developer
Jun 27, 2012 at 3:16 PM
Edited Jul 10, 2012 at 12:13 PM

I think I made him aware of the fact that RO.Net is at 1.0.0, but I get the impression he's a Java guy through-n-through.

You know, Github, heroku, that sort of thing...
Dan
Jun 28, 2012 at 3:17 AM

Hello all,

Dan told me about the discussion going on in this list and I thought I would introduce myself.

My name is Adam Howard and yes, I am one of those Java developers :) And while I am not opposed to using .NET I have nowhere to run it as I am also a Mac user.

One of the great things about RestulObjects is we can all share our viewers (if they are generic) even though they may be developed on completely different stacks.

If you'd like to see what I've been working on you can check out a small sample app at http://simple-dusk-6870.herokuapp.com/arow-fpc.html. Login as sven/pass. Or check out the code at https://github.com/adamhoward/arow. I'd be especially interested in anyone wanting to try it out on their own project.

I'm looking forward to any discussion related to RestfulObjects (or NakedObjects.NET/Isis).

--
Adam Howard

Coordinator
Jun 28, 2012 at 9:37 AM
Edited Jun 28, 2012 at 9:41 AM

Thanks for posting, Adam.  I've taken a quick look at your viewer and it looks very promising.

Yes, we're all very happy about the fact that generic viewers for RO will work with any server implementation of RO, whether Java, .NET or something else  - indeed that was one of the things that got me interested in RO last year.

The only point I was trying to make is that it won't work right now because Restful Objects for .NET implements the full 1.0.0 release of the RO spec, where Apache Isis implements only  v0.56 of the draft spec, and there were some significant changes to the representations between those two versions.

If you had the time I'm sure that the Isis guys would appreciate any offers of help in getting Isis up to the 1.0.0 spec  -  the lag is only a resourcing issue not a technical one as I understand it.  Then we would have proper interoperability.

My motivation in suggesting you looked at RO for .NET was not an attempt to woo you over to the dark side, but merely that it might be better for you to be building your library against the 1.0.0. spec and then (if necessary) adding some patches to work with the 0.56 spec.  

If you have any interest trying this out, I would be happy to give you a URL where you could access a demo RO API that we use on our servers, without having to do any installing/building/deploying of .NET code.

Richard

Jul 1, 2012 at 6:05 AM

Richard,

Thanks for the link to the demo RO API. I've been trying to make use of it for the past few days. However, I'm having trouble getting past the fact that the html and javascript of my viewer is running on my machine and the RO API is running on another machine. I can't make json ajax requests because of the Same Origin Policy. And I can't use the common workaround of making jsonp requests because the demo RO.NET server doesn't support it (neither does the Isis implementation). jsonp is mentioned nowhere in the RO spec so I'm not sure if we know how to standardize it's support.

I did notice that the SinglePageApp viewer you package along with RO.NET uses jsonp. I tried running that viewer locally but pointing to your server and still no luck. How are you getting around this jsonp support problem?

Since I haven't been able to develop my viewer directly against your server I've been comparing representations between RO.NET and Isis (using the JSONView extension to Chrome) and reading the RO 1.0.0 spec to find the differences. I now have a javascript object representing the two specs implemented (v0.52 and 1.0.0) and their unique properties (so far just several rel name differences.) On load I grab the specVersion property from the version resource and read in the appropriate spec object. Hopefully this will mean AROW will be compatible for both Isis and .NET until Isis reaches 1.0.0 and then this technique can be used to support backward-compatability while the spec continues to evolve.

Adam

Coordinator
Jul 2, 2012 at 1:09 PM

This is not a problem that we have solved yet  -  as you will be aware, it is a pretty generic problem in Restful systems.  

We were experimenting with jsonp in the SinglePageAppViewer that you looked at, but I can't honestly remember whether we had it working or not  -  I rather doubt it actually.  In any event, we don't think that jsonp is the answer, because, as I understand it, jsonp only works for GET requests anyway.

I think Dan was proposing at one point that the RO spec be extended to cover this scenario, using a tunneling approach, but this was not taken any further forward as I recall.

We think that a more promising angle would be 'CORS' (see e.g. http://en.wikipedia.org/wiki/Cross-origin_resource_sharing ).  We have no actual experience of this but, as we understand it, this would not require any change to the RO spec  -  we could just implement it within the Restful Objects for .NET server.  I'd be interested to hear your views on this? If you (and any others interested) agree then I'll raise a ticket for it.

Meantime, I'm not sure what else we can do.

1) I'd be happy to put your page on our demo server  -  but this isn't going to work for development/debugging purposes.

2) If you do have access to an IIS server, I could provide you with a complete deployable for a simple demo app -  so you wouldn't need to do any .NET development, but could easily upload/edit your own javascript / singlepageapp on that server.

If none of those work then it at least sounds to be that you're doing the right thing in explicitly testing for the RO version and using the appropriate representations.

Coordinator
Jul 2, 2012 at 3:19 PM

Further to my previous post, we have done some simple experimentation with CORS and it seemed to work.  If you send can send me the url your requests will be coming from, Adam, (email it to me as rpawson at nakedobjects dot net -  don't post it here) we can add you to the white list and try it out.

Jul 3, 2012 at 3:11 AM

Thanks Richard. The CORS setup is working now. I can communicate with your demo server fine.

I am having other problems though, but I'll start a new thread for them since this discussion is moving away from the original topic.

--
Adam Howard