Framework Haters
21-May-07
Oren’s got a post up talking about when he chooses to build a framework. There’s a lot of pushback on frameworks in the agile community. Try it the next time you’re around a bunch of agilistas; it’s a great way to “stir the pot.” Depending on the day or phase of moon I’ll either take the side of framework or not. How I do love a good argument and when no one will be the provocateur I’ll happily volunteer…
Let me be clear. A lot of agile folks evangelize and utilize frameworks to great advantage (NHibernate, Rhino Mocks, Ruby on Rails). The “hate” part tends to come from more of a “framework as a route to your application” angle. That is, building your application by building a framework or setting up a framework/application team is a bad, bad, bad idea because it’s BDUF, encourages YAGNI, and keeps the team from delivering value to the customer. I’m an agile proponent and, generally speaking, I agree to an extent.
Lately there’s been a lot of bile directed toward the CAB/SCSF project from Microsoft patterns & practices in this corner of the ’sphere. Having gone out and done a few talks to developer groups / code campers on the very subject I have to say the hate really isn’t warranted. Sure you can build your own CAB. We started down the CAB/SCSF route and are now in the process of replacing it. Right from the get-go I didn’t like the state bag stuff.
So is CAB/SCSF without value? No, absolutely not. It opened a lot of people to the concepts of dependency injection, composite applications, pub-sub eventing, and a host of other patterns. In that it has value. It also has value in terms of the big IT shop in that it proscribed a way to separate the concerns of development: layout/UI, business logic, etc.
The other thing to remember is you don’t have to use this stuff as is. A lot of this p&p stuff doesn’t need to be taken at face value. It’s valuable as a reference architecture. Take a look. Take what you like. Leave what you don’t. See how they’ve assembled patterns together. If you think you can do it better/lighter, by all means, rock it. There’s value in disagreement especially when it helps to clarify your position.
All this said, I think there are times when a build-a-framework approach is warranted. Specifically if you’re building a product and you’re able to isolate a class of feature-types that you’re likely to build over and over again it can give you competitive advantage: an idea championed by Mark Miller in regards to product development:
if you are competing against another company, one of the ways that you can gain a competitive advantage is by making it faster and easier for you to extend your products and that’s just bottom line. [DNR Show #101]
This is a position I agree with. Keep in mind, though, product development is a different animal. It’s harder (Frederick Brooks says by a factor of six times). That and “the customer” can and often is based on a thought experiment (marketing, instinct) at the very beginning and as you accumulate real, paying customers an aggregate measure of demand/interest/needs/requests over time. You, when you’re a product company, are the steward of the product; ultimately it’s up to the maker to meet their customer’s demands (and I think a more-or-less agile approach is an excellent strategy there), but that’s another post for another day…