Oracle Magazine Special offer for AjaxImpact.com Visitors!! Subscribe to Oracle Magazine for Free!
AJAX IMPACT



AJAX NEWS
Cross-Browser Widgets
05/09/2009, by Peter Michaux



Building DHTML widgets for the general web is hard. By "general web", I mean the widget will be used on a web page that is accessible to any user with a web browser. The user may be physically disabled and using a screen reader. The web browser may be on a modern cell phone with archaic JavaScript support. Any combination of images, CSS, JavaScript in the browser may be turned off. The browser may be Internet Explorer. Building for the general web is building for 10000+ browser/operating system/configuration combinations. We cannot code specifically for each combination and we cannot test all the combinations. We must rely on state of the art practices:

- separation of concerns (i.e. HTML content, CSS presentation, JavaScript behavior)

- feature detection (i.e. not browser sniffing)

- progressively enhancements (a.k.a. graceful degradation)

The most difficult part of building a widget for the general web is coordinating the timing of all feature tests and DOM manipulation that need to happen when the page loads. An HTML page is rendered incrementally as it arrives. The page may be visible to the user at various stages of loading. We must ensure the page looks good at all points in the process for all visitors. Not every user will have the same experience when visiting the page. Some users will see widgets and others will see plain HTML if their browsers cannot support the widgets. Our goal is that all users will have a good experience by providing a pleasing visual and interactive page based on the browsers capabilities and by avoiding any JavaScript errors being thrown.

Unfortunately many front-end developers throw there hands up in frustration and convince the boss that "supporting a few recent versions of four (or three (or two)) modern browser with images, CSS and JavaScript turned on is good enough." Then they pull out the old navigator.userAgent (or a JavaScript library that uses it) and other hacks and before you know it their web page is broken for something like 15% of visitors. If the page is an purchase order form, that is a big loss in potential sales. It would have been better if the developers had just left the page as static HTML.

   Read More...


 Rate this Ajax News
 Rating: 5.7 out of 6 votes cast

AJAX NEWS
05/15/2009 A tutorial on Prototype, Google Maps API and the HeatMapAPI
05/15/2009 The World's Most Popular Programming Language Has Fashion and Luck to Thank
05/09/2009 Cross-Browser Widgets
05/08/2009 Monadic parser library for JavaScript
05/05/2009 They Shoot Browsers, Don’t They?
05/01/2009 Feature Detection: State of the Art Browser Scripting


INDUSTRY NEWS
05/19/2006 Ajax grabs center stage at JavaOne, By Tony Baer
05/15/2006 Oracle to boost AJAX, Java , By Paul Krill
05/13/2006 Open AJAX Group Drafts Development Plans, By Stacy Cowley
05/13/2006 AJAX Powers Interactive Marketing ASP, By AjaxWorld News Desk
05/12/2006 AJAX Experts Tackle Security, Other Issues , By Darryl K. Taft
05/11/2006 Adobe Releases Spry Framework for AJAX, By AjaxWorld News Desk
More 
       

      © 2008 ajaximpact.com. All rights reserved.