From Systems to Services
How we can collaborate in the new paradigm?
Randy Ballew, Chief Technology Architect, IST-AS Steve Masover, Architecture Group, IST-AS
Overview
• What is "software as services"?
• Design Fundamentals & Implementation Concepts:
- Design Patterns
- Unified Modeling Language (UML)
- Model-Driven Architecture (MDA)
• MDA Tools: AndroMDA
The Service Request Model
• siloed development
• opaque orchestration
“Sure, we can have that special-order widget for you in about six months!”
Service Oriented Architecture
In an SOA environment, nodes on a network make resources available to other participants in the network as independent services that the participants access in a standardized way. Most definitions of SOA identify the use of Web
services (e.g., using SOAP or REST) in its implementation. However, one can implement SOA using any service-based technology.
Student Services @ Berkeley
• student registration validation
• roster
• contact information
• degree validation
• transcript
• ???
Enterprise Service Bus
• An infrastructure designed to support the interactions of
services in a service-oriented architecture
• Becomes useful once we reach a critical mass of
available services
Designing and Implementing
Services
Information Services & Technology:
CIO’s Point of View
• CIO has been showing this slide for months: what he & cabinet are thinking vis-à-vis campus IT
• SOA enables flexibility • Flexibility enables
Fitting it all together
service =
model-driven-software-development *
(domain-driven-design % design-patterns)
• Design Analysis Patterns - thinking in bigger boxes
• Design Patterns - implementation using tested engineering principles • Unified Modeling Language (UML): representing our designs
• Model Driven Architecture (MDA) - automating major pieces of development efforts
We’re going to look at how these elements converge to
enable delivery of software as services:
Software Models the Real World
no matter what language it’s coded in...
<?php class Student { var $Name; var $Gender; var $GradeLevel; var $Schedule; /* Constructor */ function Student($studentName) { $this->Name = $studentName; } […] ?> class Course { ...
boolean register ( Student s ) {
Transcript t = s.getTranscript(); if ( t.successfullyCompleted ( c2 ) return true; else return false; ... } ... }
public class Student {
private String name; private int ID;
public double test1, test2, test3; private static int nextUniqueID = 1; Student(String theName) { name = theName; ID = nextUniqueID; nextUniqueID++; } […]
Fitting it all together
service =
model-driven-software-development *
(domain-driven-design % design-patterns)
• Design Analysis Patterns - thinking in bigger boxes
• Design Patterns - implementation using tested engineering principles • Unified Modeling Language (UML): representing our designs
• Model Driven Architecture (MDA) - automating major pieces of development efforts
We’re going to look at how these elements converge to
enable delivery of software as services:
Domain Design: Analysis Patterns
Viewing our business as re-usable software objects:
People
Fitting it all together
service =
model-driven-software-development *
(domain-driven-design % design-patterns)
• Design Analysis Patterns - thinking in bigger boxes
• Design Patterns - implementation using tested engineering principles
• Unified Modeling Language (UML): representing our designs • Model Driven Architecture (MDA) - automating major pieces of development efforts
We’re going to look at how these elements converge to
enable delivery of software as services:
Design Patterns:
general repeatable solutions to commonly-occurring problems in software design
•It works, it’s quick
•Hard to extend, maintain, scale •The “ready, fire, aim” pattern • Quick & Dirty (rarely & always)
• It’s established, widely adopted:
- Gang of Four © 1995, movement predates this seminal book - Inspired by Christopher Alexander: architecture prof @ Cal - 1,260,000 Google hits: "design pattern" software
- 27K on Sun; 12K IEEE; 10K IBM; 1K Microsoft - standard vocabulary for OO programmers
• Extensible, maintainable, scalable: longer-term benefits of up-front cost
Design Patterns:
MVC is the
pattern of choice for
webapp development frameworks
Fitting it all together
service =
model-driven-software-development *
(domain-driven-design % design-patterns)
• Design Analysis Patterns - thinking in bigger boxes
• Design Patterns - implementation using tested engineering principles • Unified Modeling Language (UML): representing our designs
• Model Driven Architecture (MDA) - automating major pieces of development efforts
We’re going to look at how these elements converge to
enable delivery of software as services:
What is Unified Modeling
Language?
• an industry standard and widely utilized language for
modeling structures, behaviors, and interactions.
• a common shorthand with which software developers can
communicate with each other, and record design decisions
• a way to jumpstart the actual coding of a software
component, service, or application using tools that generate
code from UML
UML: What can be modeled?
Structure
: Class Diagram, Object Diagram, Component Diagram, Composite Structure Diagram, Package Diagram, and Deployment Diagram.Behavior
: Use Case Diagram (used by some methodologiesduring requirements gathering); Activity Diagram, and State Machine Diagram.
UML: Object Diagram
• a high-level “Class Diagram” is often called an “Object Diagram” or “Object Model”
•relationships between various structures (representing things like
UML: Class Diagram
• a more elaborate Class Diagram, courtesy of Scott Ambler and agilemodeling.com
• might be a very early draft of someone’s attempt to model people at a University
UML: Activity Diagram
• an activity diagram models behavior
• the application has users, and users have profiles (information that describes them)
• when we get to a real-world
example you'll see the significance of the <<stereotypes>> - they're a shorthand for describing the type of component represented in a diagram element
• This diagram shows that:
• system finds appropriate profile given an identifying key • a <<Front End View>> is generated - maybe a web page
Fitting it all together
service =
model-driven-software-development *
(domain-driven-design % design-patterns)
• Design Analysis Patterns - thinking in bigger boxes
• Design Patterns - implementation using tested engineering principles • Unified Modeling Language (UML): representing our designs
• Model Driven Architecture (MDA) - automating major pieces of development efforts
We’re going to look at how these elements converge to
enable delivery of software as services:
MDA: Model Driven
Architecture
http://www.omg.org/mda/
• Platform-independent models (PIMs)
document the functionality and behavior of an application separate from the
technology-specific code that implements it
• Platform-specific models (PSMs) specifies functionality in terms of an implementation technology
• Modeling in a PSM enables automated code generation
AndroMDA: Generating code
from UML
• PIM
• PSM
• Code Generation based
on design patterns
embedded in templates
• Manual coding is
A UCB Example: CoA
Validation
• Chartstrings represent constructs on General Ledger
• Departments across campus submit transactions keyed on
Chartstrings
Activity Diagram: Interactive
Chart String Validation
Class Diagram:
ValidationService
• <<WebService>>, <<WebServiceOperation>>
Demo:
Conclusions / Take-aways
• Using analysis and design patterns, your software is
built on the shoulders of giants
• With MDA, you’re writing business code, not
plumbing
• “Software development is a lot like swimming -
dangerous to do alone”
- Scott Ambler, http://www.ambysoft.com/References
•Design Patterns, Gamma, Helm, Johnson, Vlissides; Headfirst Design
Patterns, Freeman & Freeman; Analysis Patterns, Fowler
• UML Distilled: A Brief Guide to the Standard Object Modeling Language, Fowler & Scott
•MDA Explained: The Model Driven Architecture--Practice and Promise, Kleppe, Warmer, & Bast
• Enterprise Patterns and MDA: Building Better Software with Archetype
Patterns and UML, Arlow & Neustadt
• An Introduction to Model Driven Architecture, Brown & Conallan (part 1 of 3 is at: http://www-128.ibm.com/developerworks/rational/library/3100.html ) • Object Management Group: http://www.omg.org