I wanted to implement this kind of technology for some time.
Unfortunately given all other things we are working on, I didn't get
too far in actually doing it.
My first idea was to provide a JS client for Cayenne ROP, but then
we'd have to code ObjectContext implementation for the client side...
Seemed like an overkill at the time... Now that I checked ExtJS, it
looks like its Store concept can serve as an analog of a caching
client context, with a benefit being that it is already tied to a
bunch of nice UI widgets...
DWR looks very promising as a back-and-force data transport, tied to
the ExtJS Store on the client... So the last missing piece is a DWR
Cayenne service... We can follow ROP (HessianService) in defining such
service... although since the same DataContext will be used for JSP
page generation as well DWR request processing, we don't have to write
any Cayenne bootstrapping code, and simply use
DataContext.getThreadDataContext()... Instead of supporting all types
of queries like ROP does, the JS service can (and should - for
security reasons) support only mapped named queries.
I think it should be fairly easy to build such framework for the
simplest case of fetching and updating a single entity... Handling
relationships can be trickier.
Anyways, that's some food for thought. If you are motivated to build
such framework, maybe we can collaborate on it on cayenne dev list? I
won't promise to dedicate much time to it, but I am very interested in
this technology as I said above, and would like to see it either as a
part of Cayenne or readily available to Cayenne users via other venues.
Andrus
On Jan 20, 2008, at 8:14 PM, Joe Baldwin wrote:
> Has anyone gotten ExtJS-grid playing well with Cayenne via JSP? I
> got the demo (below) working on my Tomcat server using a static XML
> file as the datasource, but that is far removed from bi-directional
> communication with Cayenne. Check out the field-editing
> capabilities of this interface:
>
> http://extjs.com/deploy/dev/examples/grid/edit-grid.html
>
> The problem is that ExtJS tutorials fall somewhat short of proving
> that ExtJS-grid can interoperate with an ORM (even though they claim
> that it works with JSP). There is one comment about using DRW to
> accomplish this easier.
>
> http://getahead.org/dwr
>
> But again, I have seen no working example that proves the concept.
>
> If the answer is no, then I will continue hammering on it and then
> post the results. My theory is that an "Editable Grid" (aka
> spreadsheet-interface-pattern), JSP, and Cayenne would be a powerful
> combination.
>
> Joe
>
> PS I have been using Cayenne for a few months now in development,
> and it is one of the most stable components I have tested to date.
>
>
>
>
>
This archive was generated by hypermail 2.0.0 : Sun Jan 20 2008 - 16:18:58 EST