internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










 
THE XML FILES
A WebDeveloper.com Feature

Not All SMILs
Part 2

By Nate Zelnick

Let’s take a simple presentation that consists of a set of static pictures that are displayed at certain time triggers while an audio track plays.

<smil>
 <head>
  <layout>
   <region id="audio" left="0" top="0" height="1"
width="1" z-index="1"/> <region id="image" left="0" top="0" height="350"
width="400" z-index="2"/> </layout> </head> <body> <par> <audio id="audio1" src="somesounds.wav" region="audio"/> <seq> <img id="img1" src="foo.gif" region="image" dur=10s> <img id="img2" src="bar.gif" region="image" dur=17s> etc. </seq> </par> </body> </smil>

This markup denotes a presentation that has an audio track that starts when the documents loads. As the audio starts playing, the presentation flips through a set of images that relate to the audio at certain time triggers.

To build this same simple application using DHTML, CSS and the DOM, a developer must be familiar with the all three development modes (i.e. construction of a structure layer, a presentation layer and expose those elements as unique subclasses for control via scripting) and must construct all of the timing logic by hand. In terms of discrete tasks, this would look something like this:

  • Begin with media elements
  • Build document division element for the image area of the screen with positioning attributes
  • Construct a simple timer script (a loop inside a loop that increments a second counter every 1000 milliseconds)
  • Construct a switch statement that listens to the timer variable
  • Place the source attribute of the image element in the document division at the appropriate switch inflection points
  • Test against different client implementations of scripting, CSS and DOM to ensure that everything works as planned.

Now, admittedly, I’m being a little unfair here. At this point, RealNetwork's G2 beta doesn't support all of SMIL, so tread carefully. The value 'indefinite' for the duration (<dur>) attribute, for instance, will cause G2 to choke. But the point is that the efforts in hand-assembling a time-based presentation using script requires a totally different set of skills than those required to build a multimedia application. In addition, this hand-cobbling is open to some of the same compatibility issues that SMIL detractors have complained about-—especially brittleness in moving between clients.

SMIL provides a very clean metaphor for describing how different elements relate over time. This approach is much more in line with the general character of the Web than the multi-skill, multi-programming metaphor of the hand-coded application.

Microsoft says that it will revisit SMIL when the spec evolves. Let’s hope that the clear superiority of the W3C’s approach has sunk in to the general Web framework by then, making full support a no brainer by all client vendors.

Next week: an assessment of XML support in 5.0 browsers.

[ Click here to return to the first part of the article ]

Fast Jump to Anywhere on WebDeveloper.com®:



internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs


Contact the WebDeveloper.com® staff

Last modified: Friday, 22-Aug-2008 13:46:48 EDT

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
VRML / 3D
XML