Title: Design Mechanisms The path to successful projects
1Design MechanismsThe path to successful projects
2Bio
- Lars Fredholm, System Enginer
- IBM, RSV, LANI, MSC, MagicIT AB
- C, Clipper, VO, SQL-Windows, VB/MTS, Java
- Rose Experience since 1993 (Rose 2.x)
- Today
- Rational OOAD/Rose Certified Instructor, MCP
- Consulting in Rationals Tools
3Architectural Mechanisms?
4The Architect Mind
- What does it mean technically?
5Architectural Mechanisms? Technical
functionality that is needed
GUI
Stateless/ State
Concurrency/Distribution
Window Navigation
Persistency
Security
Master/ Detail
Broker/ Transaction
Communication
Devices
Reporting
Legacy System/ Import/Export
Language/ Errors
6Architectural MechanismsThree Categories
- Architectural Mechanism Categories
- Analysis Mechanisms (conceptual)
- Design Mechanisms (concrete)
- Implementation Mechanisms (actual)
- Exampel
- Persistence gt Database gt Sybase
7Architectural Mechanisms have Characteristics
- Persistency
- Granularity 1 to 10 Kbytes per row
- Volume up to 200000 rows
- Access frequency
- Create 500 per day
- Read 2,000 access per hour
- Update 1,000 per day
- Delete 50 per day
- Communication
- Synchronicity
- Message Size
- Protocol
8Parts in RUPregarding Design Mechanisms
- Inception / Early Elaboration
- Requirements (functional and supplementary)
- Build Technical Prototypes
- SAD, Software Architecture Document
- Elaboration
- Model Design Mechanisms
- Design Guidelines
- Use Case Realization
- Construction
- Code Templates
9Inception PhaseMilestone Can we do this project?
- Functional Requirements
- Use Case survey, System scope, Priority
- Non functional Requirements
- Technical Prototypes (prove concept)
- Candidate Architecture
- Architecture Mechanisms
- Project Plan
- Cost and schedule
10Functional RequirementsUse Case Model Survey
- Gives Early Abstractions - Analysis Classes
11Map to Analysis ClassesAnalysis Classes are
early Classes
- Mapping Mechanisms and Analysis Classes
12Non Functional Requirements Supplementary
Specifications
- GUI
- Devices
- Environment
- Storage
- Communication
- Performance
- Distribution
13Technical PrototypesTechnical prototypes proves
the choice of Architecture and reduces Risks early
- Validate Mechanism with Prototype
- If a Prototype doesnt exist, build it!
- GUI applet, graphical applet
- Report applet, scanner applet
- Database applet, transactions applet
- Object broker applet
- External system applet, import/export applet
- Stress applets
- Security applets
14Candidate ArchitectureSoftware Architecture
Document
- Describes the Architecture by examples
- Shows Architecture significant examples of
- Use Cases
- Realizations
- Class Diagrams
- Process Diagrams
- Component Diagrams
- Deployment Diagrams
- Data Model
15SADSoftware Architecture Document
16Elaboration Phase Milestone Have we managed all
questions regarding the Systems architecture?
- Design Mechanisms
- Design Patterns to Reuse
- Tested proved technical Prototypes
- Design Guidelines
- Rules to follow when designing the System
- Use Case Realization
- Use Case Scenarios with Iteration and Class
Diagrams
17Design Mechanisms
- Design Mechanisms
- Design Patterns
- Parameterized Collaboration of components that
- solves a general design problem
- Iteration Diagrams
- Objects Messages, Dynamic view
- VOPC (View of Participating Classes)
- Class Diagram, Static view
- Technical Prototype
- Code snippets
18Design Mechanisms,Design Pattern Styles
- Inheritance
- Use Structural behavior from Super Class
- Delegation
- Use build-in behavior from Subsystem
- Role Classes (templates)
- Reuse same behavior as modeled in Role Classes
19Design Mechanisms,Rose Design Model
20Design Mechanisms,Package Overview
21Design Mechanisms,Technical Use Case Diagram
22Security Mechanismby Inheritance
23Security Mechanism, Iteration Diagram
24Security Mechanism, VOPC, View of Participating
Classes
25Security Mechanism, Code Examples
'Check Permissions for resource Public Function
ChkRights(Session as clsSession, Resource as
Object, Permission as Integer) As Boolean On
Error GoTo Catche Dim strPerm as
String Try strPerm Resource.ObjectPerm(Sessi
on) Select Case Permission Case 1
'Check VIEW permissions_ blnOk
Mid(strPerm,1,1) Case 2 'Check NEW
permissions _ blnOk Mid(strPerm,2,1)
Case 3 'Check UPDATE permissions _ blnOk
Mid(strPerm,3,1) Case 4 'Check DELETE
permissions _ blnOk Mid(strPerm,4,1)
Case Else _ blnOkFalse End Select
ChkRightsblnOk Exit Function Catche
Err.Raise Err.number, Err.description,
Err.source, Err.helpFile End Function
26Imaging Mechanismby Delegation
27Security Mechanism, Iteration Diagram
28Imaging Mechanism, VOPC, View of Participating
Classes
29Imaging Mechanism, Tech. Prototypes Proved
Concept
30Transaction Mechanismby Role Classes
31Transaction Mechanism, Iteration Diagram
32Transaction Mechanism, VOPC, View of
Participating Classes
33Transaction Mechanism, Code snippets Templates
'Operation on ltltrolegtgt Controller Class in
Application Server Public Function Transaction()
As Boolean On Error GoTo Catche Dim
objCtxObj As ObjectContext Try 'Get MTS
context Object from Global AppServer Set
objCtxObj GetObjectContext() 'Inform
MTS of Transaction Completion If Not
objCtxObj Is Nothing Then objCtxObj.SetComplete
Exit Function Catche 'Inform MTS of
Transaction Abortion If Not objCtxObj Is
Nothing Then objCtxObj.SetAbort Err.Raise
Err.number, Err.description, Err.source,
Err.helpFile End Function
34Design GuidelinesHandbook for designers
35Use Case Realization
- Realization Package
- Iteration Diagrams
- Dynamic View
- VOPC (View of Participating Classes)
- Class Diagram - Static view
36Realization,Package Overview
37Realization,Use case Behavior distributed to
classes
38Use Case Realization, Realization with Design
Mechanisms
- Receptionist is a person working in the Reception
with Customers. - Order is received from Customer by Receptionist.
The Paper is Scanned and Customer information
captured by the System.
39Use Case Realization, Realization with Design
Mechanisms
- Enter New Order is a part of the
- GUI Navigation Mechanism
40Use Case Realization, Realization with Design
Mechanisms
- GUI Navigation Mechanism
- Role Class PageDetail cloned to frmOrder
41Use Case Realization, Realization with Design
Mechanisms
- Imaging Mechanism
- No need to model deeper into Subsystem
- Already fully modeled in Mechanisms
42Use Case Realization, Realization with Design
Mechanisms
- Persistency Mechanism - clone clsOrder
43Use Case Realization, Realization with Design
Mechanisms
44Use Case Realization, Long version
- Without Mechanisms a long long version
45Construction PhaseMilestone Are we ready to
install?
- Is it Good Quality code?
- Are executables Stable and Tested?
- Is System documented and mantainable?
- Will User receive high usability?
- Is it inside timeframe (TTM)?
46Code TemplatesCode snippets with variation points
- Design Mechanisms gives reusable beaviour
- Resusable beaviour are code segments with
variation points (Roles) - Copy boring repeating code
- Focus on essential programming tasks
- Reusable code already tested
- Code Templates could be written
47AutomationEnhanced by Design Mechanisms
- Code Automation
- Rose Code Generation (Stubs)
- Copy Paste programming
- Code Wizards
- Template Tools
- Rose Reversing Code (Round Trip)
48SummaryUsing Design mechanisms
- Inception
- Anaysis Mechanisms identifies risks early
- Elaboration
- Design Mechanisms reduces risks early
- Design Mechanisms accelerates modeling
- Construction
- Templates code reduces risks early
- Templates code accelerates coding
- Templates code increases quality of the code
49Design MechanismsThe Vehicle to successful
projectswww.magicIT.com
Thank You!