Industry Vertical Episode 001 – What is a Software Factory
by jim.lavin on Nov.04, 2008, under BluePrints, Domain-Specific Languages, GAT, GAX, Software Factories
I am proud to present the first episode of Industry Vertical the twice monthly net cast about industrializing software development with Software Factories, Guidance Automation and Domain Specific Languages.
Episode Script
Intro
Industry Vertical: Your guide to industrializing software development with Software Factories, Guidance Automation and Domain Specific Languages.
Welcome, I’m Jim Lavin and this is episode one of Industry Vertical, the twice monthly show where I help you to dominate software development by using software factories, guidance automation and domain specific languages.
Since this is the first episode of Industry Vertical, I want to take a little time to give you a little background about myself.
I’m a Geek, to some a preacher, and to others, the wise, old coding guru. I’ve got close to 30 years experience developing software, and I’ve been building software factories on the Microsoft platform since mid 2005, So, I’ve been there, done that and not only do I have the T-shirt, I’ve even got the scars to prove it.
One thing I’ve found, is even though there are some great books on software factories, there’s not one definitive cookbook on how to build out a factory.
I spent a lot of time searching the MSDN documentation, digging through the forums and scouring the blogs in order to get my questions answered.
This show is my gift to you, the developer starting out with software factories. I’ll be taking you through building a software factory step-by-step. My goal is to turn you all into crazed coding maniacs, that live and breath systematic reuse and assembly through components.
So what are we waiting for? let’s get started. In this episode we’ll try to answer the question, “What is a Software Factory?”, We’ll review one of the best Internet Factory Resources to get you started and we’ll take a quick look at the de-facto bible on Software Factories.
Factory Resources
“Factory Resources” is a segment where I clue you in on a good to know internet resource on Software Factories.
With this being the first episode, there is no better place to start than the Visual Studio Extensibility web site at msdn.microsoft.com/vsx.
This site is your first stop to find all of the documentation on the tools you’ll need to build a software factory. Without it you’ll find yourself endlessly going around in circles. So, you’ll want to save a link to this site because you’ll be going back to it quite often as you develop your first software factory.
The site has a links about getting started with Visual Studio Extensibility.
I bet you’re thinking Wait a minute! Hold on! what gives? You want to build a software factory not extend Visual Studio, that’s way too hard!
Well, today most of the software factories on the Microsoft platform are extensions of the Visual Studio Shell. So get over it, move on and accept the fact that this is not going to be some mamby, pamby, coding exercise, its gonna be a bitch!
But hey, don’t worry, you have me here to guide you down the path and show you the right way, so you don’t end up lost and confused.
The featured resources section includes links to the Visual Studio SDK and Domain Specific Language Tools documentation. Core reading material here folks, let me tell you. Once you finish going through it, you’ll know more about Visual Studio that carter has pills.
There are links to popular downloads which is a great place to go when you need to get the latest and most up to date tools and SDKs to build out your factory.
You’ll find the most recent posts from the extensibility team’s blog. This is really a great place to find some juicy insider tips and tricks about visual studio development.
The latest projects from the Visual Studio Gallery, the VSX Code Gallery and CodePlex. Oh man! what a treasure chest of examples! You can pretty much find examples on just about everything you need; packages, tool windows, domain-specific languages, code generation, it never ends!
The Visual Studio Extensibility forum, this is the place where everyone who is anyone in the visual studio world hangs out just to answer your newbie questions! And once you become the factory expert remember, its just as good to give as it is to receive, so when you come across a question that you know the answer to, contribute! Don’t be a taker never giving back to the community!
There are some great How Do I Training videos here as well. These are quick 10 to 15 minute videos which provide that visual link that is always missing in books, the folks who put these together take you through a process right before your eyes, its kinda like looking over the shoulder of a great master.
And finally, there are links to other content from the Visual Studio Extensibility community. Yep, that’s right there’s a lot more folks out there just like me, fanatical about building software factories and extending visual studio. And we’re growing all the time. I guarantee if you can’t find the answer to your question on this site the sites in these links will probably have what you’re looking for.
So get on over to msdn.microsoft.com/vsx and start checking it out, you won’t be sorry.
What is a Software Factory
Before we dive deep into the nuts and bolts of what makes up a software factory and how to build one, we need to have a common understanding of what a software factory is.
Software factories are a tool that helps you to industrialize the development of software by using frameworks, abstraction, automation and reuse. How useful of a tool, is up to you and how much effort you put in to them.
There are typically two types of software factories horizontal and vertical.
Horizontal software factories target generic solutions that can be used across any industry segment. The best example out there are the Microsoft patterns and practices series of software factories. They are designed to give you the core structure of a solution with out all the business domain stuff, so you can use them for any type of project you want.
Vertical software factories target a specific solution that can be used in a very narrow industry segment or business problem. Think of these being chocked full of domain specific business processes that can’t be used anywhere else other than the domain they’re targeted for.
So, if we try to build a standard solution to provide everyday Create, Read, Update, and Delete functionality for a database, you’re gonna see a pattern emerge.
You have the need to search for items, view the search results, edit items, add new items and delete items. The methods to search the data, view the results, edit, add and delete items is pretty much standard across all the tables you’ll ever come across.
What varies between the tables are the details of the data that each table contains. Theses variations are important to software factory developers.
If we were to build a reusable framework that provides the Create, Read, Update, and Delete functionality, we would need to specify these variations in order to configure our framework to create a solution for the uniqueness of each data table.
How we capture these variations can be abstracted up from the code implementation by using models, wizards and feature trees.
We can then use automation to generate the code artifacts and configuration files to complete the solution.
Still a little fuzzy? Well let’s take a look at each of the areas in a little more detail:
Frameworks provide the basis of a software factory by providing a reusable set of components that can be configured or used by other artifacts to build a specific component, application or solution.
These frameworks can consist of libraries, applications, components or individual code artifacts. When configured together they make up the overall solution. It’s just like combining Mentos and Diet Coke, it can be a pretty powerful combination.
Some popular frameworks are: the Microsoft Patterns and Practices Enterprise Library; a series of application blocks that provides developers reusable libraries based on the best practices for developing .NET applications; the Component-based Scalable Logical Architecture, better known as CSLA which provides a standard way to create robust object oriented programs using business objects;
And there are frameworks for other languages as well; Spring, an open source application framework for the Java platform; Symfony, a popular framework for the PHP Platform; and you’ve got Rails, a framework for the Ruby Platform. All are a powerful framework in their own right.
Abstraction is used by software factories to remove the implementation details of a problem so we can discuss a solution in terms of it’s variations in relation to an existing component, application or solution framework.
Using abstraction in software factories allows business analysts and architects to engage customers in familiar business terms with models, wizards and features trees.
Software factories provide for a highly automated approach to software development. Once the variations have been captured, then a solution can be generated using automation and code generation that targets our framework.
This usually occurs through the use of guidance automation extensions, visual studio packages, and T4 code generation templates. What does this mean to you? It all goes to help to reduce the amount of handwritten code, configuration and manual steps you have to complete to develop a solution.
Currently software factories provide around 30 to 40 percent of the overall solution leaving developers to deal with the business logic or solution specific code the factory might not address.
Just like automobile and electronic manufacturers reuse common components to assemble products in their assembly lines, software factories leverage components to assemble a solution from the abstract models used to capture the solution’s variations.
Through systematic reuse we can leverage the benefits derived from economies of scale and scope to make our development way more efficient.
Economies of scale are achieved when we reuse software components, frameworks and product lines to mass produce copies of a component, application or solution. We gain benefit by reusing the software components to reduce the effort and cost required to build a solution.
Think of this like using a recipe and ingredients to make oatmeal cookies. The ingredients are similar to our components, frameworks and product lines and the recipe is our factory schema, it tells us how to combine the ingredients to get the desired product, in this case, a batch of oatmeal cookies. We gain economies of scale when we reuse the recipe and ingredients to make a whole bunch of oatmeal cookies over and over.
Economies of scope are achieved when we reuse software components, frameworks and product lines to develop many similar but distinct components, applications or solutions. We again gain benefit by reusing the software components to reduce the effort and cost, but we also benefit by using the same components to address different problem domains.
If we add a few ingredients and a couple more recipes to our previous example we can gain economies of scope when we combine the ingredients to make a whole lot of different types of cookies. Now we can pump out not only oatmeal cookies, but chocolate chip, peanut butter and sugar cookies over and over as long as we want!
Just like a child can use Legos to build an infinite number of different toys, given an adequate supply of reusable components, software teams can build an infinite number of software solutions in a timely and cost effective manner the same way.
So there you have it, we’ve discussed that software factories are a tool that help you build a specific component, application or solution by using frameworks, abstraction, automation and reuse. In our next episode we’ll discuss the benefits of a software factory.
Factory Resources in Print
“Factory Resources in Print” is a segment where I quickly read a book and let you know if it’s useful in Software Factory Development.
In this episode we’ll take a look at the de-facto bible on Software Factories – the book “Software Factories – Assembling Applications with Patterns, Models, Frameworks and Tools” by Jack Greenfield and Keith Short.
With me being more of a practical type of guy and not much into the theory and such, this book read more like a text book for a college graduate program than than it did a How-To guide, it asserts that by making a paradigm shift to Model Driven Development, Development by Assembly and Systematic Reuse we can improve our capability to develop quality software much like the integrated component did for the electronics industry.
The book provides introductory chapters around what a software factory is, the components of a factory and the derived benefits of factories.
The book then dives deep into the details around the critical innovations that make software factories possible with chapters around; model driven development, domain-specific languages, systematic reuse, software product lines, abstraction, components, language transformations and code generation.
The final section of the book provides a detailed review of an example software factory along with a FAQ around how software factories compare to other technologies currently in use for software development.
Even though I thought the book was a little heavy on the theory, it still is the best place that provides an overview of software factories and the technologies that make software factories possible.
I suggest you pick up a copy and read it several times to make sure you have a solid understanding of software factories.
Wrap Up
Well, that’s it for this episode. I hope you found it informative and useful. You’ll be able to find links to the sites and books covered in the show notes for this episode at www.industryvertical.tv.
If you have comments, questions or suggestions for future shows please send them to theshow@industryvertical.tv.
I’m Jim Lavin, thank you for watching and we’ll see you next time on Industry Vertical.
Links
Factory Resources – The Visual Studio Extensibility web site can be found at http://msdn.microsoft.com/vsx
Factory Resources in Print – The Book Software Factories – Assembling Applications with Patterns, Models, Frameworks and Tools by Jack Greenfield and Keith Short can be found on Amazon.com: