You are on page 1of 44

Software Factories :

Assembling Applications with Patterns,


Models, Frameworks and Tools

Steve Cook
Software Architect
Enterprise Tools, Visual Studio

Microsoft Architects Forum


Agenda

 Software Industrialization
 Domain Specific Languages
 Viewpoints and Languages
 A Software Factory Schema
 MDA and UML

Microsoft Architects Forum


The Software Crisis (ca. 2004)

 $250B/yr in US (average $430K to $2.3M per


project)
 16% on time and budget but deliver less than
planned (avg 42%)
 53% overrun (avg 189%)
 31% are canceled, losing $140B/yr

Microsoft Architects Forum


From “Kurzweil, Moore, and Accelerating Change”, Ilkka Tuomi,
http://www.jrc.es/~tuomiil/articles/Kurzweil.pdf Microsoft Architects Forum
Industrialization
Dynamic

Mass Craftsmanship
Product change

Customization
Stable

Mass Continuous
Production Improvement
Stable Dynamic
Process change

Microsoft Architects Forum


Software Development as Craftsmanship

 Labour Intensive
 Generic Tools
 Generic Processes
 One off applications
 Hand stitched from
scratch
 Minimal reuse

Overruns, defects, security holes, project


failures
Microsoft Architects Forum
Industrialization
Dynamic

Mass Craftsmanship
Product change

Customization
Stable

Mass Continuous
Production Improvement
Stable Dynamic
Process change

Microsoft Architects Forum


Mass Production / Continuous
Improvement
 Exploit economies of
scale to automate &
improve production
 Stamping out many
identical copies of a
prototype
 Used to produce
CDs/DVDs
 Does nothing to help
software development

Microsoft Architects Forum


Industrialization
Dynamic

Mass Craftsmanship
Product change

Customization D
yn
am
ic
s ta
bi l
i ty
Stable

Mass Continuous
Production Improvement
Stable Dynamic
Process change

Microsoft Architects Forum


Mass Customization
 Exploit economies of
scope
 Reuse designs &
components
 Use well-understood
processes
 Key is supporting
variability

Define only the unique pieces of each


system
Microsoft Architects Forum
Software Factories

 Domain-specific process
 Domain-specific tools &
languages
 Domain-specific content
 Automate rote and menial
tasks
 Improve through
experience and
measurement

General-purpose IDEs become domain-


specific software factories
Microsoft Architects Forum
Agenda

 Software Industrialization
 Domain Specific Languages
 Viewpoints and Languages
 A Software Factory Schema
 MDA and UML

Microsoft Architects Forum


Raising the Level of Abstraction
Requirements

Increasing Abstraction
Gap

Executables
Executables
Requirements

Increasing Abstraction
Executables
Gap
The history of programming is an
exercise in hierarchical Language
abstraction. In each generation,
language designers produce Language
constructs for lessons learned in Executables
the previous generation, and then
architects use them to build more
complex and powerful
abstractions. (Smith and Stotts)
Microsoft Architects Forum
Domain Specific Languages
C(x) h C(x) Declarative
ih = –
t 2m  x

a>b && c==d


jo biscuits 24 green
pat cakes 32 pink

<CallRecord>
<caller><number>07713248</number>
Employee Job
Textual name
address 0..*
description
pay Pictorial
promote assign

Call
Record base rate: £/s

class Magnox : NuclearPowerStation call length

store
{
call

public void dropRods () Procedural Microsoft Architects Forum


Domain Specific Languages
 Focused on a single aspect of application building
 Success in broad horizontal domains: SQL, Windows
Form Designer
 Easy to understand by domain experts
 Designed to support the concepts defined by an
underlying framework
 Automate rote tasks with effective code generation
 Increase agility by visualizing concepts, generating
code and other artifacts, enabling rapid iteration

Building them must be fast, cheap


and easy
Microsoft Architects Forum
Parts of a DSL
Concepts &
Well-formedness
Rules

Notations &
Mappings

XML Serialization

Generated and
Related Artifacts

Microsoft Architects Forum


Implementing a DSL
Modeling Language
(tool) designer
feeds in language /
tool design

Developer
adds detail to design
generate e.g. extra metadata to drive code generation
code Software /
Generated
Generated systems
designer
MDF
API
MDF
adds code
(optional)

Microsoft Architects Forum


Models and Frameworks
Tools Framework
edit / build
Other Other
Editors Resources
Custom uses
Partial
Classes
DSL Framework completes
ASP.NET
Editor Partial
generates Classes

generates Model Files uses


(SDM)
DSL Config Files
Model
Microsoft Architects Forum
Effective Transformations
Model
Model
Model
Application
Generated Code
Code
Framework
Domain Specific
Application
Generated
Generated Pattern
Framework
Language
Code
Code Platform
Platform
Frameworks
Platform
Platform
Platform
Frameworks
Generate to
Old Case Framework
Model Model
Model
Model

Generated
Application
Generated CodeCode
Code
Platform
Platform
Platform
Frameworks Generated
Application
Generated CodeCode
Code
Platform
Platform
Platform
Generate Frameworks

DSLs To Platform Interrelated


Models
Microsoft Architects Forum
Agenda

 Software Industrialization
 Domain Specific Languages
 Viewpoints and Languages
 A Software Factory Schema
 MDA and UML

Microsoft Architects Forum


Code Visualization

Class
Class Designer
Designer
and
and
two-way
two-way code
code synch
synch

XML, Projects,
Configs, Classes,
Code

packaged into Deployment


Units

Microsoft Architects Forum


Raising The Level Of Abstraction

Assemblies
? Projects and
Templates

.asmx Files .asmx Code Other Code Config Files


Behinds

Microsoft Architects Forum


Raising The Level Of Abstraction

Application Connection Model

Assemblies Projects and


Templates

.asmx Files .asmx Code Other Code Config Files


Behinds

Microsoft Architects Forum


Vertical Mapping - Application
Design

Services,
Messages, Applications,
Endpoints

Abstraction/
refinement
XML, Projects,
Configs, Classes,
Code

packaged into Deployment


Units

Microsoft Architects Forum


Vertical Mapping - Data Center
Design

Services,
Messages, Applications, Logical Data Center
Endpoints Host Software

Abstraction/
refinement
XML, Projects,
Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


Providing Traceability

Applications

System
Definition Application
Model
Hosting

Logical Machines &


Network Topology

Hardware

Microsoft Architects Forum


Horizontal Mapping - Deployment

constraints

Services,
Messages, Applications, Logical Data Center
Endpoints Host Software

XML, Projects,
Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


User Interface Process Design

Implementable Business
Processes and Entities

User Interface
Process

Services, Logical Business


Messages, Applications, Logical Data Center
Entities,
Endpoints Host Software
Operations, Rules

XML, Projects, DB
Definitions Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


Business Entity
Business
Capabilities
Implementation
Business Processes and
Entities

Implementable Business Manual


Processes and Entities Processes

User Interface
Process
Biztalk
Schedules & Rules

Services,
Messages, Applications, LogicalBusiness Entities, Logical Data Center
Endpoints Operations, Rules Host Software

XML, Projects, DB
Physical Servers
Definitions
Configs, Classes, and Network
Code Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


Business Process Modeling
Business
Capabilities

Business Processes and


Entities

Implementable Business
Processes and Entities

User Interface
Process

Services,
Messages, Applications, Logical Business Entities, Logical Data Center
Endpoints Operations, Rules Host Software

XML, Projects, DB
Definitions Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


Business Process
Business
Capabilities
Implementation
Business Processes and
Entities

Implementable Business Manual


Processes and Entities Processes

User Interface
Process
Biztalk
Schedules & Rules

Services,
Messages, Applications, LogicalBusiness Entities, Logical Data Center
Endpoints Operations, Rules Host Software

XML, Projects, DB
Definitions Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


Configuring
Business
Capabilities
Business
Business Processes and
Entities Capabilities
Implementable Business Manual
Processes and Entities Processes

User Interface
Process
Biztalk
Schedules & Rules

Services,
Messages, Applications, LogicalBusiness Entities, Logical Data Center
Endpoints Operations, Rules Host Software

XML, Projects, DB
Definitions Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units

Microsoft Architects Forum


Agenda

 Software Industrialization
 Domain Specific Languages
 Viewpoints and Languages
 A Software Factory Schema
 MDA and UML

Microsoft Architects Forum


Software Factory Schema
Business

A Graph of
Capabilities

Business Processes and


Entities
Interrelated
Implementable Business
Processes and Entities
Manual
Processes
Viewpoints
User Interface
Process
BizTalk
Schedules & Rules

Services,
Messages, Applications, Logical Business Entities Logical Data Center
Endpoints Rules, Operations Host Software

XML, Projects, DB
Definitions Physical Servers
Configs, Classes,
and Network
Code
Segments

Deployment
Units
Microsoft Architects Forum
Software Factory Schema
Business
Capabilities
Recipe for a
system family
Business Processes and
Entities

Implementable Business
Models
Patterns
Manual
Processes and Entities Processes

Blocks
User Interface
Process
WinOE
Schedules & Rules
Frameworks
Services,
Components
Messages, Applications,
Endpoints Process
Logical Business Entities
Operations, Rules
Logical Data Center
Host Software

Test Cases
XML, Projects, Tools
DB
Definitions Physical Servers
Configs, Classes,
and Network
Code
Segments

packaged into Deployment deployed on


Units
Microsoft Architects Forum
…A Software Factory Schema
 Like a recipe for a specific class of systems
 A set of viewpoints related by formal mappings
 Describes artifacts required to build systems in the class and explains
how to combine them
 Implemented by a software factory template
 Configures Visual Studio to build members of the class
 Provides the necessary ingredients and tools
 Solution template, project templates, file templates, patterns, dynamic
help, work item types, workflow, check in policy, reports, groups &
permissions, phase exit criteria
 Creates a domain specific IDE called a software factory
 Integrates tools, process and content for the class of systems
 Domain specific editing, compilation, debugging, refactoring,
building, testing, deployment, configuration management, defect
tracking, reporting

Microsoft Architects Forum


Why Software Factories

 Consolidate implicit business and system


development knowledge for software product lines
into specialized tools, process, and content
 Increase productivity and predictability by better
organizing and automating the development process
 Reduce cost and risk by distributing the software
life cycle across networks of interdependent groups
and partners

Microsoft Architects Forum


Agenda

 Software Industrialization
 Domain Specific Languages
 Viewpoints and Languages
 A Software Factory Schema
 MDA and UML

Microsoft Architects Forum


What About MDA?
 Camp 1: A way to build applications in UML using
 A platform-independent UML model (PIM)
 Many platform-specific UML models (PSM)
 Camp 2: Promoting the Meta Object Facility
(MOF) as a substrate for defining models and their
relationships
 Few vendors implement MOF
 Interoperability is poor
 Camp 3: UML as a programming language
 Interacting state machines define the behavior
 Useful for real-time niches eg avionics

Microsoft Architects Forum


About UML
 Popular and successful set of notational conventions for
modelling
 Addresses only a few domains well
 Misses Testing, Database, User Interaction, Services, Business
Capabilities
 Weak extension mechanisms
 Stereotypes and tags have no behavior
 Hard to implement consistently in tools
 Large, complex, inconsistent, disorganized
 Inconsistent one-size-fits-all semantics
 Defined by prose not by translation or execution
 Defines model structure inside the model
 Makes models hard to map to storage systems

Microsoft Architects Forum


“UML and More”

 Introduce family of Domain Specific Languages as


an alternative to a generic UML
 Allow existing Visio tools to address needs of
Sketchers
 Reduce cost and effort to produce custom languages
and designers
 Provide templates for UML-like notations as
starting-points for language design
 Sign up partners to build UML tools on our
platform

Microsoft Architects Forum


Summary

 Software Industrialization
 Domain Specific Languages
 Viewpoints and Languages
 A Software Factory Schema
 MDA and UML

Microsoft Architects Forum


Resources
 Websites
 Software Factories
 http://msdn.microsoft.com/architecture/softwarefactories
 Visual Studio 2005 Team System
 http://msdn.microsoft.com/vstudio/teamsystem
 Visual Studio 2004 Team System Workshop
 http://lab.msdn.microsoft.com/vs2005/teamsystem/workshop
 Newsgroups
 Microsoft.private.whidbey.teamsystem.architect
 Microsoft.private.whidbey.teamsystem.architect.modeling
 Email
 stcook@microsoft.com
 Weblog
 http://blogs.msdn.com/stevecook

Microsoft Architects Forum


© 2004 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Microsoft Architects Forum

You might also like