How Software Factories changed my life
I’ve had three Microsoft-related epiphanies at work this year. The first one was when I finally got my head around how we could use Agile development methodologies to reinvent how we make software with the help of MSF Agile. The second one was when I realized just how good SharePoint 2007 is. The third one was Software Factories.
I don’t know if it is fair to claim that Software Factories are in themselves a Microsoft-specific concept, but MS sure are driving the field forward at the moment. I first saw Jack Greenfield do a presentation on the at TechEd 2005, and while I did find the topic interesting there simply wasn’t enough of an incentive available to actually start using them. Now there is. Guidance automation in Visual Studio 2005 has become mature enough for it to be possible to produce truly useful factories, and there are a couple of really interesting ones out there. Since this spring we’ve been using the Smart Client Software Factory, and it looks like it is changing the way we make Windows Forms applications.
To me factories are about decreasing the amount of “plumbing” code you have to write in an application, and a way to make sure that similar applications are structured and built in the same way. I once saw Rockford Lhotka do presentation in which he mentioned that about 80% of the code that gets written as part of an application is not about producing actual value to the customer (i.e. those bits that the customer feels they are paying for), instead it goes into frameworks and similar things that are required before you actually can start writing code that implements any business-related functionality. You may argue that 80% seems high, I feel it is a pretty good average. I’ve been working on projects where it has at least felt that 95% went into plumbing and only 5 percent actually gave users any value, and on the other hand I’ve seen project where good choice of tools have allowed the developers to spend half their time on the actual functionality. Be as it may, one can argue that anything about 0% is a waste of time and the customer’s money. While I don’t believe we can reach that 0% anytime soon I feel that factories might be a good way to reach 50% or even go below that.
From our point of view the whole thing started with the Composite UI Application Block (CAB), which we started doing work with little over a year ago. The CAB allows you to create Windows application that are composed of discrete parts (Smart Parts) you can use in an MVC pattern to build applications. While it is really a framework and not a factory it is what got us really interested in the factory space. We used to have a great deal of variance in how we architected and developed Windows applications, and the CAB helped give us a reusable structure for that. It was generally felt that the slight overhead introduced by the CAB was well worth it, since it forced the architecture and structure of our solutions towards a similar and more easily understandable model. However, there were still differences in the architecture of the applications and how the CAB was being used. We found that a framework like CAB simply left too many things open and allowed the developers too much freedom in how to use it efficiently. This freedom didn’t lead to the ability to create solutions of higher quality or solutions that where more adapted to specific customer needs; it only led to different ways of achieving the same thing. In essence we were still reinventing the wheel, albeit on a smaller scale.
Last spring the Smart Client Software Factory changed this. The way GAT, GAX and the factory way of thinking gives the developers access to context-sensitive processes (recipes) for achieving pre-defined results does away with the unnecessary differences we are seeing in the architecture and structure of our applications when using only the CAB. I am expecting great things from the Smart Client factory. It seems that it is reducing the need for architecting the client side of the solution, and results in a lot more similar solutions than what we have so far been achieving. With limited architect-resources this is great because it means they can focus on actually designing new stuff, not just doing plumbing. For the developers this is great because it results in applications with similar structures, which makes it easier to get into a project developed by someone else.
Over the summer we also started using another software factory, the Service Factory. This promises to do for the server side what the Smart Client Factory did for the client side. Our experiences are so far limited, but since we’ve been seeing the exact same problems on the server side as we did on the client side, with great variations in how we build Web Services, I’m hope we’ll be seeing some great benefits from this factory as well. I’ll post more on it later.
To summarize, in many cases our architects have been spending most of their time on the plumbing, not on the business functionality, which means that there is not enough focus on the design of the bits that the customer actually see and feels is giving him value. Software Factories will help us reduce the architectural and development work that goes into the background bits that shouldn’t have to be rebuilt every time, and that the customer is not too keen on paying for. While I do not have any actual numbers on the increase in efficiency or on the decrease in complexity I have a strong gut feeling that they are substantial. If I come up with something I will post it here.
