TFS ALM Architecture Strategy Notes

This post describes the TFS ALM architecture strategy: Model Driven Architecture and top-down design, how to leverage UML diagrams and the Model Explorer tool, and how to use the Architecture Explorer for application analysis.
MDA + Top-down Design Overview
This topic describes MDA, UML visual design goals and capabilities, and UML / DSL support in TFS ALM & VSTS.
·        UML vs. DSL
·        4 aims of UML visual design: visualize, communicate, skeleton code, document decisions
·        Limits – round tripping, level of precision
·        5 UML 2.1.2 diagrams supported: Use Case, Activity, Sequence, Component, Class
·        Additional DSLs: Architecture Explorer, Dependency Graphs (DGML), Layer Diagrams (logical architecture)
·        E.g. solution file types: .activitydiagram, .layerdiagram
·        Modeling and Visualization Pack – Blueprints (Software Factories) – link Activity Diagrams to T4 CodeGen , guidance, Project & Project item Templates, Wizards
·        Feature Pack – UML XMI T4 CodeGen
·        File > New > Modeling Project.
·        Add diagrams as project items. Can drag items from toolbox, Model Explorer, Solution Explorer, Architecture Explorer
Model Explorer and UML
This topic describes how to build various UML diagrams: Use Case, Activity , Sequence Component and Class diagrams.
·        View > other Windows > UML Model Explorer
·        Use Case Diagram – toolbox:
o   Use Case – unit of organization
o   Actor
o   Comment
o   Subsystem - boundary
o   Artifact – reference a doc / image / other diagramvia Hyperlink property
o   Association – link actor with use case
o   Dependency / Include / Extend / Generalization – link use cases
o   Comment Link
·        Activity Diagram – process flowcharts – toolbox:
o   Initial node, Final Node
o   Action – single step
o   Connector – the glue
o   Object , Parameter – data flow
o   Comment
o   Decision / Merge – flow control
o   Fork / Join – concurrency flow control
o   Send Signal / Accept Event – external systems
o   Call behavior / operation – internal
o   Input / output pin – Operation IO
·        Sequence Diagrams – object interactions. Toolbox:
o   Lifeline – note: grey vertical bars are execution occurrences, triggered from 1st received message
o   Create / Sync / Async – messages
o   Comment / Comment Link
o   Interaction use – link different sequence diagrams
·        Component Diagrams – high level structure. Toolbox:
o   Component
o   Connector
o   Delegation – link nested components to ports on outer component
o   Interface – provided / required
o   Generalization – 'is a'
o   Part – 'has a'
·        Class Diagrams –Note: not same as .NET class diagrams. Toolbox:
o   Class / Interface / Enum
o   Connector, Association – undefined relations
o   Composition – 'has a'
o   Inheritance – 'is a'
o   Aggregation - collection
o   Package à namespace
o   Package Import à namespace usage
o   Comment
o   Properties: IsAbstract / IsDerived, IsStatic, Multiplicity, Concurrency, Visibility (scope) IsOrdered, IsUnique etc.
Architecture Explorer – App Analysis
This topic describes how to use the Architecture Explorer tool and how to leverage Dependency Graph and Layer Diagram DSLs.
·        Build Dependency Graphs and Visualize component organization & relationships
·        View > Architecture Explorer
·        5 icons in tray:
o   Create new DG from selected nodes
o   Add selected nodes to existing DG
o   Export to .dgml file
o   Reset AE
o   Save AE state as a query – placed in My Docs \ VS 2010\ArchitectureExplorer\Queries – can be added to source control
·        4 columns:
o   Node Column select solution target-subset
§ Class view / solution view
§ Select files
§ Saved DGML queries
o   Filter column
§ Filter by Namespace / class / scope
§ Filter textbox à substring search
o   Navigation Column
§ Node navigation – class / delegate / enum / interface / module / struct – select multiple by holding Ctrl key
§ Navigation direction – inbound / outbound link types – all / contains / generic args / implements / inherits / attributed
§ Analysis: Circular references , Show Hubs, Unreferenced Nodes (orphans)
§ Grouping – by container / pattern / property
o   Members column
§ Type: generic arguments / params / methods / properties
·        Dependency Graphs
o   Can be created without AE – D&D an assembly onto a blank diagram
o   Options for generating by assembly / namespace / class / custom
o   DG context menu à Analysis: Circular references , Show Hubs, Unreferenced Nodes
o   Toolbar:
§ Zoom
§ Directional flow: from left, right, top, bottom, force directed layout (around hubs)
§ Dependency Matrix View - intersections
§ Show Reflexive View – cross links
§ Neighborhood browse Mode – restrict viewing to # links distant
§ Butterfly Mode
·        Layer Diagrams
o   Describe and verify high level structure
o   Define or discover logical groupings as layers – e.g. namespaces, classes, methods. Initially layers are unlinked – because they contain no code files.
o   Drag multiple items - from solution explorer, architecture explorer, dependency graphs à link will be established between layers. Layer number indicates how many artifacts. An artifact can be copied into many layers.
o   Layer Diagram > View Links à Layer Explorer – contains row for each artifact. columns:
§ Name
§ Category – e.g. namespace
§ Layer Name
§ Supports Validation - Boolean
o   > Add / Generate dependencies - can be uni or bi directional. Each dependency arrow has a Direction property
o   > Validate Architecture Boolean à enforce rules. E.g. different layers may not be allowed to interact, or use certain namespaces (based on dependency direction). Errors show up in Error List Window.
o   > Manage Validation Errors > Suppress
o   > Build Action > Validate - Incorporate into build. Requires:
§ Validate Architecture = true
§ In TFSBuild.proj:
<ValidateArchitectureOnBuild>true</ValidateArchitectureOnBuild>
§ Or in build script:
Msbuild /p: ValidateArchitectureOnBuild=true

 

Print | posted on Tuesday, September 06, 2011 11:47 AM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © JoshReuben

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski