A couple of weeks back I discovered a great tutorial on Ruby on Rails by Michael Hartl at http://www.railstutorial.org
The tutorial takes you through the steps of building a Twitter-like application (not a client!) from scratch. Aside from learning Ruby on Rails, this tutorial also teaches other useful technologies, techniques and best practices, such as:
Version control using Git
Deployment using Heroku
Basics of web design (CSS, Ajax)
Setting up a database (the tutorial uses the lightweight SQLite3 format, but this can be ported to ‘real’ databases quite easily with Rails)
Generating fake data for the test/staging database as well as the unit testing database
sloccount (SLOC: source lines of code) for the complete tutorial’s source code:
1 2 3 4 5 6 7 8 9 10
How to read these results?
app: The actual application is less than 400 lines of code (this even includes the generated HTML)! Try that using Java or ASP.NET… ;–)
spec: Tests are almost 4 times the size of the actual code (~1200 lines). These tests include unit, integration and functional tests!
Most of the remaining code is auto-generated Rails code.