spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / javascript / gr / column20 / 1

current pageTo page 2To page 3
[next]

Doodle, A Demo Drawing Program - Part 1

Introduction

Look around the Web and you'ill find a bustling menagerie of online applications providing services such as shops, calculators, e-mail, maps, games and more. Recently, some of the big Web players have even started working to provide online office suites; Google for instance has already made some inroads in this direction with a JavaScript spreadsheet aplication and its recent purchase of Writeley, a word processing program.

From my perspective as an I.T. developer, what's immediately noticble in many of these Web sites is a complete lack of structure regarding the JavaScript code running on each page. Conspicuous in its absense is the use of JavaScript's object oriented capabilities, functions are loosely tied together working on global variables without any attempt to namespace or organize them into classes. In many ways the applications on the Web today resembles the wild west with prospectors staking out claims to their piece of Internet turf. In my experience, however, the sphagetti coding that pervades many of these new applications has only one consequence; difficult to understand applications of limited complexity and sophistication.

For the past year I have been working with Adaptix Technologies on the development of www.preezo.net, an online slide-presentation application. From the outset, we intended to buck the trend in JavaScript applications and use solid software design practices, many of them borrowed from experience working with Windows applications. In this article and the ones that follow I will demonstrate some of the techniques adopted while working on this application by developing a Web based drawing package (I've called it "Doodle" so as not to confuse it with another well known demonstration drawing applications).

Where To Start?

There are numerous ways to begin developing a new application. Some favor the rigorous approach centered around the use of sophisticated software design tools (or pen and paper for the old fashioned). 

In contrast is an exploratory approach where components are coded and experimented with to see how they can work together. The overall design of the application is evolutionary in nature and generally is secondary to the user interface and look and feel. The main advantage of this approach is speed. Prototypes can be thrown together, tested and even released to the public for alpha testing in very short time frames. In the current atmosphere of rapid application deployment this can mean the difference between success or failure.

I would like to strees that my aim in these articles is not to push any one particular design-process over another, but to promote the use of object oriented techniques and demonstrate how a structured application design can help build complex yet robust Web applications.

For the purposes of this article I will start with the canvas, the most central visible part of any drawing page.

The job of the canvas is to display the user's drawing and to accept the users input to allow the user to manipulate and add to the drawing.

A simple input device.

Click and drag the mouse over the 'canvas' on the left to sketch a simple drawing

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / javascript / gr / column20 / 1

current pageTo page 2To page 3
[next]



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
How to Create an Ajax Autocomplete Text Field: Part 6 · Software Engineering for Ajax · Perl Pragma Primer
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Using File Virtualization for Disaster Recovery · VoIP Security: SIP—Versatile but Vulnerable · Around the World in 80 Nodes

Created: June 15, 2006
Revised: August 3, 2006

URL: http://webreference.com/programming/javascript/gr/column20/1