InfoQ

News

Anvil - Ruby MVC GUI library

Posted by Antonio Cangiano on Feb 06, 2008 10:00 AM

Community
Ruby
Topics
Domain Specific Languages,
Programming
Tags
Rails,
GUI
Anvil is an ambitious MVC framework for developing cross-platform GUI applications in Ruby. Currently, it requires WxRuby, the Ruby bindings for the popular WxWidgets C++ framework, but it aims at becoming an abstraction layer that will be toolkit agnostic (e.g. targeting RubyCocoa and FxRuby too). While the project is still in its infancy (it's at version 0.0.1), it has  been noticed in the Ruby community, as a DSL that might make GUI development in Ruby as easy as it currently is for Web development, with frameworks like Rails and Merb.

We sat down with Lance Carlson, author of the Anvil framework, in order to briefly discuss his vision for the project and plans for future releases.

Antonio Cangiano (InfoQ): You are currently the sole developer of Anvil. Can you tell me something about yourself and your involvement with Ruby?
Lance Carlson: Well, currently I am the only one that has contributed code to Anvil, however I hope this will change as I've brought a few more guys on board. Thus far, it has been hard to get any help on the project, though I hope this is going to change soon! As for me personally, I've been programming Ruby on Rails for almost 3 years now, spending a majority of the time as a contractor. Recently I was hired by Engine Yard and when time permits, contribute to some prominent open source projects such as Merb, Sequel, and others that are related.

AC: What's your opinion on the current status quo regarding GUI development in Ruby, and what vision led you to start the Anvil project?
LC: The current state of Ruby GUI development kits is a fairly new and primitive one compared to other languages and even fewer frameworks exist. The options that are available also tend to exercise more C-like syntax rather than expressing code using Ruby-esk DSLs. My vision for Anvil is to create a framework that will bridge the gap between the GUI toolkits and the syntactic sugar rubyists know and love, as well as provide the tools necessary for an agile GUI development environment. Such tools include a test suite, MVC architecture, code generators, gem based plugins, environment stages, and easy application configuration. In the future I plan to support integration with all of the popular ORM's (ActiveRecord, Sequel, DataMapper) and provide support for Ruby Cocoa, FxRuby, and various other GUI toolkits in addition to WxRuby. Integration with ActiveResource will also be a consideration as Anvil begins to mature.

AC: From the looks of it, it seems to me that Anvil is trying to do for desktop applications in Ruby, what Rails did for web development. Does your involvement with Engine Yard and the Merb project influence in any way Anvil, and can you tell us more about the architecture of the project?
LC:
My involvement with Merb has given me a lot of good ideas for the Anvil framework itself such as the Anvil console, the configuration setup, environments, plugin system and other areas. The main parts that I want to borrow from the web frameworks are the pieces that automate life as a developer. The rest of the framework will automate a developer's experience using the various GUI toolkits available for Ruby by expressing their syntax more declaratively using DSLs. This higher level of abstraction should free the developer from worrying about the GUI portion of their application and allow them to focus more on the guts of their application.

AC: The first 0.0.1 version was released about a month ago. What are your plans for the immediate future of the project?
LC:
In the next release I plan on smoothing out the previous release and include a few more features. I plan on bringing in a plugin framework derived from Merb's gem based plugin system. I also hope to cover more of WxRuby's features with the DSL that widgetwrapper provides.

AC:
Anvil is not the only GUI framework for Ruby. _why's Shoes is an example of a tiny DSL framework which attempts to simplify the process of creating GUIs in Ruby. What differentiates Anvil and why should a Ruby developer get involved with your project?
LC:
Some of the inspiration I had for Anvil came from why's mini framework. From his DSL, I realized how powerful Ruby could be at expressing GUI applications. The difference with Anvil, is that it plans to be a goto solution for Ruby GUI frameworks, much like rails became for web applications. Shoes will still remain a good alternative for lightweight applications, but when you want a full solution with options to use any GUI toolkit: go Anvil. Ruby developers should get involved in Anvil to increase the scope of technologies Ruby can utilize. Rails developers will already be familiar with the general application layout and should have no problem converting to "GUI land". Anvil aims to make it easy for rails developers to jump right into GUI development with minimal effort.

Also: read previous InfoQ coverage of  Ruby GUI development.

No comments

Reply

Exclusive Content

Rob Windsor on WCF with REST, JSON and RSS

WCF is not just for SOAP based services and can be used with popular protocols like RSS, REST and JSON. Join Rob Windsor as he introduces WCF 3.5 and its new native support for non-SOAP services.

Christophe Coenraets Discusses Flex 3, AIR, and BlazeDS

Christophe Coenraets discusses Flex 3, Flex Builder, AIR, BlazeDS, Adobe and open source, integrating Flex with existing applications, and integrating RIAs with search engines and browsers.

Debunking Common Refactoring Misconceptions

Danijel Arsenovski attempts to dispel some of the myths around refactoring and how it applies to .NET developers.

REST Eye for the SOA Guy

In this presentation, recorded at QCon San Francisco, CORBA guru Steve Vinoski explains REST from the view of someone who comes to SOA from a traditional, RPC-oriented background.

Choose Feature Teams over Component Teams for Agility

Feature teams are key to scaling agility for large teams. In an excerpt from "Scaling Lean and Agile Development," Larman & Vodde show how feature teams resolve traditional problems & raise new issues

Billy Newport explains Virtualization

Billy Newport talks about virtualization, eXtreme Transaction Processing (XTP) and WebSphere Virtual Enterprise. He discusses hardware, hypervisor, JVM, application and data virtualization.

Virtualization and Security

While virtualization provides many benefits, security can not be a forgotten concept in its application.

Introduction to Agile for Traditional Project Managers

This session is specifically aimed at traditionally trained project managers who are new to Agile, and who would like to be able to relate the PMI's best practices to their Agile equivalents.