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 A UCB example: CoA Validation
The Service Request Model siloed development opaque orchestration not easily pluggable not reusable 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. IST is renaming itself as part of a change in orientation: toward provision of services that collaborate with other services across the campus.
Student Services @ Berkeley (just a few candidates ) 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 Orchestration of services (BPEL), message delivery guarantees, platform heterogeneity
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 anticipation, responsiveness
Fitting it all together service = model-driven-software-development * (domain-driven-design % design-patterns) We re going to look at how these elements converge to enable delivery of software as services: 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
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++; } [ ] } // end of class Student
Fitting it all together service = model-driven-software-development * (domain-driven-design % design-patterns) We re going to look at how these elements converge to enable delivery of software as services: 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
Domain Design: Analysis Patterns Viewing our business as re-usable software objects: People Transactions
Fitting it all together service = model-driven-software-development * (domain-driven-design % design-patterns) We re going to look at how these elements converge to enable delivery of software as services: 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
Design Patterns: general repeatable solutions to commonly-occurring problems in software design It s established, widely adopted: It works, it s quick Hard to extend, maintain, scale The ready, fire, aim pattern Quick & Dirty (rarely & always) - 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 Don t re-design the wheel... Aim first, fire after
Design Patterns: Doing the right thing with technology The Model-View-Controller (MVC) Pattern
MVC is the pattern of choice for webapp development frameworks JavaServer Faces Technology
Fitting it all together service = model-driven-software-development * (domain-driven-design % design-patterns) We re going to look at how these elements converge to enable delivery of software as services: 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
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 methodologies during requirements gathering); Activity Diagram, and State Machine Diagram. Interaction: Sequence Diagram, Communication Diagram, Timing Diagram, and Interaction Overview 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 Customers, Orders, and Products) via common behaviors (a Customer Places an Order)
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 obviously, it s got some distance to go, but it gives a general idea, modeling classes in an inheritance tree and paving the way for elaborations (e.g., a person can have more than one flavor of address - local, permanent, billing, etc.)
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 user provides/edits profile information, submits it system updates the profile-in-question
Fitting it all together service = model-driven-software-development * (domain-driven-design % design-patterns) We re going to look at how these elements converge to enable delivery of software as services: 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
MDA: Model Driven Architecture Platform-independent models (PIMs) document the functionality and behavior of an application separate from the technologyspecific code that implements it Platform-specific models (PSMs) specifies functionality in terms of an implementation technology Modeling in a PSM enables automated code generation http://www.omg.org/mda/
AndroMDA: Generating code from UML PIM PSM Code Generation based on design patterns embedded in templates Manual coding is minimized: business code only, not plumbing
A UCB Example: CoA Validation Chartstrings represent constructs on General Ledger Departments across campus submit transactions keyed on Chartstrings Prevalidation prevents failure of batch transactions Collaborative refactoring of a previous implementation
Activity Diagram: Interactive Chart String Validation
Class Diagram: ValidationService <<WebService>>, <<WebServiceOperation>> compressed notation for representing functionality Stereotypes inform AndroMDA that the class is a Web Service
Demo: http://coa.berkeley.edu/coa
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 AndroMDA: http://www.andromda.org/ SOA links: http://wiki.java.net/bin/view/javapedia/serviceorientedarchitecture