35
Agile Software Design Urs Enzler – bbv Software Services AG

Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

Agile Software Design Urs Enzler – bbv Software Services AG

Page 2: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Page 3: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Welcome Change

Small Increments

Always Running

Page 4: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

keep change local

Page 5: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Make change local

Keep change local

What you gain

Page 6: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Make Change Local

Page 7: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

DRY – don’t repeat yourself change in a single place

Page 8: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

public void DoMagic() { this.dependency.DelegateMagic( “magic”, 42) if (42 == i) { // … } }

Page 9: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

if (instance.Attribute) { } else { } switch (instance.Attribute) { case … }

Page 10: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Web

Application

Windows

Application

Server

Address Address

Address

Page 11: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Single Responsibility Give everything only one reason to change

A

B C

D

Page 12: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Modules – make boundaries explicit separate physically and temporally

Page 13: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler
Page 14: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Inversion of control manage construction, lifetime, configuration

Page 15: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Loose Coupling – High Cohesion manage needed knowledge

Page 16: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Problem! Visualize

Problem

too! Log

Broker

Publisher Subscriber

Page 17: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Separate Cross-Cutting Concerns

Page 18: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

public void DoMagic() { logger.Info(“starting magic!”); // … logger.Trace(“were’re here.”); // … logger.Debug(“magic achieved”); }

Page 19: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

public void DoMagic() { logger.LogStartOfMagic(); } public static class LogExtensions { public static void LogStartOfMagic( this Ilogger logger) { logger.Info(“starting magic”) } }

Page 20: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Namespaces Arrange Code per Feature

Page 21: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Façade

Communication

Logic

UI

Business Logic

Data Access

Client

Server

Feature

Page 22: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Namespace per Feature

• MyCompany • MyProject

• Feature1 • Feature2

• Grouping1 • Grouping2

• Feature3 • Feature4

• Grouping1 • DetailStuff

• Grouping2

Page 23: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

Keep Change Local

Page 24: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Unit Tests class boundary

Page 25: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Page 26: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Acceptance Tests feature boundary

Page 27: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Page 28: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

𝒃𝒊𝒈 𝒔𝒚𝒔𝒕𝒆𝒎 = 𝒔𝒎𝒂𝒍𝒍 𝒔𝒚𝒔𝒕𝒆𝒎

Page 29: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Page 30: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

What You Gain

Page 31: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

evolving architecture

Page 32: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

always validated by

working code

Page 33: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

ask you this:

Page 34: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

how easily can it

be removed

Page 35: Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate physically and temporally . ... user group: . Title: Bootcamp Schruns Author: Urs Enzler

www.bbv.ch

Urs Enzler [email protected]

OSS lead: Appccelerate

blog: www.planetgeek.ch

www.bbv.ch/blog

twitter: @ursenzler

user group: www.dotnet-zentral.ch