Software Factories: Modernizing Development
Software factories produce the blueprints and pieces developers need to
efficiently create applications.
Microsoft software architect Jack Greenfield has toiled for years behind the concept of "software factories" -- the idea of assembling a number of related components and tools to ease the creation of a specific type of program.
Greenfield and his colleagues have had to defend their work against critics, who perhaps hear the phrase "software factory" and picture a monotonous assembly line manned by robotic coders, mindlessly pumping out generic, rigidly templated software.
That's not the analogy Greenfield would like you to summon. The preferred vision is more akin to a modern manufacturing plant, which does automate processes to a certain level in order to produce a general product line, such as cars or televisions, but can produce a wide variety of specific models within the same factory.
"What if I could have installed on my desktop and [Visual Studio Team System] a skeletal architecture for a commerce site that needs to have some meat put on its bones, but out of the box is a commerce site?" says Greenfield, whose full title is architect for enterprise frameworks and tools.
Developers right now are wasting so much time on basic, repetitive tasks that soon the demand for software will exceed capacity, Greenfield argues. "I think our industry is throttled by availability of skilled labor at a reasonable price. Yes, you can get skilled people, but how many are there? Not enough," he says. "You can get cheap labor offshore, but often it's not skilled enough. ... The whole thing, frankly, looks like a cottage industry. It's about individuals having a lot of knowledge in their heads, and they're going to be the hero."
In the Trenches
Microsoft's work on software factories goes back several years. In 2004, Greenfield co-authored a book with colleague Keith Short called "Software Factories: Assembling Applications with Patterns, Frameworks, Models & Tools" (Wiley Publishing, 2004). The work is still fairly nascent today, but there's clear interest from developers. Microsoft has released basic factories for developing mobile clients, smart clients, Web clients and Web services, resulting in well over 100,000 downloads. The company most recently shipped an application block factory in Enterprise Library 3.0, released in late March.
It's hardly a new idea to lay out guidelines for developing applications, of course -- Microsoft has a group, Patterns & Practices, devoted to it -- but Greenfield stresses that software factories go much further, providing developers with not only ideas and written frameworks, but also required components and a degree of automation. "I have a lot of pattern books on my shelf ... I get ideas from them, the general gestalt of patterns," he says. "But when I'm working on a project, do I have all those patterns in my head? Not really."
The software factory vision has a number of core concepts. There are customizable schemas or "recipes" for building certain categories of programs. These include a list of associated artifacts, such as SQL files, as well as other information, such as instructions on the types of domain-specific languages to use. Then there are templates, a collection of the things needed to create the recipe -- ingredients -- such as patterns and custom tools.
Software factory-based apps are created in development environments such as Visual Studio Team System, aided by Guidance Automation Extensions (GAX), which run "guidance packages" that automate certain development tasks from within Visual Studio. Developers can create guidance packages with the Guidance Automation Toolkit (GAT), an extension to Visual Studio 2005.
The Right Fit?
Forrester analyst Jeffrey Hammond says the software factory approach suits "any environment where you're building a lot of similar applications," such as an enterprise dealing with a great number of mobile apps on various client platforms that have subtle differences.
Hammond says potential pitfalls around software factories include the amount of time it could take to build one, and whether by pursuing them, "are you trading one complexity for another?"
Overall, Hammond says, with software factories Microsoft is wisely going "from the bottom up, [saying], 'what are the best patterns or practices in a different area?'"
As for the company's support for software factories, Greenfield takes a measured view. "Microsoft has a long history of where some things succeed, some things don't, and you don't know until the endgame," he says. "Frankly, I think we have a good start, and have a good chance to succeed with it."
He acknowledges, though, that the factory theory isn't airtight. "It turns out the basic concept of software factories only makes sense if they're really cheap to build," he says, adding, "how do I make sure this is usable the second time around?"
Greenfield characterizes the existing factories and tools as "a first step," and says the next incarnation of Visual Studio, codenamed "Rosario," will feature a new runtime and authoring tools for software factories. He declines to provide specifics but says, "We're aiming to support model-driven factories."
In the meantime, Microsoft is welcoming community input. "It's very much our intent that people should modify the factories they download," he says. "We also want people to understand the concept. The concept is somewhat revolutionary, that everyone and their brother can start packaging IP and shipping it around. There's a whole ecosystem play we hope to see happen."
Chris Kanaracus is the news editor for Redmond Developer News.