56
Anti-Patterns Refactoring Software, Architectures and Projects in Crisis: Part 2 Siddhesh Bhobe

Anti Patterns Siddhesh Lecture2 Of3

Embed Size (px)

DESCRIPTION

Anti Patterns - what not to do!

Citation preview

Page 1: Anti Patterns Siddhesh Lecture2 Of3

Anti-PatternsRefactoring Software, Architectures and Projects in Crisis: Part 2

Siddhesh Bhobe

Page 2: Anti Patterns Siddhesh Lecture2 Of3

Last Week Definition Motivation for AntiPatterns Software Development

AntiPatterns

Page 3: Anti Patterns Siddhesh Lecture2 Of3

In Part II… Recap Software Architecture AntiPatterns In Part III: Software Project Management

AntiPatterns

Page 4: Anti Patterns Siddhesh Lecture2 Of3

AntiPattern… Tells you what to avoid Identification of what to avoid is a

critical factor in successful software development

AntiPatterns rampant in Software Development Architecture Management Behavior

Page 5: Anti Patterns Siddhesh Lecture2 Of3

Software Development AntiPatterns Blob Lava Flow Functional

Decomposition Poltergeists Boat Anchor

Deadend Spaghetti Code Input Kludge Cut-and-Paste

Programming Golden Hammer

Page 6: Anti Patterns Siddhesh Lecture2 Of3

Software Architecture AntiPatterns

Page 7: Anti Patterns Siddhesh Lecture2 Of3

AP: StovePipe Enterprise

“Can I have my own island (of automation)?”

“We’re unique!”

Page 8: Anti Patterns Siddhesh Lecture2 Of3

Stovepipe… Used to describe software systems

with ad hoc architectures Stovepipes need lot of

maintenance Repaired with whatever is at hand;

hodgepodge of ad hoc repairs

Page 9: Anti Patterns Siddhesh Lecture2 Of3

Symptoms and Consequences Incompatible technology,

terminology and approaches within the enterprise

Inability to extend Lack of reuse and interoperability Excessive maintenance costs

Page 10: Anti Patterns Siddhesh Lecture2 Of3

Typical Causes Lack of enterprise technology strategy Lack of incentive to cooperate:

competing business areas & executives

Lack of communication Lack of knowledge of technology

standards being used Absence of horizontal interfaces

Page 11: Anti Patterns Siddhesh Lecture2 Of3

Known Exceptions Takeovers and Mergers Wrapping some systems can be a

temporary solution

Page 12: Anti Patterns Siddhesh Lecture2 Of3

Solution: Define Models Requirements

Model Open Systems

Reference Model Technology Profile Operating

Environment System

Requirements Model

Specifications Model Enterprise

Architectures Computational

Facilities Interoperability Development

Profile

Page 13: Anti Patterns Siddhesh Lecture2 Of3

Open Systems Reference Model High Level Architecture List of target standards for system

development projects

IEEE POSIX 1003.0 standard

Page 14: Anti Patterns Siddhesh Lecture2 Of3

Technology Profile Define short-term standards plan Reference model is flexible;

Technology profiles mandate standards

US-DOD Joint technical Architecture

Page 15: Anti Patterns Siddhesh Lecture2 Of3

Operating Environment Defines product releases and

installation conventions Influence adoption of

recommended environments Variations should be supported

locally at extra cost

Page 16: Anti Patterns Siddhesh Lecture2 Of3

System Requirements Profile Summary of key requirements for

a family of related systems Scopes out the system capabilities Leads to enterprise wide planning

Page 17: Anti Patterns Siddhesh Lecture2 Of3

Enterprise Architecture Set of diagrams and tables that

define a system or family of systems

Consider views of end users, developers, system operators and technical specialists

Page 18: Anti Patterns Siddhesh Lecture2 Of3

Computational Facilities Architecture Identifies key points of

interoperability APIs and data objects Defines roadmap of priorities and

schedules for the facilities

Page 19: Anti Patterns Siddhesh Lecture2 Of3

Interoperability Specification Technical details of a

computational facility APIs in IDL and common data

object definitions Created using architecture mining

Page 20: Anti Patterns Siddhesh Lecture2 Of3

Development Profile Implementation plans and

developer agreements Assure interoperability and

successful integration Specifies local extensions to APIs

and conventions

Page 21: Anti Patterns Siddhesh Lecture2 Of3

AP: Stovepipe System

“The software project is way over budget; it has slipped it’s schedule repeatedly; my users still don’t get the required features; and I can’t modify the system!”

Page 22: Anti Patterns Siddhesh Lecture2 Of3

Symptoms and Consequences Single-system analogy of StovePipe

Enterprise Large semantic gap between

architecture and implementation Requirement changes are costly to

implement Maintenance is surprisingly expensive Complies with paper requirements, but

does not meet user expectations

Page 23: Anti Patterns Siddhesh Lecture2 Of3
Page 24: Anti Patterns Siddhesh Lecture2 Of3

Typical Causes Absence of common integration

mechanism Lack of abstraction Insufficient metadata makes it

difficult to extend and configure Lack of architectural vision

Page 25: Anti Patterns Siddhesh Lecture2 Of3

Known Exceptions R&D, Prototypes and Mockups Choice to use a vendor’s product

and not reinvent the wheel can also lead to this.

Page 26: Anti Patterns Siddhesh Lecture2 Of3

Solution Component architecture providing

flexible substitution of modules Abstractions and reduces

interfaces Use of metadata Decouple clients from services

Page 27: Anti Patterns Siddhesh Lecture2 Of3
Page 28: Anti Patterns Siddhesh Lecture2 Of3

AP: Vendor Lock-In

“When I try to read the new data files into the older version of the application, it crashes my system”

“Our architecture is… What’s the name of our database again?”

Page 29: Anti Patterns Siddhesh Lecture2 Of3
Page 30: Anti Patterns Siddhesh Lecture2 Of3

Symptoms and Consequences Commercial product upgrades

drive the application software maintenance cycle

Product varies significantly from advertised open systems standard

If upgrade is missed, repurchase and reintegration is necessary

Page 31: Anti Patterns Siddhesh Lecture2 Of3

Typical Causes Product differs from standards because

there is no conformance process Product selected based on marketing,

and not on detailed technical inspection Application software not isolated from

the vendor product Product more complex than required;

results in complexity of the application

Page 32: Anti Patterns Siddhesh Lecture2 Of3

Known Exceptions When the single vendor provides

most of the required functionality

Page 33: Anti Patterns Siddhesh Lecture2 Of3

Solution Isolate application from low level

infrastructure

Page 34: Anti Patterns Siddhesh Lecture2 Of3

AP: Wolf Ticket Claims conformance to standards

that have no enforceable meaning Proprietary interfaces

Wolf Tickets: Illegal/invalid tickets to rock concerts

Page 35: Anti Patterns Siddhesh Lecture2 Of3

AP: Architecture by Implication

“We’ve done systems like this before”

“There is no risk. We know what we are doing”

Page 36: Anti Patterns Siddhesh Lecture2 Of3

Symptoms and Consequences Lack of planning and specification of

architecture for software, hardware, communications, persistence, security, systems management

Hidden risks Unacceptable levels of performance,

usability, requirements acceptance

Page 37: Anti Patterns Siddhesh Lecture2 Of3

Typical Causes No risk management Overconfidence of managers,

architects and/or developers Reliance on previous experience

which may differ in critical areas Gaps in system engineering

Page 38: Anti Patterns Siddhesh Lecture2 Of3

Known Exceptions Repeated solution, with minor

difference like installation scripts Exploratory projects

Page 39: Anti Patterns Siddhesh Lecture2 Of3

Solution Organized approach to systems

architecture definition Goal-Question Architecture

4 + 1 Model View: Rational Rose (Logical, Use-case, process, implementation and deployment views)

Page 40: Anti Patterns Siddhesh Lecture2 Of3

AP: Warm Bodies Also known as Body Shop, Mythical

Man-Month Large projects with huge teams Adding more staff to ongoing software

project does not help! (Mythical Man-Month, 1979)

Small, compact teams make more sense

Recommended: 4 people, 4 months

Page 41: Anti Patterns Siddhesh Lecture2 Of3

AP: Design by Committee

“A camel is a horse designed by a committee”

“Too many cooks spoil the broth”

Page 42: Anti Patterns Siddhesh Lecture2 Of3

Symptoms and Consequences Documentation is overly complex,

unreadable, incoherent or defective No convergence and stability Conflicting interpretations between

architects and developers Unproductive meetings and

discussions

Page 43: Anti Patterns Siddhesh Lecture2 Of3

Typical Causes No designated product architect Degenerate or ineffective software

process Attempt to make everybody happy Gold plating… features added

based on proprietary interests, for future work, and so on

Page 44: Anti Patterns Siddhesh Lecture2 Of3

Example: SQL Standard Standard in 1989: 115 pages: Full

implementation by most vendors SQL92: 580 pages: Partial adoption SQL3: object-oriented, geospatial,

temporal-logic extensions SQL3 has become a dumping

ground for advanced database features

Page 45: Anti Patterns Siddhesh Lecture2 Of3

Known Exceptions “Tiger teams”: Experts in

individual domains, together for a short duration.

Max size of committee should be 6 to 10 people

Page 46: Anti Patterns Siddhesh Lecture2 Of3

Solution Reform the meeting process

Have a clock “Why are we here?” “What outcomes do we want?” Assign roles

Types of Meetings: Divergent (idea generation), Convergent (decisions), Information Sharing

Page 47: Anti Patterns Siddhesh Lecture2 Of3

Effective Meetings Frame the question Write responses silently Toss papers into a bin Distribute and readout Reach common understanding Eliminate duplicates Prioritize Discuss

Page 48: Anti Patterns Siddhesh Lecture2 Of3

AP: Swiss Army Knife Excessively complex class

interface Designer attempts to provide for

all possible uses of the class Too many interface signatures Makes it overly complex to use

Page 49: Anti Patterns Siddhesh Lecture2 Of3

AP: Reinvent the Wheel

“Our problem is unique”

Page 50: Anti Patterns Siddhesh Lecture2 Of3

Symptoms and Consequences Closed system architectures Replication of commercial software

functions Immature and unstable products Extended development cycles Schedule and budget overruns

Page 51: Anti Patterns Siddhesh Lecture2 Of3

Typical Causes No communication or technology

transfer between projects Absence of architecture process Assumption that system will be

built from scratch

Page 52: Anti Patterns Siddhesh Lecture2 Of3

Known Exceptions Research projects When development teams are at

logistically remote sites

Page 53: Anti Patterns Siddhesh Lecture2 Of3

Solution Architecture Mining Design patterns

Page 54: Anti Patterns Siddhesh Lecture2 Of3

In Part III… Software Project Management

AntiPatterns

Page 55: Anti Patterns Siddhesh Lecture2 Of3

References AntiPatterns: William Brown,

Raphael Malveau et al (PSPL Library S-76)

http://www.antipatterns.com/thebook.htm

Similar presentation at http://www.mitre.org/support/swee/html/67_mccormick

Page 56: Anti Patterns Siddhesh Lecture2 Of3

Thank You!