Tagged by 'javascript'
LUG Villafranca Programming Course
January, 2008
This document gives a brief outline of the programming course organised together with the
Linux User Group of Villafranca, Verona, Italy. The course introduces programming in
JavaScript,
Ruby, and fundamentals of
Ajax over a ten week period. In twenty intensive hours, students are introduced to the tools and methods used in modern programming practices, and the author's twenty years of experience.
This document is being published on the Internet in parallel with the course. Once the course has finished, it will remain as a tutorial for other fledgling programmers.
This, and the other articles outlined here, are also available as a PDF document (about 2.3 MB).
Read more...
Simple JavaScript Concepts
LUG Programming Course, 21st January 2008
In this lesson we started to write some simple JavaScript. This was a little tedious for those with previous programming experience, but it served to highlight several important points of the JavaScript programming language.
Just as importantly, this lesson helped familiarise the students with the Firebug add-on.
I was a little too slow starting the lesson, wasting about 30 minutes, so I overran by about 20 minutes, and didn't manage to finish all the material. Fortunately, this first real programming lesson gave me some feedback, so that I can better pace the following lessons. I'm glad to say that I had at least prepared enough material, finishing 30 minutes early might have been embarrassing.
Read more...
Advanced JavaScript Concepts
LUG Programming Course, 28th January 2008
Writing code snippets in Firebug is interesting, but not permanent. As soon as you close the browser, or the tab you were using, all that experimenting is gone forever. The time has come to create a permanent development project.
Overran the lesson by half an hour again, and didn't get as far as creating objects, I stopped short of “The Power of JavaScript”. I'm also a little worried that I'm leaving some students behind. To rectify, I'll add a refresher lesson in a couple of weeks.
Read more...
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...
Review of JavaScript, CSS and XHTML
LUG Programming Course, 11th February 2008
The last two lessons introduced us to XHTML, CSS and some pretty advanced aspects of the JavaScript programming language. This lesson will reinforce our knowledge of these topics, mostly by providing links to articles and short tutorials available on the Internet, and answer some of the student's questions.
This time I managed to get though the lesson with about 30 minutes to spare. I think that some of the information given here helped clear up some of the doubts that the students had. We spent the last 30 minutes looking at specific problems, and discussing students interests and aims.
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...