Tagged by 'scriptaculous'

Prototype and script.aculo.us

LUG Programming Course, 4th February 2008
The third lesson showed some of the power available in the JavaScript language, but also kept clear of the uneven surfaces that exist in currently available browsers. The plain fact of the matter is that browsers behave differently, and they are not perfect. Unless you want to become a specialised consultant, most web programmers don't have the time, energy, or resources to understand, and find solutions to these problems.
This fourth lesson makes use of two popular open source JavaScript libraries (Prototype and script.aculo.us) which take care of smoothing out the browser bumps, and create some very professional results, with very little code required by the developer.
This time I managed to recover the part of last week's lesson that I didn't finish, and get though this lesson with about 15 minutes to spare. Unfortunately, I lost about a third of the class along the way. I spent half an hour going over the concepts of the Document Object Model, and anonymous functions, but we'll have to look at these again in the next lesson, which will be a review of the things we have seen up to now.

Read more...

Ruby and Ajax

LUG Programming Course, 25th February 2008
After our brief, but intense, first look at Ruby, we can start using this excellent scripting language to create our first web application. We previously used the Prototype and script.aculo.us libraries to dynamically modify an XHTML page, now we'll use Ajax via the script.aculo.us Ajax.Autocompleter to 'talk' to a simple Ruby web application.
This lesson will introduce you to WEBrick, the Ruby web server, HTML forms, the ERB templating system, and Ajax.
Despite the amount of code involved, the lesson went quite quickly, and I managed to finish with about twenty minutes to spare. We used that time to go over some of the Ruby code again. Everyone seemed to enjoy the results of running their first web application. One student even started adding his own text files, which I found gratifying, because that was what the application was designed for – any number of plain text files.

Read more...