ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have...

56
1 ni.com

Transcript of ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have...

Page 1: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

1 ni.com

Page 2: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

ni.com

Page 3: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

ni.com

Jon McBee

Senior Project Engineer

LabVIEW Champion

Bloomy

Expo Booth #305 www.bloomy.com

Page 4: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

ni.com

How to Eat the Elephant

Turning Ideas Into Architecture

Expo Booth #305 www.bloomy.com

Page 5: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

5 ni.com

Overview

• Introduction

• What is Architecture

• How do you communicate

• UML

• Sketches

• Example

• Questions

Expo Booth #305 www.bloomy.com

Page 6: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

6 ni.com

Background Information

• Bloomy Quick Facts • 22 year NI Alliance Partner - Platinum level

• Products, platforms, and custom systems for ATE, DAQ, and Control

• NI Electronic Design Specialty, Vision Specialty, and Embedded Control Specialty

• 19 NI Certified LabVIEW Architects

• 3 NI Certified Training Centers

Expo Booth #305 www.bloomy.com

Page 7: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

7 ni.com

Introduction

• A new project comes in, where do you start?

Expo Booth #305 www.bloomy.com

Page 8: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

8 ni.com

Typical Software Lifecycle

Expo Booth #305 www.bloomy.com

Requirements

Gathering Design Development

Debugging &

Testing Deployment Architecture

Page 9: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

9 ni.com

What is Architecture?

Expo Booth #305 www.bloomy.com

Page 10: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

10 ni.com

What is Architecture?

Expo Booth #305 www.bloomy.com

Page 11: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

12 ni.com

What is Architecture?

“A good architecture avoids complicated systems by building them out of lots of simple components whose interactions can certainly create a complex system but not one that needs to be overly complicated” -Peter Cripps

Expo Booth #305 www.bloomy.com

“The high level structure of a system, the discipline of creating such a high level structure, and the documentation of this structure” -Wikipedia

Page 12: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

13 ni.com

Why is architecture important?

Expo Booth #305 www.bloomy.com

Page 13: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

14 ni.com

How to Eat the Elephant

Expo Booth #305 www.bloomy.com

Page 14: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

15 ni.com

Architecture Components

• Software Model • Defines how components interact at different levels of

abstraction

• Diagrams/Sketches

• What we are building

• Software Design • Structure of the software system

• Design Patterns/SDK/API/Data Structures

• How we are building

Expo Booth #305 www.bloomy.com

Page 15: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

16 ni.com

Software Models

• A visual representation of a software application • Defines how components interact

• Comprised of multiple views at different levels of abstraction

• Context Sketch

• Container Sketch

• Component Sketch

• UML Model

• Target Audience • Who will use these models?

• Everyone must understand model paradigm

Expo Booth #305 www.bloomy.com

Page 16: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

17 ni.com

Software Models

Expo Booth #305 www.bloomy.com

Page 17: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

18 ni.com

Software Models

Expo Booth #305 www.bloomy.com

Page 18: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

19 ni.com

Who Uses UML on a Regular Basis?

• Unified Modeling Language • General purpose modeling language

• Provides standard way to visualize system design

Expo Booth #305 www.bloomy.com

Page 19: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

20 ni.com

What UML Diagrams do you Use?

• Behavioral • Activity

• Sequence

• State

• Structural • Class

Expo Booth #305 www.bloomy.com

Page 20: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

21 ni.com

Why Don’t you use UML?

• I don’t know it • My team doesn’t know it

• My customers don’t know it

• I don’t need it • There is too much there/High barrier to entry

• My software is simple

• We don’t use object-oriented programming/design

• I don’t have it • I don’t have a tool

• Other reasons? • LabVIEW is self documenting…

Expo Booth #305 www.bloomy.com

Page 21: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

22 ni.com

How do you communicate?

Expo Booth #305 www.bloomy.com

• Unexplained definition of diagram elements like the styles of boxes and lines

• Missing or ambiguous relationships between diagram elements

• Omission of technology choices (or options)

• Mixing different levels of abstraction.

Page 22: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

23 ni.com

LowUML

Expo Booth #305 www.bloomy.com

• Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels of abstraction

• Using a simpler notation makes it easier to communicate the architecture • Using well defined levels of abstraction allows us to target different stakeholder

perspectives

When we reach the lower levels of abstraction, closer to design, a simple notation may not be sufficient and it is at this point we can switch to using a notation such as UML which can help describe complex designs.

Page 23: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

24 ni.com

Coding the Architecture

Expo Booth #305 www.bloomy.com

Page 24: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

25 ni.com

System Context

• High-Level Diagram • What are we building?

• Who is using it?

• How does it work with existing infrastructure?

Expo Booth #305 www.bloomy.com

System

Actor

Actor

Existing System

Existing System

Page 25: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

26 ni.com

System Context

• Makes the context explicit, minimizing assumptions

Expo Booth #305 www.bloomy.com

System

Actor

Actor

Existing System

Existing System

System X? System

X

Page 26: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

27 ni.com

System Context

• Helps identify who you need to talk to regarding which pieces of the system

Expo Booth #305 www.bloomy.com

System

Actor

Actor

Existing System

Existing System

System X Tom

Page 27: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

28 ni.com

System Context

• Doesn’t show much detail • Acts as a starting point for other diagrams

• Acts as a starting point for conversations

Expo Booth #305 www.bloomy.com

System

Actor

Actor

Existing System

Existing System

Page 28: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

29 ni.com

Containers

• Multiple containers make up a context • High-level technology decisions

• Overall shape of the system

Expo Booth #305 www.bloomy.com

System

Container

Container

Container

Page 29: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

30 ni.com

Containers

• Each container has a • Name

• (Technology)

• Responsibility

Expo Booth #305 www.bloomy.com

DB

SPC UI (HTML)

• Display

SPC Charts

• Can select by UUT

DB Query Engine

(LabVIEW)

• Structures SPC data

• Queries DB

Page 30: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

31 ni.com

Containers

• Illustrates • Purpose of interaction

• (Communication method) • Protocols

Expo Booth #305 www.bloomy.com

DB

SPC UI (HTML)

• Display

SPC Charts

• Can select by UUT

DB Query Engine

(LabVIEW)

• Structures SPC data

• Queries DB

Requests Data (Web Service) • HTTP

Returns Data (Web Service) • HTTP

Page 31: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

32 ni.com

Containers

• Can show interaction of containers with actors external to context

Expo Booth #305 www.bloomy.com

DB

SPC UI (HTML)

• Display

SPC Charts

• Can select by UUT

DB Query Engine

(LabVIEW)

• Structures SPC data

• Queries DB

Requests Data (Web Service) • HTTP

Returns Data (Web Service) • HTTP

Manufacturing Engineer

QA Engineer

Tracks production by

station

Tracks failures by part

Queries DB (SQL) • TCP

Page 32: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

33 ni.com

Containers

• Frames question: “Where do I need to write code in order implement features?”

Expo Booth #305 www.bloomy.com

DB

SPC UI (HTML)

• Display

SPC Charts

• Can select by UUT

DB Query Engine

(LabVIEW)

• Structures SPC data

• Queries DB

Requests Data (Web Service) • HTTP

Returns Data (Web Service) • HTTP

Manufacturing Engineer

QA Engineer

Tracks production by

station

Tracks failures by part

Queries DB (SQL) • TCP

Page 33: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

34 ni.com

Components

Expo Booth #305 www.bloomy.com

System

Container

Container

Container

Component Component

• Building blocks of system

Page 34: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

35 ni.com

Components

Expo Booth #305 www.bloomy.com

Web Service (Actor)

• Called by Web Resource methods

DB Interface (Actor)

• Queries database

• Each Component has a • Name • (Technology) • Responsibility

SPC UI DB

Page 35: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

36 ni.com

Components

Expo Booth #305 www.bloomy.com

Web Service (Actor)

• Called by Web Resource methods

DB Interface (Actor)

• Queries database

• Illustrates • Interaction • Communication Method • Protocols

SPC UI DB Class based messaging (Actor Framework)

Page 36: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

37 ni.com

Components

Expo Booth #305 www.bloomy.com

Web Service (Actor)

• Called by Web Resource methods

DB Interface (Actor)

• Queries database

• Should map to requirements • Use Cases • User Stories • Feature Request

SPC UI DB Class based messaging (Actor Framework)

Page 37: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

38 ni.com

UML

• Use where necessary

Expo Booth #305 www.bloomy.com

System

Container

Container

Container

Component Component

UML UML UML UML

Page 38: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

39 ni.com

UML

• UML fits well at this lower level of abstraction

• UML may fit at higher levels • Sequence diagram of component interaction within a container

• Sketches focus on structure, UML can inject processes and detailed behavior when needed

Expo Booth #305 www.bloomy.com

Page 39: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

40 ni.com

Define Your Notation

Expo Booth #305 www.bloomy.com

Symbols Colors

Context

Container

Component

Data

Actor

Internal

External

Page 40: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

41 ni.com

Requirements

Expo Booth #305 www.bloomy.com

Page 41: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

42 ni.com

Ex. System Context

Expo Booth #305 www.bloomy.com

Customer

• Check Balance • Deposit • Withdraw • Transfer

Enterprise Database

Physical Console

• Retrieve Account • Update Account

• Button Press • Debit Card • Display Info

Automatic Teller Machine Simulator

Enterprise Database

Physical Console

Page 42: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

43 ni.com

Ex. Containers

Expo Booth #305 www.bloomy.com

Simulation Interface (LabVIEW)

• Program run to test ATM algorithms

Account Database (Text File) • Interface by which the ATM

accesses and changes account information

ATM Message Table (Text File) • Table of message names and

message text displayed on console

ATM Error Log (Text File) • Error Log file which can be

checked by ATM maintenance personnel

Reads from and writes to

Reads from and writes to

Reads from and writes to

ATM Simulator

Page 43: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

44 ni.com

Ex. Components/Modules

Expo Booth #305 www.bloomy.com

Uses Uses Uses

Simulation Interface

Simulation Interface (Actor)

• Run to test ATM algorithms

Simulated Database (Actor)

• Mimics access to an Enterprise Database

ATM Controller (Actor)

• Manages users, accounts, and transactions

Simulated Console (Actor)

• Mimics physical console

Page 44: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

45 ni.com

How to eat the elephant

• Understand how your stakeholders see the elephant

• Use sketches to establish structure at different levels of abstraction

• Use sketches to communicate with stakeholders • Both external and internal

• Use UML where and how it most benefits your design • LowUML

Expo Booth #305 www.bloomy.com

Page 45: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

46 ni.com

Further Reading

• http://www.codingthearchitecture.com/

• http://www.umlzone.com/articles/agile-software-architecture-and-nouml/

• http://softwarearchitecturezen.blogspot.com/2011/05/sketching-with-uml.html

• http://martinfowler.com/articles/designDead.html

Expo Booth #305 www.bloomy.com

Page 46: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

47 ni.com

Questions?

Expo Booth #305 www.bloomy.com

Page 47: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

48 ni.com Expo Booth #305

www.bloomy.com

Page 48: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

49 ni.com

Questions?

• Please visit Expo Booth #305

• Check out the new: www.bloomy.com

• Email: [email protected]

Expo Booth #305 www.bloomy.com

Page 49: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

50 ni.com

Page 50: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

51 ni.com

Sketches...

Expo Booth #305 www.bloomy.com

• Help everybody understand the “big picture” of what is being built

• Create shared vision of what you’re building within the development team

• Provide a point of focus for those technical conversations about how new features

should be implemented

• Provide a map that can be used by software developers to navigate the source

code

• Help people understand how what they are building fits into the “bigger picture”

• Help you to explain what you’re building to people outside of the development

team (e.g. operations and support staff, non-technical stakeholders, etc)

• Fast-track the on-boarding of new software developers to the team

Page 51: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

52 ni.com

What UML Diagrams do you Use?

• Class Diagrams • The top part contains the name of the class

• The middle part contains the attributes of the class

• The bottom part gives the methods or operations the class can take or undertake

Expo Booth #305 www.bloomy.com

• Relationships • Association

• Composition

• Aggregation

• Inheritance

Page 52: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

53 ni.com

What UML Diagrams do you Use?

• Sequence Diagram • Messages, written with

horizontal arrows with the message name written above them, display interaction.

• Solid arrow heads represent synchronous calls

• Open arrow heads represent asynchronous messages

• Dashed lines represent reply messages

Expo Booth #305 www.bloomy.com

Page 53: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

54 ni.com

What UML Diagrams do you Use?

• State Machine Diagram • Filled circle, pointing to the initial

state

• Hollow circle containing a smaller filled circle, indicating the final state (if any)

• Rounded rectangle, denoting a state. Top of the rectangle contains a name of the state. Can contain a horizontal line in the middle, below which the activities that are done in that state are indicated

• Arrow, denoting transition. The name of the event (if any) causing this transition labels the arrow body.

Expo Booth #305 www.bloomy.com

Page 54: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

55 ni.com

What UML Diagrams do you Use?

• Activity Diagram • Rounded rectangles represent actions

• Diamonds represent decisions

• Bars represent the start (split) or end (join) of concurrent activities

• A black circle represents the start (initial state) of the workflow

• An encircled black circle represents the end (final state)

Expo Booth #305 www.bloomy.com

Page 55: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

56 ni.com

State vs. Activity

Expo Booth #305 www.bloomy.com

State Machine Diagram Activity Diagram

Page 56: ni - Bloomy · 2019. 12. 16. · ni.com 23 LowUML Expo Booth #305 • Many stakeholders do not have an understanding of UML, and this makes UML a difficult tool to use at higher levels

57 ni.com

Goop Development Suite

Expo Booth #305 www.bloomy.com