AniDB:AJAX development: Difference between revisions

Couple of comments
(Couple of comments)
Line 18: Line 18:
The only shortcoming is that xsl is a pure declarative language. So to achive some dynamic formatting (e.g. say if you want every odd row in a table to have different style), may need runtime javascript.
The only shortcoming is that xsl is a pure declarative language. So to achive some dynamic formatting (e.g. say if you want every odd row in a table to have different style), may need runtime javascript.


There are some quirks though... e.g. I can't see the generated html source anymore. when I look at source, I see the xml only. dunno whether that's good or bad atm.
There are some quirks though... e.g. I can't see the generated html source anymore. when I look at source, I see the xml only. dunno whether that's good or bad atm. [''[[User:Rar|Rar]]-You're missing the fact the transform doesn't have to run in the browser. [http://xmlsoft.org/XSLT/ libxslt] has py bindings, try that. Or just CTRL+A/View Selection Source in foxy.'']


one nice thing about this is that the AJAX parts can be built directly on the xml so one common data format may serve the various clients (raw html, xslt, full ajax web app (see the javeline demo link I placed in the readme file))
one nice thing about this is that the AJAX parts can be built directly on the xml so one common data format may serve the various clients (raw html, xslt, full ajax web app (see the javeline demo link I placed in the readme file))
Line 83: Line 83:
* Ups: Server throws out the xml (no html at all), which is also used for ajax.  so theoretically, when we have ajax, xslt comes for free.  the style sheet is static.  meaning can be cached etc.  The xml file is also largely static (no dynamism due to user settings.  It only needs to change when anime data actually changes.)  Also allows splitting of data into domain.  e.g. the same basic anime xml used by all.  files and member only data can be sent in another separate xml to be merged on client's end.  XSLT is available on almost all modern browsers.
* Ups: Server throws out the xml (no html at all), which is also used for ajax.  so theoretically, when we have ajax, xslt comes for free.  the style sheet is static.  meaning can be cached etc.  The xml file is also largely static (no dynamism due to user settings.  It only needs to change when anime data actually changes.)  Also allows splitting of data into domain.  e.g. the same basic anime xml used by all.  files and member only data can be sent in another separate xml to be merged on client's end.  XSLT is available on almost all modern browsers.


* Downs: There are still some browsers that don't do xslt. Also, a little hard to debug (that's a developer's problem), coz the source cannot be seen (if you look at src of a xslt generated html page, you won't see the html. you'll see the xml)
* Downs: There are still some browsers that don't do xslt. [''[[User:Rar|Rar]]-Name one?'']


==== AJAX ====
==== AJAX ====
476

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.