Start of Rich Ruby
Till two months back I used to believe that programming languages has reached a level of maturity and there is very little scope of innovation. In future, the innovation will come from Model Based Approach. About two months back I had a serious look at Ruby and had to revise my opinion about programming languages.
What I liked about Ruby can be quickly summarized into the following points:
- Readability of program and simplicity of syntax
- Everything is an object and every object is extendable
- Every object has an extensive list of build in functions
- Operators can be used as function name
- Meta programming ability of Ruby
Personally, I have never liked programming for web. You have to write code at different places using different syntax. For rendering the page you use Html & DHtml, for client side action you use JavaScript, for some visual properties embed in html, for full range of visual properties use Style Sheet. On top of that you use some other language like Java, VB/C# or Php/Perl/Python for server side coding.
This problem made more complex with the introduction of AJAX. Coding required for implementing AJAX interface can become quiet complex. Consequently, the code is also very difficult to maintain.
We got eRuby working under Apache in a Windows machine. I had Why's (poignant) Guide to Ruby and Help which is part of Ruby(fxri - Instant Ruby Enlightenment) to understand the syntax and started off programming on Ruby.
So, the Hello World program looked as follows:
A start.rhtml page was written which included this module and called the show function.
But this was a trivial example and did not prove anything. So, I tried to render a tree view control. I had to write three classes, TreeView, TreeViewFolder and TreeViewNode. It worked beautifully. Using these classes I could easily create a page with multi-level tree.
That looks good. Next step was to try out a cascading menu. Similar to tree view I created Menu, SubMenu and MenuItem and could easily create a page with multi-level cascading menu.
Now I wanted to add controls on the same page and arrange them either horizontally or vertically. To do that I created two classes Row and Column. Both of them will act as a container and arrange the children in a row or in a column. They could be nested, that is a row could contain a column and a column could contain a row. To simply the syntax I used an array and internally converted to row or column.
So, initial experimentation with seem to have achieved a neat level of abstraction! The question was how far we can expand this concept. At this stage I did not see any limit and had a long list of possibilities in my mind.
The next logical step was to explore the existing open source project and see if a similar idea is being pursued. I had a brief look at Ruby on Rails and Nitro. Neither of these projects seems to be focusing on this aspect of web application. So, I decided to start an open source project to take this idea forward.
There were two obvious choice of hosting. SourceForge is large and most popular. However, the community is more Java focused. Most of the top ruby projects in SourceForge are to build editor for ruby using some other language.
On the other hand RubyForge is much smaller and the main focus is on ruby. Almost all the popular ruby open source projects are hosted there.
So, RubyForge was the choice!
For the name the initial thought was to have Ruby Ring or The Ring of Ruby. But finally I settled for RichRuby. It is the short form of rich internet application using Ruby. It feels more appropriate.
Quickly drafted a few colleagues into the project.
So the home page of the project is http://richruby.rubyforge.org
Wanted to make the thought process behind how RichRuby is evolving available to all RR users. So I decided to start this blog.
We had had not yet tested the code on Webrick. Need to try it quickly.

0 Comments:
Post a Comment
<< Home