magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1999 > 11 > Script Junkie

Building Components in JavaScript

By Steve Johnson

When I first heard about components, they were hailed as the silver-bullet solution for software engineering problems. Imagine -- a software engineer could assemble applications from a catalog of standard parts, just like a kid with a box of Legos. Although we aren't quite at the Lego stage yet, components are a great way to get a lot of reuse from your code. This article will demonstrate an approach to building lightweight components using JavaScript. Specifically, it gives examples of custom components based on HTML GUI objects, and a framework for putting them to use in your own Web applications.

Note that for the source code, I've used Microsoft's version of JavaScript, JScript for Internet Explorer 5.0 -- see the box titled " Browser Compatibility Issues" for details. However, for simplicity's sake I'll continue to use the more generic name JavaScript throughout the story.

Building Components

To make use of components in any programming environment, you need two things: The components themselves, and a framework to integrate them in your applications. The components usually adhere to a standard interface that hides their implementation details. The interface definition is what differentiates JavaBeans from ActiveX components. Standardization of the interface also lets you use components interchangeably in the framework.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2