JavaScript: Beyond Copy & Paste

03 June 2005 »

Most web developers need several programming languages to carry out day-to-day tasks. JavaScript is one of those indispensable tools.

However, JavaScript’s easy implementation via copy and paste combined with a dearth of obvious development tools deters users from truly learning the language and its many capabilities.

This presentation will explain why you might want to take a closer look at JavaScript and see that it’s not always about pop-ups and drop-downs. We’ll take a look at the tools used for professional JavaScript development and see a few demonstrations of how scripts can interact with the browser, server-side resources, and even – in the case of the upcoming Mac OS X Tiger release – the operating system itself.

Dan’s experience with JavaScript harks back to 1997 and he has found creative uses and varied insults for it ever since.

Purpose: To inform an audience by enhancing their knowledge about JavaScript.
Audience: Web developers that use JavaScript regularly but don’t know where to begin to use it for more advanced things.
What they gain: Understanding of what JS can be used for and how to use it by developing with these tips.
Organization: Introduction, What is it, Why use it, How to use it, References

  1. Introduction
    1. My name and background, how I came to learn the topic.
    2. This is the golden age of JavaScript, when browser compatibility is a thing of the past, and JS is a standard.
    3. Ask how many people would say they truly know JavaScript?
    4. When asked to implement JavaScript, how do they do it? Copy/paste? Reuse existing?
    5. What do they use it for?
    6. Purpose of this presentation is to discuss the capabilities and common uses of JavaScript. Knowing what to use it for, we need to understand how to use it, even though we can simply copy and paste and since there are no real development tools for it.
    7. Problem: JavaScript has many capabilities, but it takes some skill to apply them.
    8. Solution: Show what it can be used for and how.
    9. Intended audience: PHP and other web developers who have a variety of skills. JavaScript is often overlooked as a skill to understand.
  1. What it is
    1. What it was meant to do
    2. History and Versions
      1. Netscape (LiveScript)
      2. Sun (LiveWire JavaScript)
      3. Microsoft (JScript)
      4. ECMA
    1. Browser Support
      1. Degrading gracefully / IBM’s policy on no critical functionality
    2. Security Questions
      1. XSS
      2. Cookies
    3. Myths
      1. JavaScript is *not* Java
      2. JavaScript *is* like Java
  1. Why use it, why learn it
    1. Common uses
      1. Forms
      2. Validation / Text manipulation
      3. Windows
      4. Sessions
      5. DOM manipulation / replicants / GMail
      6. Navigation
      7. Plugin detection
      8. Rich text editing
      9. ActionScript / SVG scripting
      10. Mac OS X Tiger Dashboard scripting
  1. How to use it / work with it
    1. Best practices
      1. Clean code
      2. Clean division of files
      3. Being a good JavaScript citizen
      4. Be robust
    2. Coding standards
      1. Variables
      2. Functions
      3. Objects
    3. Objects
      1. Encapsulation
      2. Reuse
    4. Analyzing code (better known as stealing)
    5. Practical examples
      1. Replicants
        1. DOM manipulation
        2. Crude text additions
      2. Callback functionality
      3. Validation w/ DHTML
      4. Slideshow
    6. Stuff you didn’t know you could do
      1. Includes
      2. Dynamic loading of server side resources
    7. Performance considerations
      1. Caching
      2. Objects
  1. Demo
    1. CST (form validation, replicants, popup/parent population, rich text editing)
    2. Slideshow (objects)
    3. Dogabase (form synchronization)
    4. SVG (scripting)
    5. GMail
  1. References
    1. Tools
      1. Eclipse
      2. HomeSite
      3. JSDOM
      4. JavaScript Console [Tools > JavaScript Console]
      5. DOM Inspector
      6. Venkman
      7. MS Script Debugger
    2. New York Front End
    3. Books
      1. “Professional JavaScript,” 2nd Edition published by Wrox. [This book seems to be out of print. It was released in late 2001 and was/is still a fantastic resource]
      2. “JavaScript: The Definitive Guide (2nd Edition)” by David Flanagan published by O’Reilly
      3. “Dynamic HTML: The Definitive Reference (2nd Edition)” by Danny Goodman published by O’Reilly
      4. “JavaScript & DHTML Cookbook” by Danny Goodman published by O’Reilly
      5. “Creating Applications with Mozilla” published by O’Reilly
    4. Libraries
      1. CivetWare
      2. JS O Lait
    5. Links
      1. JavaScript Templates
      2. JavaScript: The World’s Most Misunderstood Programming Language
      3. Mozilla resources “For Web Developers
      4. Keep JavaScript Simple
      5. Common Web Design Errors
      6. Starfleet Academy” JavaScript Challenge
      7. Mac OS X Tiger Dashboard
      8. QuirksMode
      9. Crouching Javascript, Hidden PHP
      10. DevGuru JavaScript Quick Reference
      11. CSS Properties To JavaScript Reference Conversion
      12. GMail
      13. XMLHttpRequest Object
        1. Dynamic HTML and XML: The XMLHttpRequest Object
        2. Using the XML HTTP Request object
        3. XMLHttpRequest for The Masses
      14. Ajax
        1. Call an apple an apple
        2. Ajax: A New Approach to Web Applications

Leave a Reply