views:

29

answers:

0

Hello.

In order to understand jQueryUI widgets better, I was looking at the code. One thing that bothered me was that the layout was generated using Java Script. I know that the Java Script in turn is churning out XHTML but I wonder why that is needed?

Few thoughts that hover in my mind are:

  • The layout could be supplied in exclusive html files as XHTML markup. Only the interactions that would require Java Script (jQuery I mean) could be part of .js file.
  • The fact that the markup is being document.writ(ten) by the browser would surely have performance implication (although not huge)
  • Code readability suffers due to markup being rendered by Java Script
  • Extending (or editing) a widget becomes challenging
  • Or I am missing some crucial reasoning for how it is :) ... so please fill me with your thoughts.