in

Emerald Hand

Emerald Hand, Inc. community home page.

This Blog

  • Home
  • Contact
  • About
  • Directory of Computers/Tech Blogs

Syndication

News

I'm back to blogging

Worm in liquid maze

Design and development of information management tools.

JavaScript Logging

A List Apart has recently published an interesting article on JavaScript Logging. Doing any kind of debugging in JavaScript can quickly turn into nightmare due to the browser differences and often undocumented browser "features". So tools like component described in the article above can help any web developer. I'm glad to see a lot of very useful tools starting to appear to help with JavaScript coding and debugging. There're for example JavaScript Lint (script validator) and Drip (IE memory leak detector). I'm kind of curious though why these tools just started to appear now. JavaScript has been around for many years or am I missing something?

If any of the tools are used as components (logger, etc.), great care must be taken. JavaScript is a pretty slow language with a lot of overhead. In some aspects JavaScript programming is like programming for an old computer (I'm talking about 20 years ago) where developers had to conserve resources and pay close attention to CPU cycles. Using any components directly in the script can easily increase script execution time by several seconds. It would be very nice if it were possible to enable/disable logging, basically making any log calls as short as possible. Another good option would be to have various places the log can sent to: actual webpage, different webpage, server (via XMLHttp), local file, etc.

I would like to see another component similar to Debug.Assert appear in JavaScript. It's really just a conditional logging. This can help with contract programming in JavaScript and assumption testing. Still it will need to be very fast to minimize any performance impact on the code, especially in the production environment.

Share this post: Email it! | bookmark it! | digg it! | reddit!
Readability Stats: Word Count: 284; Sentence Count: 19; Grade Level: 9.1, more info...
Published Sep 07 2005, 01:29 PM by Ornus
Filed under:

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Ornus

Lead Sider and Xelog developer. I'm interested in information and how we can better manage it using computers. I'm also into design and understanding how to creating cool, useful, simple things.
Copyright © 2006-2007 EmeraldHand, Inc. All rights reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems