September 24, 2007
Warning ! Technology Mapping Has Implications
You may have read about the guy who after spending two years on a Ruby on Rails project switched back to PHP. Without getting into the debate of whether Ruby on Rails is better than PHP or whether Ruby is overhyped (probably -- but that doesn't mean it isn't any good either. By the way, it is the same with SOA, but I digress).
Reading his post, I saw a few quotes that raised a red flag for me, such as:
But at every step, it seemed our needs clashed with Rails’ references. (Like trying to turn a train into a boat. It’s do-able with a lot of glue. But it’s damn hard. And certainly makes you ask why you’re really doing this.)
and
#2 - OUR ENTIRE COMPANY’S STUFF WAS IN PHP: DON’T UNDERESTIMATE INTEGRATION
By the old plan (ditching all PHP and doing it all in Rails), there was going to be this One Big Day, where our entire Intranet, Storefront, Members’ Login Area, and dozens of cron shell scripts were ALL going to have to change...
and
Speaking of tastes: tiny but important thing : I love SQL. I dream in queries. I think in tables. I was always fighting against Rails and its migrations hiding my beloved SQL from me.
What these quotes say really is that this guy doesn't know about "Technology Mapping 101". Here is what I wrote about technology mapping* about two years ago (incidentally that's about the same time this guy started his Ruby adventure :)).
Technology mapping can have a significant impact on the ability to actually implement the architecture. The wrong mapping can make adhering the architectural guidelines very cumbersome and sometimes nearly impossible.
Every technology or framework has its own architecture. This architecture poses constrains and makes certain things easy (like using the ActiveRecord pattern in Rails) and certain things harder (like not using O/R Mapping ) so, for instance, on the case mentioned above a better technology mapping might have been RBatis (iBatis for Ruby/Rails) which lets you map SQL statements to objects. It is important to note (in Rails case) that one of the core tenets for Rails is preferring convention of configuration when you don't do that you have to work hard(er) -- as you are working against the framework.
Another problem with the technology mapping here was his point #2. It is a pity he only saw it in after the fact. It can be justifiable to switch everything but you've got to allow this change to occur iteratively.
While I generally dislike the software architecture = building
architecture metaphor, using it here does make sense: building software for an existing business (vs. greenfield development) is like building a new intersection. You have got to think about building all the detours that would allow the traffic (business) to continue to operate, sure it might run slower in the intermediate phase but it can't stop altogether.
So again, Once you have an architecture that fits your business, take a look at the technology options you have. Try to choose the best fit. Whatever you choose -- take a look at the implications of that technology and think about the tradeoffs you may find that you either have to adjust your architecture or change the technology altogether -- if you don't you might find you waited two years of development effort or even more...
* Technology Mapping is one of the steps of a set of activities I identified as needed to make sure your have a solid architecture. The activities goes by the acronym "SPAMMED" and you can read about them more in this article.
Posted by Arnon Rotem-Gal-Oz at 05:38 PM Permalink
|