Re: Interoperability with ExtJS

From: Marek Wawrzyczny (marek_wawrzyczn..nternode.on.net)
Date: Thu Feb 28 2008 - 06:38:24 EST

  • Next message: Michael Gentry: "Re: Extended Enumerations"

    Hi Andrus,

    I've been going through my unread email and came across this.

    This is really interesting, I've been thinking of this type of functionality
    for some time.

    I've used DWR recently to implement some AJAX calls. The thing about DWR is
    that the developer must implement a Facade with static methods which are then
    exposed by the DWR framework. One defines which methods and which properties
    of the entities are exposed in yet another xml config file.

    Initially, it would be good to see how a hand written app would handle Cayenne
    interaction and validation. Ideally we could write something that would
    automatically expose entities and CRUD operations for entities with defined
    client properties.

    I could investigate if DWR can be configured programatically.

    We could use the existing client configuration in cayenne to define which
    properties to expose in JS.

    Finally, I don't know how ExtJS works, but I'd imagine that the generic CRUD
    operations that need to be exposed are fetch, save(record) and fetch(record).
    Additionally we'd have to handle validation... if the methods are generic,
    writing the JavaScript to handle callbacks and decorate logic should be quite
    simple...

    I wonder if there is a sample web application (preferably using Spring as
    that's all I know atm) floating around I could use to prototype this. I'm
    still getting the hang of J2EE configuration :)

    Cheers,

    Marek Wawrzyczny

    On Mon, 21 Jan 2008 22:37:31 Andrus Adamchik wrote:
    > Dan,
    >
    > Like I said in my reply to Joe, my head hurts of all the JS framework
    > choices :-) I'd like us to design a service that can be integrated as
    > a data layer into the most of the leading frameworks... (if this is
    > even possible...) In this respect your experience with Spry and other
    > things JS may be helpful to us. So feel free to jump on the
    > discussion, that I hope will continue on dev.
    >
    > Andrus
    >
    > On Jan 21, 2008, at 9:39 AM, Daniel Kvasnička jr. wrote:
    > > Hi Joe,
    > >
    > > not exactly what you're asking for, but my experiences... As regards
    > > one-directional AJAX (server -> client), I use Cayenne with Adobe
    > > Spry's (http://labs.adobe.com/technologies/spry/home.html) XML
    > > DataSets and I've been very happy with this combination so far.
    > > Cayenne's suport for XML serializarion is a big plus for that. I
    > > studied Ext for a while, but stayed with Spry, as it is more low-level
    > > and allows me to play with it more. Moreover, I like their idea of
    > > using custom XML namespaces on the client side instead of writing a
    > > lot of JS. I've written a JSP tag for that and now creating a new
    > > paginated AJAX-enabled list of records with deleting capabilities
    > > means writing one tag for me (as for the client side, and no editing).
    > >
    > > As for the other direction (e.g. ajax command to delete a row), I'm
    > > using jQuery and the plugin that integrates Taconite with it. I like
    > > Taconite's principle a lot. We've used DWR at work (not with cayenne)
    > > and I've been quite amazed, but for now I don't use it (maybe again
    > > because Taconite shields me from JS most of the time).
    > >
    > > Dan
    > >
    > > On Jan 20, 2008 7:14 PM, Joe Baldwin <jfbaldwi..arthlink.net> 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.
    > >
    > > --
    > > http://www.danielkvasnicka.net -- webdesign & corporate design,
    > > programování internetových a intranetových aplikací



    This archive was generated by hypermail 2.0.0 : Thu Feb 28 2008 - 06:39:12 EST