Anvil - Ruby MVC GUI library
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.
Craig Motlin Sep 01, 2014