Tony O’Hagan’s Blog

Welcome to Tony’s home page and weblog.

In late 2006, Sun Microsystems hired the JRuby team. JRuby is a Ruby interpreter that executes in the Java JVM.  It is v1.8.4 compatible written in 100% pure Java. It boasts support for interfacing with existing Java classes and can define new classes from within Ruby and happily runs Rails under Tomcat. This is very significant in that it opens the door to vast class libraries and support frameworks that are critical for wider acceptance by Ruby & Rails in the Enterprise game.  I suspect that we’ll see tighter support for JRuby in IDEs such as Eclipse and Netbeans.  See Sun’s feature story for more details.

Microsoft have invited John Lam’s team who developed IronRuby a Ruby .NET compiler.  John’s team are implementing IronPython based on a new Dynamic Language Runtime (DLR) that is designed to support dynamic languages such as Ruby, Python, JavaScript, and Visual Basic.  The DLR is built on top of the CLR (Common Language Runtime) so these dynamic languages will interoperate with the existing statically typed languages like C# and thus like JRuby will gain access to the vast .NET class libraries.  Microsoft Research have also sponsored QUT’s PLAS research group who have developed the Ruby.NET compiler.

With widespread use of Ruby and Rails particularly among Mac developers such as the Rails project team, it comes as no surprise that Apple are now bundling Ruby and Rails in their latest OS X releases. 

Agile Web Development with Rails
- Essential - Best Rails starting point.

Programming Ruby (2nd. Ed.)
- Essential - Needed to get up to speed with the core language and as a long term reference book.

Rails Recipes
- Great! There’s now an ‘Advanced Rail Recipes’ out.

Rails for Java Developers
- Very useful in covering aspects that Java developers relate
to but I think Agile Web Development is better as a starting point.

Enterprise Integration with Ruby
- Some useful stuff but overall I was a bit disappointed in this one. I didn’t read it all.
- Did not mention Message Queues - essential for scalable Enterprise Dev.

Don’t forge to download the source code files for each of these books.

Getting Real
- Business, design, programming, and marketing philosophies of 37signals - the team that gave us the Rails framework.
- Buy it or read on-line for free.

Don’t want to spend money on Dreamweaver or MS-Frontpage?
You might want to checkout this open source cross platform extensible HTML editor.

Orginally based on Mozilla Composer it includes a useful plugin for Javascript debugging.

Perfect for cash strapped students, friends, family and research projects.

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

Enjoy,
Tony.

Lots of people have setup a Hotmail email account just so that they can use MSN Messenger. Often this has been done by a friend who got them started with instant messaging. The problem is that if they don’t use their MSN Messenger very often their hotmail account will expire and then they cannot use MSN Messenger at all !

This article will show you what to do to replace your old expiring hotmail account with an ordinary email address like your ISP mailbox or perhaps a work email. The best email to use is one that you’re most likely to have in the long term and preferably one that your friends will recognize as you.

(more…)

Google just release a free version of the popular 3D modelling software SketchUp  that they recently acquired from @Last Software.
They’ve also setup a 3D Warehouse which is populated with sample models. 

SketUp is perfect for planning your next house remodelling.

Sketup 3D models can be viewed in the latest version of Google Earth .

People, Project and Patterns  is one of those “gold nuggests” of wiki knowledge about the software design patterns distilled from years of software development experience.
It also includes a list of the the people most responible for contributing to these patterns and some of the projects and history of that lead to their being identified.

Put this one in your bookmarks for your next software design project.

Tony.

Easy Eclipse (www.easyeclipse.org) is an open source project that tests and packages Eclipse IDE + suites of plugins for development of C/C++, Java, Perl, PHP, Python and Ruby projects.

(more…)

Ever wished that your podcast or web site visitors could send you a voice message?

(more…)