WEB150 » Week 10: Lecture – Libraries
script.aculo.us is used by Digg.com
Currently, MochiKit development is focused on code and documentation.
Single Purpose Scripts
The Prototype Window Class creates windows.
Nifty Corners Cube creates rounded corners without graphics
If all you need is a Simple AJAX Code-Kit, SACK is it.
JS Scrolling text in divs
Every JS developer has a file called common.js (well, most of us do, some call it global.js). This file has a few crucial functions that serve as a mini library. When we aren't using a full-blown library that handles this stuff natively, we just use the common.js. Everyone's common.js file is different. As you collect functions that are useful and universal, you can add them to your personal common.js library. But watch out! It will get big so practice regular pruning and source version control :)
Here's a common.js with some goodies.
How to know if a Script is good
- Read the Documentation
- Avoid scripts that use document.all, document.layers
- Is the code readable?
- How light is it?
- How complex is it? Elegant code is simple.
- Can you rewrite it better?
- Search Google for answers :)
Beyond Other People's Code