logo

 

     
 
Home
Site Map
Search
 
:: Bitwise Courses ::
 
Bitwise Dusty Archives
 
 
 

rss

 
 

ruby in steel

learn aikido in north devon

Learn Aikido in North Devon

 


Section :: Rants and Raves

- Format For Printing...

Visual Ruby On Rails

As Olivia Newton-John says (more or less) Let’s get Visual!
Monday 21 April 2008.
 

When I began programming with the Ruby language and the Rails web framework ( ‘Ruby On Rails’), a few years ago, the first thing I tried to find was a visual IDE. I’d assumed that every programming language worth its salt had one of those these days. I searched and I searched but none could I find.

The Visual Rails Workbench

Well, if you can’t find one, there really is no option but to write one yourself. That, fundamentally, was the impetus behind the creation of my company, SapphireSteel Software, and our Visual Studio-hosted IDE, Ruby In Steel.

Before going on, let me put all my cards on the table. I’ve designed and programmed a fair bit of Ruby In Steel myself and I admit to being totally and utterly biased. Today we launched a new visual design environment for Ruby On Rails but I’m not going to review it here - even I am not that shameless! What I will do is tell you a bit about what we have been doing and why we are so utterly determined to make the darn’ thing visual - a heck of a sight more visual than any other Ruby IDE on the planet.

Ruby programming has, up to now, tended to be a code-centric affair. You write code in an editor then you go to a command prompt and you run the code in an interpreter. I did that whole editor-and-command-prompt thing back in the ‘80s. It’s a style of coding which is now so ancient that, to a new generation of programmers, it seems modern again. But not to me. Having put the command line behind me twenty years ago, I feel not the slightest inclination to go back to it now.

Visual Ruby...?

But how do you give a language such as Ruby a really visual makeover? To date, we’ve approached this from several angles. First, we created a cross-language-linking component, The Ruby Connector, which lets .NET programmers write hybrid programs that combine elements of a .NET language such as C#, VB.NET or Chrome with regular Ruby. This also solves the visual interface problem by letting the programmer do all the front-end design in .NET while running Ruby at the back end.

STEP ONE: The Ruby Connector

Hybrid programs like this have their uses but they are still some way short of the complete drag-drop-and-code way of working that is second nature to an old Delphi programmer like me. This part of the equation will eventually be solved when Microsoft releases IronRuby - a .NET implementation of the Ruby language running on the Dynamic language Runtime.

STEP TWO: IronRuby

We’ve already released a free IronRuby version of Ruby in Steel complete with a form designer. Unfortunately, this isn’t production-ready yet since IronRuby itself is still in the alpha stage of development. As IronRuby develops, we will continue to enhance our IronRuby IDE. In the long term, this really could turn into a Ruby alternative to Delphi or VB.

Visual Rails...

The problems of visual design for Ruby On Rails are rather different. Rails is not used to create desktop applications so the ‘form-design’ way of working is not relevant. Rails is used to create database-driven web applications. It links together the data (the ‘Model’) with the programming logic (the ‘Controller’) and the visual interface (the ‘View’).

By default, Rails Views are defined in sets of template files which contain a mixture of HTML mark-up with Ruby program code. A single web page may be defined by multiple templates - typically comprising at least a Layout (repeating elements such as headers and menus), a View (the elements of a specific page such as data-entry) and one or more ‘Partials’ (items such as submission forms).

The Ruby code in these templates is executed by Rails and multiple templates may be combined to form a single HTML page at runtime. However, at design time, the final layout of the page is not available for the simple reason that, while all those fragmented HTML/Embedded Ruby templates may mean something to Rails, they don’t mean much to a web design tool such as the Visual Studio Designer or Adobe Dreamweaver.

To get around this limitation we have created a visual design environment that lets you work with fully formed HTML pages at design time. In order to do this we have had not only to work out how to combine all the various Rails templates that define a single page but also how to translate embedded Ruby into HTML and back again.

STEP THREE: The Visual Rails Workbench

This has been a far more complex task than we initially anticipated and the environment (the Visual Rails Workbench) has taken about a year to complete. I think it’s been worth the effort though. The end result is that you can now do real drag-and-drop design for Rails: you can drag a control from a toolbar, drop it onto a web page, resize or move it with the mouse and set its properties in the Property panel.

I know there are those people who will think this is the work of the devil and that all good Rails programmers should stick with plain text editors and command prompts. That’s fine. Each to his own. But as far as I am concerned, the more ‘visual’ the better...

AddThis Social Bookmark Button


Home



 

biaxin generic clonidine delivery lasix liquid form clonidine hlc tegretol reglan 10mg prescription about diflucan duration actonel boniva comparison vitells purim tylenol plavix in new york crestor benefits tricor trilipex combo liquid amoxicillin allegra seizures administering oral coumadin about avelox 400mg tabs dangers of proscar aggrenox dispense http://www.redligare.org/spip.php?buy=274838 synthroid litigation http://www.redligare.org/spip.php?buy=714089 extra rogaine strength sore throat amoxicillin valtrex herpes suppressive in mayami ftv lasix im anafranil memory allopurinol 300 mg http://www.redligare.org/spip.php?buy=193947 zithromax purchace seroquel withdrawl levaquin cholesterol levels in united states information about remeron med lamisil elavil zofran 8 mg trental electives selegiline citrate supplier premarin price comparisons in new york more lasix kcl http://www.redligare.org/spip.php?buy=65580 cytoxan 250 mh rogaine races in canada ampicillin e coli flomax prescription treatment pancreatitis azathioprine patanol generic more elavil fibromyalgia medicine amoxicillin for bacteria augmentin generic of extenze co host prevacid manfacture buy ganeric chantix better than mobic avelox mersa allopurinol thrombocytopenia