In my previous post "Software Factories: Where to start" I tried to list some resources that might be interesting for new comers in the software factory space. I have been thinking about factories and also participating in this space for some time now and I recently realized that, although there is a lot of buzz around software factories it is still very difficult to enter the world of software factories.
It might sound simple; install GAT and the DSL Tools and build your first factory but unfortunately, from what I experienced, it isn't that easy (it might be me of course!). I had (and still have) a lot of questions like for example: "What is a software factory", "When would you build one", "How would you build one", "What tools would you use" and many, many more.
It's therefore that I decided to share some of my thinking's about factories to hopefully provide some answers to people that are about to join the software factories space. I am not a very formal guy so will try to write about these topics from a (factory) developer or (factory) architect perspective and keep it practical and understandable.
To be honest I am not sure I have the answers for all questions just yet but we will see where this leads too. Regular readers of this blog might have noticed that I discuss a lot of my software factory related work with Jezz. He did a lot of interesting posts on factories lately so hopefully he reads this post and will comment, or even better, add some content when he sees me struggling in my attempts (don't feel forced Jezz, but know that I am counting on you to help me out! ).
Ok, now we know the plan, let's make sure the title of this post makes sense and start with the first question:
If you were looking for a formal definition of what a software factory is, you would find one in the Software Factories” book written by Jack Greenfield and Keith Short. In this book, a software factory is defined as:
“A Software Factory is a software product line that configures extensible tools, processes and content using a software factory template based on a software factory schema to automate the development and maintenance of variants of an archetypical product by adapting, assembling and configuring framework-based components.”
Fair enough, but do we, as a developer, know what to build by just reading this definition? Not me. The patterns & practices team came up with a more pragmatic definition, that is in fact more accurate for the factories being built today:
“A software factory is a structured collection of related software assets. When a software factory is installed in a development environment, it helps architects and developers predictably and efficiently create high-quality instances of specific types of applications.”
But even this definition, does not really tell you what the factory itself is in concrete terms, at least not in enough detail to help you get started in building one. So we are going to use a much more simplified, and concrete definition that is more to the point from a developers perspective, describing what it actually is and how it physically works. Then from this, you will get a basic understanding of how the definitions above describe more precisely the moving parts of the factory.
[Please note, that this definition is being used here for the purposes of helping you understand the context of this series on building factories, and is not a formal and general definition of what a software factory is when it is finally shipped. The following definition only focuses on the concrete automation part of a factory. Inside the box of a real factory you will find other physical guidance assets like documentation, samples, reference implementations, training media etc. and together these make up a complete software factory.]
First of all, a software factory is a software development tool. This tool is used to automate the assembly and/or configuration of a software solution that is addressing a well known and described, specific problem domain. It’s here where we see our first difference between a software factory and another development tool like for example Visual Studio.NET. A software factory is targeted at only a small problem domain while we can use Visual Studio.NET to basically build anything we want (of course within limits).
Although there is a difference between software factories and Visual Studio.NET (for the Microsoft platform) in the size of the problem domain they target, they are also very much related. This is because a software factory runs within Visual Studio.NET and basically configures this environment to target the development of a specific problem domain. Things like menus, windows, editors, layout etc.
For example, think of the Microsoft p&p Service Factory that configures Visual Studio to develop web services. This (early generation) software factory adds some menus, wizards and templates to the standard Visual Studio environment (Solution Explorer) to help developers build services.
Another characteristic of a software factory is that it provides abstractions to simplify the problem domain it targets. An abstraction is something that simplifies the thing it describes and only focuses upon on only the important characteristics or variable parts of it.
In factories you can provide abstractions using several techniques like frameworks, specialized editors, wizards, models and diagrams.
Although providing abstractions is one of the most important requirements of a software factory, we haven’t seen a ‘publically available’ factory that uses all of these techniques - but I am sure we will see more in the future.
If you are interested in examples of abstractions that are used in factories, you might want to read this MSDN article about the EFx factory. The DSL that is used in this factory is a perfect example of the usage of abstraction.
Another very important aspect of factories is its output. A software factory outputs a generated solution for the problem domain it targets. The product of a factory is what it outputs. A software factory doesn’t necessarily output source code. For example, it’s also possible that a factory generates some configuration files that are used to configure an existing framework, some documents, or whatever makes sense to the problem domain it targets. They can also just configure other products which solve a particular domain. One thing to keep in mind is, that is likely that the factory output needs some manual work or customization before it is ready to use.
There is also another type of customization that is very applicable to software factories. This is, the customization of the software factory itself instead of the output it generates. This type of customization leads to an iterative approach where we start with a small factory that iteratively increases. It is this type of customization that we use to address a new concern in the factory or, solve a defect in the factory product, or customize our assets to suit your development requirements and corporate standards.
So, here we are. I tried to explain what a software factory really is by describing some off its key characteristics without using common software factory terms like “product line”, “schema”, “variants”, etc. Because of that I might be missing some important stuff but I am sure I can make up for that in a way that make sense in future posts when I cover some other, software factory related topics.
For those of you who can’t wait for that, and like to read a little bit more about a software factories definition in more software factory related jargon, I can recommend this post from Jezz.
If there are any software factory related questions that you might have and want me to answer please let me know by commenting on this post. I cannot guarantee I have the answers but we can at least discuss about it and try to find the answer together.
To be continued…
Remember Me
Page rendered at 3/12/2010 2:59:13 AM UTC
patterns & practices Developer Centre
Web Service Software Factory
Service Factory Contrib
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.