Software Architecture and Software Architect T-Systems RUS. JavaSchool

1.

Software Architecture and Software Architect
T-Systems RUS. JavaSchool
Saint-Petersburg, July’15
Sergey N Lukin

2.

Intro
0
Introduction
1
Questions
2
Terms
3
Simplification
–Internal –
07.09.2020
2

3.

Agenda
Content
0
Intro
1
Basic design principles
2
Design example
3
Multilayered architecture
4
Architect role in PLC
–Internal –
07.09.2020
3

4.

Why we need Architects?
I know Java and SQL, why I
need Architect for our
product?
–Internal –
07.09.2020
4

5.

Why we need Architects? Short Answer.
I know Java and SQL,
why I need Architect for
our product?
Because your product
has Architecture.
–Internal –
07.09.2020
5

6.

Different architectures
–Internal –
07.09.2020
6

7.

Outer Function requirements
outer functional
requirements
System Architecture
–Internal –
07.09.2020
7

8.

Outer quality attributes
outer quality attributes
outer functional
requirements
System Architecture
–Internal –
07.09.2020
8

9.

Our internal functional requirements
outer quality attributes
outer functional
requirements
inner functional
requirements
System Architecture
–Internal –
07.09.2020
9

10.

Our internal quality requirements
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
System Architecture
–Internal –
07.09.2020
10

11.

Design Guidlines
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
System Architecture
design guidelines &
code style
–Internal –
07.09.2020
11

12.

Resources
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
System Architecture
design guidelines &
code style
resources
–Internal –
07.09.2020
12

13.

Personal pain experience
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
System Architecture
design guidelines &
code style
resources
personal pain
experience
–Internal –
07.09.2020
13

14.

Development team
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
System Architecture
design guidelines &
code style
resources
trust to team
personal pain
experience
–Internal –
07.09.2020
14

15.

Company restriction
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
System Architecture
design guidelines &
code style
company restriction
resources
trust to team
personal pain
experience
–Internal –
07.09.2020
15

16.

Architecture depends on
outer quality attributes
outer functional
requirements
inner functional
requirements
inner quality attributes
team & company
structure
System Architecture
design guidelines &
code style
company restriction
resources
trust to team
personal pain
experience
–Internal –
07.09.2020
16

17.

Architecture depends on
outer quality attributes
outer functional
requirements
inner functional
requirements
integration landscape
inner quality attributes
team & company
structure
System Architecture
design guidelines &
code style
company restriction
resources
trust to team
personal pain
experience
–Internal –
07.09.2020
17

18.

But outer requirement is more important
outer quality attributes
outer functional
requirements
inner functional
requirements
integration landscape
inner quality attributes
team & company
structure
System Architecture
design guidelines &
code style
company restriction
resources
trust to team
personal pain
experience
–Internal –
07.09.2020
18

19.

What means good architecture?
Quality attributes
Meet requirements
Ready for change
Ready for scaling and distribution
Minimize cost
Other NFR
–Internal –
07.09.2020
19

20.

ISO 9126 Software quality
Quality attributes
Functionality
Reliability
Usability
Efficiency
Maintainability
Portability
–Internal –
07.09.2020
20

21.

Key architecture principles and practice
Principles
Separation of concerns.
Single Responsibility principle.
Principle of Least Knowledge.
Don’t repeat yourself (DRY).
–Internal –
07.09.2020
21

22.

Key architecture principles and practices
Common design practices
Prefer composition to inheritance
Separate the areas of concern between layers
Be explicit about how layers communicate with each other.
Define a clear contract for components.
Keep design patterns consistent within each layer
Do not mix different types of components in the same logical layer.
Keep the data format consistent within a layer or component
A component /object should not rely on internal details of other components/objects.
Do not overload the functionality of a component.
Keep crosscutting code abstracted from the application business logic as far as possible
Establish a coding style and naming convention for development.
Maintain system quality using automated QA techniques during development.
Consider the operation of your application.
–Internal –
07.09.2020
22

23.

Key architecture principles and practices
Common design practices
Prefer composition to inheritance
Separate the areas of concern between layers
Be explicit about how layers communicate with each other.
Define a clear contract for components.
Keep design patterns consistent within each layer
Do not mix different types of components in the same logical layer.
Keep the data format consistent within a layer or component
A component /object should not rely on internal details of other components/objects.
Do not overload the functionality of a component.
Keep crosscutting code abstracted from the application business logic as far as possible
Establish a coding style and naming convention for development.
Maintain system quality using automated QA techniques during development.
Consider the operation of your application.
–Internal –
07.09.2020
23

24.

Design example

25.

Design Example: Simple Enterprise Search (SES)
Description:
SES is software of search information within an enterprise data.
Requirements (plain style):
Users from our company should be able to search across office
document. Initially documents can be stored on external storages
(ftp, corporative web server, windows shared folder). Also it should
be possible to upload document directly to system. Only managers
and dedicated persons should be able to search across finance
documentation. All our user have browser Chrome on their PCs.
–Internal –
07.09.2020
25

26.

Trying to rewrite requirements
UR01. Users should be able to search accross documents.
UR02. Users can have different access right.
UR03. Document types: Word, XLS.
UR04. Web inteface should work in Chrome.
UR05. System should be able to get document via:
1. FTP
2. SAMBA
3. HTTP
UR 06. Special users can upload document directly to System
–Internal –
07.09.2020
26

27.

Trying to rewrite requirements
UR01. Users should be able to search
accross documents.
UR03. Document types: Word, XLS.
UR05: System shoud be able get
documents from varios sources
depend
UR02. Users can have different access
right.
UR 04. Web inteface should work in
Chrome.
UR05.1 Support FTP
UR05.2 SAMBA
depend
UR05.3 Support HTTP
UR06. Special users can upload
document directly to System
–Internal –
07.09.2020
27

28.

Looking for Actors
User
Manager
Special user
–Internal –
07.09.2020
28

29.

Actors generalization
User
Roles
Manager
Regular User
Administrator
–Internal –
07.09.2020
29

30.

UseCase analyzes
Upload document
Search document
Administrator
User
Reciev e document
Define document
libraries
–Internal –
07.09.2020
30

31.

UseCase analyzes. Traceability
Reciev e document
UR03. Document types:
Word, XLS.
UR01. Users should be able
to search accross documents.
UR02. Users can have
different access right.
Search document
UR04. Web inteface should
work in Chrome.
UR05: System shoud be able
get documents from varios
sources
UR06. Special users can
upload document directly to
System
Define document
libraries
Upload document
–Internal –
07.09.2020
31

32.

UseCase analyzes. Traceability
Authorisation
UR02. Users can have
different access right.
User Management
–Internal –
07.09.2020
32

33.

UseCase analyzes. Finally
Authorisation
Upload document
Define document
libraries
Search document
User
Administrator
Reciev e document
User Management
–Internal –
07.09.2020
33

34.

Activity
ActivityInitial
Type Search term
Search document
Reciv e list of related docs
Is any relevant document?
yes
no
Choose doc
Reciev e document
Get document
ActivityFinal
–Internal –
07.09.2020
34

35.

System analyses
Ingest into system
«flow»
«information»
External Document
Parse document
Index document and
store index
«flow»
«information»
Internal document
«flow»
«information»
Plain document
«datastructu...
Index
–Internal –
07.09.2020
35

36.

System UseCases
Ingest document
Parse document
Access control
Index
System
Prov ide UI
Searching in index
Retriv e searched
document
–Internal –
07.09.2020
36

37.

System Functional decomposition
UI
Searching functionality
Searching in index
Index
Prov ide UI
include
include
include
Integration functionality
System
(from
Actors)
Parse document
include
Access control
Retriv e searched
document
Access control
Ingest document
–Internal –
07.09.2020
37

38.

System Components: A-architecture
UI
Access control
implement
Searching functionality
implement
implement
Integration functionality
implement
implement
«abstract»
Web UI
«abstract»
Search Engine
«abstract»
Parser
«abstract»
Extractor
«use»
«abstract»
Datastorage
«use»
«use»
–Internal –
07.09.2020
38

39.

System Components
«abstract»
Web UI
«abstract»
Parser
JSF UI
Homemade parser
«abstract»
Search Engine
«abstract»
Extractor
Lucene search
engine
HomeMade
extractor
«use»
«use»
«abstract»
Datastorage
Apache POI
«datastorage»
User & Session
storage
«datastorage»
Meta-document
Oracle Scheme
Apache Jakarta
Commons Net
«datastorage»
document storage
FileSystem
«datastorage»
Index storage
Lucene Index
Storage
–Internal –
07.09.2020
39

40.

Application Components + Technical components
Functional components
Technical
+ HomeMade extractor
+ Logging
+ Homemade parser
+ JSF UI
+ Lucene search engine
«use»
+ Monitoring
+ ORM
–Internal –
07.09.2020
40

41.

Detailed Activity Diagram
User
Web UI
Search engine
Extractor
ORM/DB
ActivityInitial
Type Search term
Send search term to engine
SearchTerm
searching in Index
get MetaDocument
SearchResult
Choose doc
Display Search Result
get MetaDocument
GetInfo about Doc
RequestDocument
DocID
DocID
metaDocument
get Document
extract document from
library
Prov ide document to user
document
document
document
metaDocument
ActivityFinal
–Internal –
07.09.2020
41

42.

Entity Classes
«binary»
document
metaDocument
searchResult
0
1
* -
docID :int
title :string
location :string
author :string
searchTerm
1
-
query :string
–Internal –
07.09.2020
42

43.

Interfaces
«abstract»
Web UI
«use»
«use»
«use»
ParsingInterface
SearchInterface
«abstract»
Search Engine
«use»
«abstract»
Parser
«abstract»
Extractor
IntexingInterface
«use»
DAL
«use»
«abstract»
Datastorage
–Internal –
07.09.2020
43

44.

Behavior classes
«abstract»
Parser
+
+
setDocument(InputStream) :void
parse() :OutputStream
WordParser
+
-
parse() :OutputStream
excludeListOfContent() :void
ExcelParser
+
-
parse() :OutputSteam
joinSheets() :void
–Internal –
07.09.2020
44

45.

Questions?
Design example
?
-Internal
07.09.2020
45

46.

Multilayer application
pattern

47.

Multilayered architecture: Why?
Benefits from the box
Abstraction
Isolation
Manageability
Performance
Reusability
Testability
–Internal –
07.09.2020
48

48.

3-tier Architecture
Presentation layer
Business Logic layer
Data Access Layer
–Internal –
07.09.2020
49

49.

3-tier Architecture: our application
UI
Access control
implement
Searching functionality
implement
implement
Integration functionality
implement
implement
«abstract»
Web UI
«abstract»
Search Engine
«abstract»
Parser
«abstract»
Extractor
«use»
«abstract»
Datastorage
«use»
«use»
–Internal –
07.09.2020
50

50.

3-tier Architecture: our application
Presentation Layer
«abstract»
Web UI
Business logic
«abstract»
Parser
«abstract»
Search Engine
«abstract»
Extractor
Data access layer
«abstract»
Datastorage
–Internal –
07.09.2020
51

51.

n-tier Architecture
Presentation layer
Service Layer
Business Logic layer
Infrastructure layer
Data Access Layer
Persistence layer
–Internal –
07.09.2020
52

52.

n-tier Architecture: JEE
Rich application or JS/Html application
JSP / JSF / Struts / Spring MVC …
Business Tier
EJB
Information Tier
JPA + Database
Client Tier
Web Tier
–Internal –
07.09.2020
53

53.

n-tier Architecture: JEE
Web Tier
JSF
index.xhtml
searchresult.xhtml
login.xhtml
ManagedBeans
Business Layer
«ejb»
SearchEngine
«ejb»
Parser
«ejb»
IndexEngine
«ejb»
Extractor
EIS layer
«jpa entity»
metaDocument
Oracle Scheme
–Internal –
07.09.2020
54

54.

Alternatives
Domain Driven Design
«service»
Indexer
+
Specific
addDocumentToIndex(): void
No strict layers
Entity and their behavior combined
«use»
document
-
title: string
author: string
+
+
updateFromLibrary(): void
parse(): void
Pro
Easy to extend domain model
Easy to test
Easy to map requirements
WordDocument
ExcelDocument
+
+
parse(): void
«binary»
Document
parse(): void
Cons
Hi- efforts/costs
–Internal –
07.09.2020
55

55.

Alternatives
Event Based
UI
Parser
«flow»
«flow»
«flow»
async UI
«flow»
Document
NewDocumentInfo
Extractor
Document
SearchQueue
SearchResult
IndexQueue
ExtractQueue
«flow» «flow»
Tokens
«flow»
SearchTerm
Tokens
«flow»«flow»
«flow»
«datastorage»
Index
IndexEngine
«use»
SearchEngine
«use»
–Internal –
07.09.2020
56

56.

Important
Please start your enterprise application from n-tiers architecture
It is clear and easy to understand
It is proven by time
Most current EA using layered architecture
JEE designed for layered architecture
You don’t have any strong NFR
–Internal –
07.09.2020
57

57.

Questions?
Multilayered architecture
-Internal
07.09.2020
58

58.

Architect Role in PLC

59.

PLC Waterfall
-Internal
07.09.2020
61

60.

PLC RUP
-Internal
07.09.2020
62

61.

PLC SE-Book Iterative development
Initiate proj ect
Accompanying
tasks
Plan proj ect
Plan Iteration
Dev elop solution design
Implement solution design
Release system internally
Prov ide and rollout release
Close proj ect
Details: http://sebook.t-systems.com/en/11116135a14c0b91.html
-Internal
07.09.2020
63

62.

PLC SE-Book Architect in PLC
Discussion: In which project steps Architect should be involved?
-Internal
07.09.2020
64

63.

PLC SE-Book Architect in PLC
Short answer – Architect or Chief Architect should be involved in almost all project steps.
Initiate proj ect
Accompanying
tasks
Plan proj ect
Plan Iteration
Dev elop solution design
Implement solution design
Release system internally
Prov ide and rollout release
Close proj ect
-Internal
07.09.2020
65

64.

PLC SE-Book Architect tasks: Plan project
Provide effort estimation
Provide technical risks list
Validate WBS and Dependencies in
Project plan
Support in Configuration
management
WBS - Work Breakdown Structure
-Internal
07.09.2020
66

65.

PLC SE-Book Architect tasks
Requirements analyses
Support requirements development
Validate and review
System Use Cases
Requirements
GUI Prototype
Interface agreement
Traceability matrix (UC vs Req)
Logical Data Model
System Use
Cases
use
result
Dev elop System Use
Case
Rev iew System Use
Cases
perform
perform
Analyst
Architect
explained below
67

66.

Example: Traceability Matrix Bonus
Rational RequisitePro
-Internal
07.09.2020
68

67.

PLC SE-Book Architect tasks
Develop solution design
Design:
Database
Components
Interfaces
Review
Test Plan / Test Specification
Provide/support:
Prototyping
Traceability (UC vs Comp)
Comp1
Comp2
Call 1() :Object
Know your onions
69

68.

PLC SE-Book Architect tasks: Implementation
Create program
Test program
Defect fixing
Ensure Code Quality
Refactoring
Align code and architecture
Yes, we can code, at least after worktime
70

69.

PLC SE-Book Architect tasks: Test
Review test strategy
Should be involved in Critical defect
analyses
We hate QA activities, but we do it.
71

70.

PLC SE-Book Architect tasks: Rollout
Prepare Transfer to Operation
Support Productive Operation
-Internal
07.09.2020
72

71.

PLC SE-Book Architect tasks: Close project
Determine and Analyze KPIs and
Derive Measures
-Internal
07.09.2020
73

72.

PLC SE-Book All activities should be documented
Comp1
System Use
Cases
Comp2
use
result
Dev elop System Use
Case
Rev iew System Use
Cases
perform
perform
Analyst
Architect
Call 1() :Object
Many many documents…
-Internal
07.09.2020
74

73.

Questions?
Architect in PLC
?
-Internal
07.09.2020
75

74.

Resume

75.

n-tier Architecture: JEE
Web Tier
JSF
index.xhtml
searchresult.xhtml
login.xhtml
ManagedBeans
Business Layer
«ejb»
SearchEngine
«ejb»
Parser
«ejb»
IndexEngine
«ejb»
Extractor
EIS layer
«jpa entity»
metaDocument
Oracle Scheme
–Internal –
07.09.2020
77

76.

Key architecture principles and practices
Common design practices
Prefer composition to inheritance
Separate the areas of concern between layers
Be explicit about how layers communicate with each other.
Keep design patterns consistent within each layer
Do not mix different types of components in the same logical layer.
Keep the data format consistent within a layer or component
A component or an object should not rely on internal details of other components or objects.
Do not overload the functionality of a component.
Keep crosscutting code abstracted from the application business logic as far as possible
Define a clear contract for components.
Establish a coding style and naming convention for development.
Maintain system quality using automated QA techniques during development.
Consider the operation of your application.
–Internal –
07.09.2020
78

77.

Thank you!

78.

References

79.

Sources
Architecture itself
Rozanski&Woods
EIP
POSA
Fowler
GOF
-Internal
07.09.2020
81

80.

Sources
Architecture practice / PLC aspects
CMMI® for Development, Version 1.3
Carr, Marvin et al, Taxonomy-Based Risk Identification, CMU/SEI-93-TR-006. Pittsburgh, Pa.:
Software Engineering Institute, Carnegie Mellon University, June 1993.
Microsoft Application Architecture Guide, 2nd Edition
-Internal
07.09.2020
82

81.

Sources
SOA / EDA
The Growing Role of Events in Enterprise Applications. Five forces. July 2003, Roy W. Schulte,
Gartner
“Event-Driven Architecture Complements SOA”, by Roy W. Schulte, Yefim V. Natis, July 2003,
by Gartner
“2.0 The Mission and Future of Integration” 2004, Gartner “Enterprise Integration Patterns:
Designing, Building, and Deploying Messaging Solutions” by Hohpe G., Woolf B., 2004
“Applied SOA: Conquering IT Complexity through Software Architecture”, by Yefim V. Natis,
May 2005, by Gartner, Inc. “Event-driven architecture” by Hohpe G., 2006
-Internal
07.09.2020
83

82.

Sources
Requirements
IEEE Recommended Practice for Software Requirements Specifications IEEE Std 830-1998
Requirements management using IBM Rational RequisitePro / Peter Zielczynski
WRITING EFFECTIVE USE CASES. Alistair Cockburn
-Internal
07.09.2020
84

83.

Alternative view on JEE and Architecture
Pure Simple Java (Антон Кекс - Как нам спасти Java?)
http://www.youtube.com/watch?v=TSAlj04_tkA
-Internal
07.09.2020
85
English     Русский Правила