Tagged by 'ruby'

LUG Villafranca Programming Course

January, 2008
../Pictures/chairs_stuehle.jpg
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...

Ruby Full Immersion

LUG Programming Course, 18th February 2008
This week we move on from JavaScript to the Ruby programming language. Ruby is a dynamically typed, interpreted programming language. It's available for the Windows, Mac OS X, and Linux operating systems.
This lesson will give a very brief overview of the language, noting important differences from JavaScript where necessary. The first, and probably most important difference from JavaScript, is that Ruby runs on the operating system itself, rather than within a browser.
Ruby can be used to create classic glue language scripts, much like AWK or Perl. It can also be used to create desktop applications, using a variety of bindings to underlying libraries, such as Fox, wxWidgets, Korundum and Qt, and Tk. You can also collect your Ruby scripts together to make a stand alone executable using RubyScript2Exe. Undoubtedly, Ruby on Rails has made Ruby widely known as a web application programming language. Il sito Ruby Italia fornisce guide ed altri informazioni in italiano.

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...

Review of Ruby, Overview of Ruby on Rails

LUG Programming Course, 3rd March 2008
The last two lessons presented a whirlwind guide to Ruby, demonstrating a simple command line program, and a simple web application. That was a lot of material to digest, so in this lesson we'll make a short review of the important things we learned, and explain iterators and code blocks in a little more detail, since they caused some problems for some of the students.
As we still have much ground to cover, half of this week's lesson is also dedicated to an overview of the Ruby on Rails framework, which we'll be using in the next two lessons to construct a more complicated web application.
The lesson went reasonably well. I overran by about 15 minutes. I'll be overrunning a lot more in the next two lessons, as there's much more to go though. Seems I haven't lost anyone permanently from the course – they all diligently show up , some even and smile occasionally.

Read more...

Ruby on Rails, Part 1

LUG Programming Course, 10th March 2008
This week's lesson starts us on a two part adventure building a web application using Ruby and the Ruby on Rails framework. You'll need to install Ruby on Rails – we're using version 2.0.2. Our application also uses RMagick and SQLite. Installing RMagick is explained in this FAQ, we're using version 2.0.0. Installing SQLite is explained in this How-to, we're using the Ruby SQLite3 wrapper version 1.2.1. Windows users will need both the .exe and .dll versions of SQLite. The Ruby on Rails Wiki page also gives helpful information for SQLite.
The lesson went quite well, and although there was a lot to cover, we overran by only 15 minutes.

Read more...

Ruby on Rails, Part 2

LUG Programming Course, 17th March 2008
This week's lesson concludes the two part adventure building a web application using Ruby and the Ruby on Rails framework. Although we'll have a working application by the end of the lesson, good enough to play with at home, there will still be some work required to bring it to production environment standards.
The lesson went quite well, and although there was a lot to cover, we overran by only 15 minutes. We finished off the evening to celebrate the end of the course with a drink in a local bar.

Read more...