PDA

View Full Version : client vs server and xslt vs dom



Herm
1 Dec 2006, 12:44 AM
I have some multi variant and hairy (but not totally extreme) xml coming back that I would like to normalise into an YAHOO.ext.grid.XMLDataModel. I think I have a few options and would like to get feedback from folk more experienced than I:

Option 1. Just accept the xml and override the YAHOO.ext.grid.XMLDataModel.loadData with my own worrisome code.

Option 2. Just accept the xml and override loadData but use YAHOO.ext.Element and DomHelper to walk the xml (will this even work?) and then do worrisome things with it.

Option 3. Not just 'accept the xml' but rather transform it using sarissa or google's ajaxslt or some other client side xslt (so it's normalised for use by a XMLDataModel).

Option 4. Do option 3 server side (I own the server side too so I could do that if pressed) but since it it is generic output on the server side I'd rather leave it that way and have my apps do the transforms.

Any other options I haven't thought of...

jack.slocum
1 Dec 2006, 6:04 AM
Option 5:

Create a version of loadData that accepts your app's standard output. :D

Herm
1 Dec 2006, 11:42 AM
Isn't that the same as option 1?

jack.slocum
1 Dec 2006, 11:53 AM
I assumed Option 1 was custom for each model.

If option 1/5 is undesirable, then I would go with 4 as it would probably net the best performance for the user and could be done in a generic manner.

Herm
1 Dec 2006, 12:00 PM
Yeah, I see your distinction. Option 5 is the way I'll go then with 4 (server side) as backup if/when required. Thanks. This stuff is just swilling round at the moment...