Daily Archives: September 8, 2007

Ruby: IMS Tool Interoperability

Well I wrote my first Ruby application. It was an IMS Tool Interoperability endpoint. It has REST Web services and stores sessions in a database. It meets the REST profile for IMS Tool Interoperability.
My overwhelming feeling is that Ruby is absolutely amazing – I now know why Steven Githens uses sash. Having a console to test code even before you put it into a controller is simply amazing.
One thing I was amazed by is that I have to stop and think some times – because code is written so quickly and debugged so quickly – you actually have stop and think more often – the typing of the code is not the rate limiting factor – how well you have throught through your problem *is* the rate limiting factor.
In Java there is so much cruft and the speed of the debugging cycle is so plodding – I have gotten to the point in Java that I can do designs whlie waiting for a compile or server restart. In Ruby there is no such slack time – so I find I need to get up and walk around once in a while to let the idease anneal in my mind. After I settle back down and have the ideas worked out – making them work in Ruby is done in a flash.
Probably my biggest peeve about Ruby/Rails is a lack of a book that tells you everything that you can do – all the books I have are example after example – and they are all too simple – because they are solving a small problem they never who you how to do a subtle thing like declare that a column in a database is not null.
I need a reference manual. Here are some sites that are helping me not go too crazy:
http://www.railsapi.org/
http://zamples.com/JspExplorer/content/rubyUG/
Using Google with things like this works sometimes
ruby string class
rails activerecord class
I use this to find stuff in Java by typing
java string class
But I am looking for a definitive 10000 page manual for Ruby and Rails. I am tred of poring throush 20 line examples :)
I am also really liking Model-View-Controller – but there does seem to be something eauivalent to Components that I am missing. Where do you do things like performance tune, cache, etc etc. I think the Model is too thin of a layer to do it – and the Controller is not the right place either.
I do like the Rails abstraction between View and Controller. I have a lot yet to learn but the fact that Urls are abstracted feels very portlet like and WSRP like.. Hmmm. Me likes.
All in all it is amazing that I need to stop and think because things get coded up so quickly.
Here is a picture of the running app in Sakai:
IMS Tool Interoperability in Ruby
I need to move the from my desktop to a server so others can use it.