Ruby on Rails is a new web framework I’ve been enjoying.
It’s built on top of the Ruby language.
The Rails team appear to have brought together many existing best practice programming techniques for web development and then added a few of their own. Code is very tight and lean so you keep focused on just the core business problem.
I’ve been exposed to web programming for well over 10 years in C++/Java/ASP.NET/C#/Perl/PHP but I’ve learned many new patterns from Ruby and Rails that I will now apply elsewhere. Many of these patterns I’ve seen scattered in different languages and frameworks but never brought together in one place. Some new patterns only languages like Ruby can do.
Ruby language features
- OO Programming
- Meta Programming (MDA style code generation - but at run-time!)
- Aspect programming
- Functional Programming
- Vector programming
Ruby on Rails (RoR) web framework:
- Open source freeware for Win32, Mac OSX and Linux. Hidden Cost … You buy the books.
- Everything you need in one kit - no more shopping ’round for all the mismatched / misversioned pieces.
- Growing industry support. Many new startup projects have adopted Ruby on Rails in 2005/6.
- Rapid agile development - Ideal for product or research concept prototyping.
- Every aspect of Rails is tuned for minimal concept and minimal keystroke coding effort.
Code generation / DRY (don’t repeat yourself) philosophy.
- Very clean Model/View/Controller approach resulting in excellent code maintainability and readability.
“A place for everything and everything in its place” mindset - greatly improves long term support.
- Rapidly growing library of auto installable components.
- Automated testing (model and web view levels) + test case generation. Better than JUnit IMHO.
Testing is quick, easy and expected by Ruby/Rails community so components should be higher quality.
- Smart support for differences in development, test and production environments.
Instantly “freeze” the framework version into the application to minimize deployment environment dependencies
- Excellent IDE Support: Eclipse (freeware), Visual Studio (free & commercial versions) + others.
What you need to get setup for developing Ruby on Rails on Windows/Mac/Linux:
- Download and install Ruby + Gems + Ruby on Rails.
- You use the gems installer inside ruby to get Rails:
- Get either Easy Eclipse’s distro for Ruby on Rails (Ruby+Rails) or LAMP (Ruby+Rails+Perl+PHP+Python)
- needs Java 1.4 or 1.5 installed.
- Ruby includes it’s own web server but since you’ll need MySQL why not get xampp that includes:
Apache + PHP + Perl + MySQL + FileZilla FTP Server + Mail server + lots more. The perfect web dev kit all prewired up.
Windows extras:
- If you use Visual Studio IDE you might prefer this VS.NET add-in (Free personal edition, Pro commercial ed. soon)
- You’ll need this Ruby/MySQL fix for Windows. This one’s a “show stopper” bug for v1.8.4.
Note: If you’re using Skype you might need to shut it down when you start up Apache, since they both use port 80. This is not an issue with the WEBrick web server inside Rails.
Ruby / Rails Books - OK .. This is where you hand over the money … but it’s worth it!
The books come in print and PDF versions.
PDF books include links to the source code examples and also get free updates and save on shipping.
Don’t forget to download the source code zip files for each books.
See also Wikipedia: Ruby, Rails.
Enjoy,
Tony.