[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

better (?) than DOM

  • From: "Nathan Young -X \(natyoung - Artizen at Cisco\)" <natyoung@c...>
  • To: "XML Developers List" <xml-dev@l...>
  • Date: Wed, 21 Feb 2007 16:02:40 -0800

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.