JavaScript/: Difference between revisions
No edit summary |
|||
| Line 22: | Line 22: | ||
=== Netscape 4: The Bad Old Days === | === Netscape 4: The Bad Old Days === | ||
Back in those days, to support Netscape 4 meant using document.layers, which meant DFS was needed for image swaps: | Back in those days, to support Netscape 4 meant using document.layers, which meant DFS was needed for image swaps: | ||
<source lang=javascript"> | <source lang="javascript"> | ||
function findImage(name, doc) { | function findImage(name, doc) { | ||
var i, img; | var i, img; | ||
| Line 36: | Line 36: | ||
} | } | ||
</source> | </source> | ||
We hated it, of course! Around this time aListApart was getting bigger and promoting anti-Netscape4 pages or warnings. I had one on my site, as did Brainjar. | We hated it, of course! | ||
=== Pushing the Web Forward === | |||
Around this time (c2003), aListApart was getting bigger and promoting anti-Netscape4 pages or warnings. I had one on my site, as did Brainjar. | |||
Such code was to become a thing of the past. Instead, we focused on standards there. I learned a lot about the DOM from Brainjar and from reading specs. | Such code was to become a thing of the past. Instead, we focused on standards there. I learned a lot about the DOM from Brainjar and from reading specs. | ||
| Line 49: | Line 52: | ||
* Head First Design Patterns, Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson | * Head First Design Patterns, Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson | ||
I eventually found comp.lang.javascript, where I learned a lot more about ECMAScript from Richard Cornford ([http://jibbering.com/faq/notes/closures closures]), Lasse Reichstein | === Surly JavaScript Experts === | ||
I eventually found comp.lang.javascript, where I learned a lot more about ECMAScript from Richard Cornford ([http://jibbering.com/faq/notes/closures closures]), Lasse Reichstein Nielsen, Eric Bednarz, and Peter Michaux, and Thomas Lahn. My knowledge of the DOM deepened greatly during this time. | |||
=== RTFM! === | |||
My wife printed out a copy of the ECMAScript specification, which I kept bedside and read for months. I still have this copy. | My wife printed out a copy of the ECMAScript specification, which I kept bedside and read for months. I still have this copy. | ||
My interests now have returned towards fitness, health, athletics, and music. | === Aftermath === | ||
My interests now have returned towards fitness, health, athletics, and music. I have not had success in teaching music, so have to return to programming. | |||
But for what I've learned, I offer a background of how I got to what I know now. It was a long journey and I have a lot to offer. | But for what I've learned, I offer a background of how I got to what I know now. It was a long journey and I have a lot to offer. | ||
Revision as of 09:37, 31 October 2013
Hearken to the days of view-source:! The history of free online education for web programming led the web where it is today.
In this course, I'll explore Object Oriented JavaScript as it pertains to client side web programming.
Introduction
I started in the year 2000. For some of what I learned, I offer a background of how I got to what I know now.
Luddite!
"DHTML" is an old term, now. But the DHTML guys in 2000-2004 were the ones pushing and advocating standards-based code that became more common around 2004. Here's a little free QA for Mozilla, to put it in perspective.
Dan Steinman's Dynamic Duo's DynLayer was a wrapper or "Decorator". It worked in Netscape 4 and IE5. Dan explained all about how it worked and the source code was pretty easy to read.
Mike Hall's Brainjar had some really great articles, too. His article on Events and CSS were incredibly thorough and explained the intricacies and edge cases of these specifications and their implementations.
Soon, I would set off to build my own site much like these sites. I picked DHTMLKitchen.com.
DHTML Central forums came along and soon after that, 13th parallel. These were great sites that lead to many successful programming careers, including those of Tim Scarfe, Aaron Boodman, Daniel Pupius, Alex Russell, Michael van Ouwerkerk, Tom Trenka and many others. This was a stomping ground for us.
We helped each other out with testing and code checks. I got some help building this blast-from-the past: Dress Room! a Drag'n'Drop game for girls. That was live, until two months ago, when she deleted it in anger.
Netscape 4: The Bad Old Days
Back in those days, to support Netscape 4 meant using document.layers, which meant DFS was needed for image swaps: <source lang="javascript"> function findImage(name, doc) {
var i, img;
for (i = 0; i < doc.images.length; i++)
if (doc.images[i].name == name)
return doc.images[i];
for (i = 0; i < doc.layers.length; i++)
if ((img = findImage(name, doc.layers[i].document)) != null) {
img.container = doc.layers[i];
return img;
}
return null;
} </source> We hated it, of course!
Pushing the Web Forward
Around this time (c2003), aListApart was getting bigger and promoting anti-Netscape4 pages or warnings. I had one on my site, as did Brainjar.
Such code was to become a thing of the past. Instead, we focused on standards there. I learned a lot about the DOM from Brainjar and from reading specs.
OOP Books
Years later, I had some success in making some very detailed articles about JavaScript. I read books on object oriented programming, including:
- Agile Software Development: Principles, Patterns, Practices, Robert Cecil Martin
- Effective Java, Josh Bloch
- UML Distilled, Martin Fowler
- Refactoring, Martin Fowler
- Domain Driven Design, Eric Evans
- Head First Design Patterns, Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson
Surly JavaScript Experts
I eventually found comp.lang.javascript, where I learned a lot more about ECMAScript from Richard Cornford (closures), Lasse Reichstein Nielsen, Eric Bednarz, and Peter Michaux, and Thomas Lahn. My knowledge of the DOM deepened greatly during this time.
RTFM!
My wife printed out a copy of the ECMAScript specification, which I kept bedside and read for months. I still have this copy.
Aftermath
My interests now have returned towards fitness, health, athletics, and music. I have not had success in teaching music, so have to return to programming.
But for what I've learned, I offer a background of how I got to what I know now. It was a long journey and I have a lot to offer.