Practical Performance: Understand the Performance of Your Application - Chris Bailey (IBM)

Preview:

DESCRIPTION

Presented at JAX London 2013 When you write and run Java code, the JVM makes several allocations on your behalf, but do you have an understanding of how much that is? This session provides insight into the memory usage of Java code, covering the memory overhead of putting int into an integer object and the cost of object delegation and the memory efficiency of the different collection types. It also gives you an understanding of the off-Java (native) heap memory usage of some types of Java objects, such as threads and sockets.

Citation preview

From Big Ball of Mud to Modularity

Chris ChedgeyStructure101

Jax LondonOctober 29, 2013

What you have…

• Thousands of source files

• Countless interdependencies

• Impossible to understand & control

• Works

1. Implementation

What you have…

• Folders, targets, packages, jars, …

• Helps find files

• Helps understand & control?

2. Physical organization

What you have…2. Physical organization

• Folders, targets, packages, jars, …

• Helps find files

• Helps understand & control?

• Folders, targets, packages, jars, …

• Helps find files

• Helps understand & control?

• Hopelessly tangled – NO

2. Physical organizationWhat you have…

1. Unstructured sea of classes

Big Ball of Mud

What you have…

2. Tangled physical organization

What you need…

• Low coupling

• Defines layering visibility

• Communicated

• Maps to code

• Evolves with codebase

3. Modular structure

What you need…

• Low coupling

• Defines layering visibility

• Communicated

• Maps to code

• Evolves with codebase

3. Modular structure

Conform

Align

What you need…Discover and Define

?

3. Modularity

2. Architecture

1. Structure

0. Mud

• Refactor, Align

• Interfaces, definition

• Encapsulation, levelization, cohesion

• Unstructured implementation

Encapsulation

“Mind-sizedchunk”

(Ward Cunningham)

Levelization

DependenciesLevelized

(John Lakos,Kirk Knoernschild)

Levelized

Cumulative Component

Dependency (CCD)

Levelized

“Tangles”

Coupling Composition?

Cohesion

Cohesion

Cohesion

LevelizationEncapsulation

“Structured”

DefinitionInterfaces+

We want…

Cohesion

3. Modularity

2. Architecture

1. Structure

0. Mud

• Refactor, Align

• Interfaces, definition

• Encapsulation, levelization, cohesion

• Unstructured implementation

Interfaces, Definition

Refactoring, Alignment

3. Modularity

2. Architecture

1. Structure

0. Mud

• Refactor, Align

• Interfaces, definition

• Encapsulation, levelization, cohesion

• Unstructured implementation

Thank you!@chedgeychris@structure101.com

Cost of the status quo…Miserable developers

Cost per feature increases

Unexpected impacts of change

Unreliable schedules

Test cycles increase

Reuse less

Value of your code base declines

Recommended