Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

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


Creating Portable and Modular Client-Side Scripts

March 15, 1999

Since the early days of browser-supported scripting, code was simply embedded within the HTML document. Easy at first, but this rubs against the grain of the traditional programming goal to create modular and portable code. As scripts have grown into ever more complex programs it becomes increasingly important to adopt the philosophies of programming languages versus simple markup. Several enhancements to the scripting environment help the developer separate program code from HTML markup. This article examines the few methods available today for externalizing your Web scripts in attempting to keep them modular, portable, and outside HTML. Experience with HTML markup and embedded scripts will be useful; we'll be using JavaScript as our de facto scripting language.

In the evolution of browsers from mere hypertext viewers towards meta-operating systems we gained the ability to process data and interaction from within the browser. Where previously we had to rely on the Web server to execute any instructions, the introduction of LiveScript which quickly morphed into JavaScript enabled Web developers to execute certain types of scripts on the client-side, saving bandwidth and increasing response time. At first, script code was simply embedded within the HTML document, but this rubs against the traditional aim of programming to create modular and portable code. Several enhancements to the scripting environment help the developer separate program code from HTML markup; while still immature, these techniques indeed work towards the goal of taking Web scripting seriously. This article examines the few methods available today for externalizing your Web scripts in attempting to keep them modular, portable, and outside HTML. Experience with HTML markup and embedded scripts will be useful; we'll be using JavaScript as our de facto scripting language although there are alternatives (Microsoft's VBScript, ActiveState's PerlScript, etc.)

Contents:

Why not embed?


Up to => Home / Authoring / Scripting




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers