Ruby In Steel 1

Back to -Tutorials -Sapphire (Ruby In Steel) Tutorials -Archives -Ruby In Steel 1

GUI Drag-and-Drop Development For Ruby and Rails

Three solutions in Ruby In Steel

A question that frequently arises on Ruby and Rails forums and newsgroups is: ‘How can I create a GUI with Ruby’? If you are expecting a ‘Visual Studio’ way of accomplishing this (drag-drop-code-and-run) you may be disappointed by some of the suggested solutions. However, with Ruby In Steel, you have not just one but three different ways of creating GUI applications using drag+drop design tools.

The Visual Rails Workbench - a drag-and-drop design environment for Ruby on Rails

These are your options:

- The Visual Rails Workbench

This is our unique full web-page design and coding environment for Ruby On Rails. This lets you design cross-platform Rails applications by dragging and dropping components from the Toolbox onto a page.

- IronRuby In Steel

We have a free IDE for Microsoft’s IronRuby (this is also incorporated into our commercial product). In addition to its visual designer, the IronRuby In Steel IDE has all the editing features of our standard Ruby product.

NOTE: This tutorial was published in September 2008. As of January 2010, SapphireSteel Software is no longer actively developing an IronRuby IDE and can offer no support related to IronRuby.

- The Ruby Connector

This is a widget that lets you connect .NET programs to the Ruby interpreter. You can use the Microsoft form designer for C# or VB to design the front end and run Ruby at the back end.

So which of the three options should you use...?

Let me try to summarise the differences between them.

The Visual Rails Workbench

Designing good-looking Rails applications using the standard ERb (or RHTML) templating system can often be a bit ‘hit and miss’. The problem is that a single Rails page can be made of multiple templating files (for example, a Layout, a View and one or more Partials) and none of these files is ‘standard’ HTML - instead, they are fragments of HTML with bits of Ruby mixed in. This means that you do not have the option of editing a full page Rails layout using a drag and drop designer such as the Visual Studio web editor or a third party tool such as Adobe’s Dreamweaver. Well, with the Visual Rails Workbench, this is exactly what you can do!

Here in the Page (Code) editor, you can navigate the ‘composite’ HTML page which has been constructed from Rails (ERb) Layout, View and Partial templates. The corresponding areas of the HTML page are colour-highlighted in the editor and shown as branches in the Document Outline.

The Visual Rails Workbench auto-assembles full HTML web pages from multiple template files and translates the embedded Ruby code which defines visual controls into standard HTML. Once you’ve finished designing your pages, the Visual Rails Workbench retranslates them back into ERb/RHTML and breaks them apart into their original format (the multiple Rails templates). This lets you do drag-and-drop design in Visual Studio itself or export whole pages to be designed in a third-party tool such as Dreamweaver.

The Visual Rails Workbench is unique to Ruby In Steel. There is, quite simply, nothing else like it. Its main features are summarised below:

- Full page editing of complete web pages (“composites” of Rails layouts/views/partials)
- Drag and Drop design - add controls from a toolbox - Set properties using the Property panel - Resize and move controls using mouse or keyboard - Split view code/form editing - Toggle ERb/RHTML editing between HTML editor and Rails (Ruby-aware) editor - Round-tripping between ‘web format’ HTML and ‘Rails format’ ERb/RHTML - Edit code as ERb/RHTML or as HTML - Document Navigator navigates DOM or “composite” structure (HTML)/or methods (ERB/Ruby) - Quick navigation between controller and view - Import/Export to other web page design tools (such as Dreamweaver or Expression Web) - Save/restore named ‘versions’ of page designs to/from an archive of work in progress

More information online:

- http://www.sapphiresteel.com/A-Brief-Guide-To-The-Visual-Rails
- http://www.sapphiresteel.com/A-Brief-Guide-To-The-Visual-Rails,235
- http://www.sapphiresteel.com/Visual-Rails-Workbench-The-Import
- http://www.sapphiresteel.com/Visual-Ruby-On-Rails-Drag-and-Drop

Note that some of the above articles were written when the Visual Rails Workbench was still in development and there may have been some minor cosmetic changes to certain features. The Ruby In Steel manual and integrated help system contains a fully updated reference.

In addition we have this short screencast movie that demos some basic features of the Visual Rails Workbench:

- http://www.sapphiresteel.com/Visual-Rails-Workbench-screencast

IronRuby In Steel

First, I should say that our IronRuby IDE is an alpha release. IronRuby itself (Microsoft’s implementation of Ruby for .NET) is still in development and we released our IDE earlier in the year in order to provide IronRuby coders with a Visual Studio environment incorporating powerful code editing features and a basic design environment. Neither IronRuby itself nor our IronRuby IDE is yet ready for real-world development and we probably won’t significantly update this IDE until version 1 of IronRuby is released. If you working with IronRuby, you can use our IDE to create IronRuby projects in the Solution Explorer, format and edit your IronRuby code (with code colouring, collapsing, auto-indenting etc.) and create front ends by dragging and dropping controls from the Visual Studio toolbox.

Download the IronRuby IDE (alpha) Note: As of January 2010, the IronRuby IDE is no longer supported and is no longer in active development:

- http://www.sapphiresteel.com/Ruby-In-Steel-For-IronRuby

The Ruby Connector

The Ruby Connector is a widget that opens up channels of communication between a .NET program and the Ruby interpreter. In principle, you could use this either to run small bits of Ruby code from a much larger VB or C# application or run large Ruby programs from a small VB or C# ‘front end’.

If all you want to do is provide a traditional ‘Widows-style’ interface (Windows forms, buttons, menus, text entry boxes, dialogs etc.) to your Ruby programs, then you could simply design the user interface in C#, VB or some other .NET language, drop on the Ruby Connector control and ‘wire up’ your buttons and menus to your Ruby program. Then when the user clicks a button or selects a menu item on the form, the Ruby program would run some code and send back some data which the .NET program can display. The Ruby Connector is a free tool and we provide a comprehensive programming manual to explain how to use it.

The Ruby Connector is supplied as standard with Ruby In Steel Developer (look under your installation directory) or you can download it here:

- http://www.sapphiresteel.com/SapphireSteel-Downloads

There is a short screencast movie showing how to use it HERE

So, in short, if you are wondering how you can create Ruby or Rails applications using a drag and drop design environment, there are your answers. Enjoy!

Bookmark and Share   Keywords:  visual design
© SapphireSteel Software 2014
buy piracetam cutivate cream 0.05 % 90 gm tadalista melanocyl methoxsalen buy viread 300mg order anabrez buy imatinib buy generic flagyl buy generic cernos gel buy sildenafil citrate 100mg buy fertyl buy generic calutide cabergoline buy generic sildenafil citrate jelly clomiphene 100mg avagra avanafil sustanon for sale simvastatin for sale caverta buy generic nuvigil tadarise for sale atorvastatin lipitor veenat for sale buy orlistat online cutivate cream tizan 2mg buy generic malegra fxt malegra dxt vega for sale buy generic tenofovir + emtricitabine tadaga rizact buy tadalafil buy generic flonida buy amiloride online buy sirolimus ranitidine 150mg generic viagra order prosteride buy generic xtane buy doxicip online buy malegra 100mg baclof baclofen buy generic duprost oleanz dilantin for sale modvigil aventis 500mg stendra buy dapoxetine online vilitra 20mg order quinine sulphate buy enalapril maleate online buy memantine online nizonide buy fincar 5mg buy vardenafil buy apcalis jelly 20mg qutipin sr buy tadora buy memantine prostaglandin 3ml mirtaz for sale buy conjugated estrogens online buy finasteride 1mg lovegra tadacip 20mg fluconazole buy sildigra xl plus online order fluka buy sildigra online rifagut rifaximin buy norvasc 10mg pelosta buy terbicip 250mg buy oracea online proquin xr buy eriacta megalis tadalafil buy azithrocin 250mg buy amisulpride online buy viraday online avana for sale buy sildenafil citrate oral jelly 100mg zhewitra for sale order generic ampicillin bactrim d.s septra buy sildisoft online buy generic arcalion sulbutiamine buy prexaton 150mg buy armodafinil 150mg buy generic penegra buy erlonat acamprosate 333 mg baclofen 25mg soranib sorafenib tadalafil professional tadalafil super active cialis super active prednisolone amitryn amitriptyline revlimid 5mg order levipil rogaine shampoo for sale order esomeprazole amlodac amlodipine buy diclofenac buy mestilon 25mg buy topirol 100mg silagra sildenafil citrate buy lithosun sr buy aldactone online buy lasuna online buy testosterone undecanoate 40mg buy sildenafil citrate buy irovel buspin 10mg isotretinion for sale buy quetiapine online letrozole attentrol atomoxetine hydrochloride buy modafresh online arpizol for sale buy aurogra online buy vardenafil online bortenat buy urimax floricot fludrocortisone order super kamagra buy tadalafil buy modalert online buy vardenafil online buy ciplactin 15mg natamet for sale generic imatinib for sale order malegra professional order pletoz cernos depot buy generic vidalista buy calaptin online buy ketasma buy naltroxene 50mg buy generic lasix super p force waklert armodafinil buy generic sildenafil citrate buy entecavir online buy prilosec online buy kamagra 100mg bupron sr for sale buy generic generic gefitinib buy verdenafil 20mg buy careprost buy generic tadalafil buy metronidazole 200mg nuvigil 150mg buy generic sirolimus a-ret gel for sale rasalect for sale nodict naltrexone cernos capsules 40mg sildenafil citrate 100mg buy normabrain 800mg