[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] better (?) than DOM
Hi. After getting up to speed with some of the new javascript user interface libraries that are out there, I connected some of what they are doing with a thread that's come up on this list from time to time. The perennial topic is "DOM programming is broken/clunky/doesn't fit task X well and should be replaced/enhanced/etc" I see a bunch of library code that's reinventing DOM programming, in other words it's adding helper functions that go way beyond native DOM functions like getElementById(), appendChild(), etc. Note that these libraries are trying to answer the question "better than DOM programming" for a very specific use, namely creating client side user interfaces in the web browser. I'm not aware of any crosstalk between JS library creators and anyone who may be working on formal enhancements to DOM. I think over the next year or so these libraries are going to consolidate and some good ideas will float to the top. This is jQuery code that defines click functions that animate a bunch of elements (and the animation triggers a callback as well): $(".collapse_group[a]").click( function () { $(this).parent().siblings("tr").slideToggle("fast", function() { $(this).each( function() { if ($(this).css("display") == "block") $(this).css("display", ""); }); }); }); This is a long way from pure DOM programming and it goes deep in javascript only territory. Parts of it though are pure shortcut across multiple DOM calls. Here's some more code from a jQuery plugin that eases (you may or may not agree) creation and insertion of DOM elements into a web page: $('#myDiv').append( $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'}, 'Hello Joe', $.I({},'!') ) ) ); .:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.:||:._.: ||:. Nathan Young Cisco.com->Interface Development A: ncy1717 E: natyoung@c...
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|