InfoQ

News

Anvil - Ruby MVC GUI library

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

Community
Ruby
Topics
Programming ,
Domain Specific Languages
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

Watch Thread Reply

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.