5 ms·
I'm very interested in working on a Javascript framework where you work directly with XML (for data and event binding) and let XSLT handle transforming it to HT
by whichdan 12y ago
I'm very interested in working on a Javascript framework where you work directly with XML (for data and event binding) and let XSLT handle transforming it to HTML -- imagine React, except you work with XML instead, and treat it as an interface for your HTML.
Email me if you'd like to chat about it!
- mslot 12y agoI guess JSX is a decent start.
- HillRat 12y agoYou can do some interesting things by embedding XSLT and XML into script tags, then wiring them up with MutationObservers -- I just hacked together a quick-and-ugly example of a Knockout-style reactive interface, and it works just fine. The big drawbacks are that your interface is still pretty noisy (though you can preprocess some of those XML headers and CDATA section tags into the page if necessary), and using XPath or DOM functions to update the XML isn't really very fun. Still, though, it'd be interesting to see what could be done with it, even if it's probably not a front end I'd like to wrestle with for daily development.
- whichdan 12y agoThe cool thing is that jQuery/Sizzle can use normal DOM selectors on an XML document, so there is a little flexibility there, and like you said, MutationObserver is pretty excellent. Getting rid of the noise is my biggest concern. Ideally, a developer should never have to know about or touch the HTML that's being generated. It's a lofty goal, for sure.