InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Anvil - Ruby MVC GUI library

Posted by Antonio Cangiano on Feb 06, 2008

Sections
Development,
Architecture & Design
Topics
Programming ,
Domain Specific Languages ,
Ruby
Tags
GUI ,
Rails
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

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.