Advanced JavaScript with Prototype and script.aculo.us
In this Advanced JavaScript course, students learn to write production-grade JavaScript using object-oriented programming techniques, good standard coding conventions. Students will learn to catch errors, debug and test, and properly document code with JSDoc.
This class also covers Prototype and script.aculo.us.
- Cost: Price on application
- Duration: 3 Days
- This course is not available as part of our public schedule but can be provided on a customised client specific basis.
Experience in the following areas is required:
* HTML
* CSS
* Plenty of real-world experience with JavaScript
Intrinsic data types (String, Date, Array, etc)
Functions
DOM is not JavaScript
JSON
functions with flexible number of arguments
Using the || as a coalescing operator
Passing functions as arguments to other functions
Anonymous functions
Merging objects
Using the operator to access object properties or methods.
eval
call vs apply
Leveraging JavaScript's OO Features
You have objects in your server code, you should have objects in the client scripts too
Client script objects are meant to deal with client-related problems
Creating simple objects
Properties
Methods
The perils of "this"
Extending Objects
That's what a Dynamic language is
Prototype-based programming
Creating prototypes (classes)
Properties
Methods
Extending classes
A word on Dynamic languages
Duck Typing
Runtime errors
Scary? No, flexible and productive
Where to put JS
Inline (in tag attributes like onclick)
In script blocks
In external files
Performance implications of each alternative
minifying vs. obfuscation
gzipping
combining files
Coding standards (Yahoo!/Crockford)
JSLint
Unicode issues
Error handling
Debugging JS
tools
Firebug in Firefox
Unit Testing
Dynamic languages go hand-in-hand with UT.
What are unit tests?
JSUnit
Code documentation
JSDoc
what is, who wrote, who uses, who maintains
Extensions to JS classes (String, Array, Object, etc)
String extensions in detail
escapeHTML, evalScripts, gsub, toQueryParams, etc
Templates
Enumerables
loops
iterators
list operations
Base class inheritance
Utility functions
DOM
element extensions
form extensions
chaining methods
Insertions
Events (observing, getting info about the event)
Ajax
Request
Updater
PeriodicalUpdater
Extending Prototype
Adding your own Element methods
Inheriting from Ajax.Request
Where to get more info (lists, trac, docs)
what is, who wrote, who uses, who maintains
Effects
Core effects
Opacity
Move
Scale
Highlight
ScrollTo
Combined effects
Fade/Appear
BliddUp/BlindDown
Shake
SlideUp/SlideDown
etc
Creating your own effect
Inheriting from Effects.Base
Combining other effects
Element extensions
Controls
Autocompleter
InPlaceEditor
Draggables
Sortables
Where to get more info (lists, trac, docs)