The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Heterogeneous Rails Applications

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jeremy Voorhis

Posts: 212
Nickname: jvoorhis
Registered: Oct, 2005

Jeremy Voorhis is a Rubyist in northeast Ohio.
Heterogeneous Rails Applications Posted: Apr 18, 2006 12:47 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jeremy Voorhis.
Original Post: Heterogeneous Rails Applications
Feed Title: JVoorhis
Feed URL: http://feeds.feedburner.com/jvoorhis
Feed Description: JVoorhis is a Rubyist in northeast Ohio. He rambles about Ruby on Rails, development practices, other frameworks such as Django, and on other days he is just full of snark.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jeremy Voorhis
Latest Posts From JVoorhis

Advertisement

Or, Don’t be afraid to use the right tool

At Canada on Rails, I showed screenshots of a recent PLANET ARGON Rails development project which showcased my work with Globalize. What the slides did not explain was how we were able to process 1000s of images in an agile way.

We began by writing our own plugin, similar to FileColumn. Problem is, each image we had to manage required up to 4 variations, as well as transport the files to a bandwidth provider. In the beginning, the rules to produce these variations changed frequently. As you might guess, our models had suffered some bloat. My solution to coping with this problem was inspired by Jason Watkins’ experience in the video game industry: an asset compiler. In short, an asset compiler is a build tool that works from raw assets living in source directories and transforms them into their final state.

What I wanted was a flexible tool to regenerate – or build – all of these image variations, and I wanted it to stay out of my way. I had decided the best platform to build this tool might be Rake – a Ruby build system. I followed Jim Weirich’s RDocTask library as a template, and in a couple of days I had the asset compiler up and running. With the asset compiler in place, it was a simple matter to write an observer to fire off the right tasks. Our plugin and our image models were greatly simplified and now it simply saves or deletes a file in a source directory.

There is something desireable about heterogenous architecture. Specialist components with clear lines of responsibility become a joy to work with, and easier to maintain. Don’t force heterogenous design, but consider it as an agile approach when you suspect your application is growing into a monolith.

Read: Heterogeneous Rails Applications

Topic: Taking the enterprisey to task Previous Topic   Next Topic Topic: Making concurrency simple, and a multi-threaded downloader in 4 (long) lines

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use