Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate...
Transcript of Agile Software Design - Entwicklertag · B C D . Modules – make boundaries explicit separate...
Agile Software Design Urs Enzler – bbv Software Services AG
www.bbv.ch
www.bbv.ch
Welcome Change
Small Increments
Always Running
www.bbv.ch
keep change local
www.bbv.ch
Make change local
Keep change local
What you gain
www.bbv.ch
Make Change Local
www.bbv.ch
DRY – don’t repeat yourself change in a single place
www.bbv.ch
public void DoMagic() { this.dependency.DelegateMagic( “magic”, 42) if (42 == i) { // … } }
www.bbv.ch
if (instance.Attribute) { } else { } switch (instance.Attribute) { case … }
www.bbv.ch
Web
Application
Windows
Application
Server
Address Address
Address
www.bbv.ch
Single Responsibility Give everything only one reason to change
A
B C
D
www.bbv.ch
Modules – make boundaries explicit separate physically and temporally
www.bbv.ch
Inversion of control manage construction, lifetime, configuration
www.bbv.ch
Loose Coupling – High Cohesion manage needed knowledge
www.bbv.ch
Problem! Visualize
Problem
too! Log
Broker
Publisher Subscriber
www.bbv.ch
Separate Cross-Cutting Concerns
public void DoMagic() { logger.Info(“starting magic!”); // … logger.Trace(“were’re here.”); // … logger.Debug(“magic achieved”); }
public void DoMagic() { logger.LogStartOfMagic(); } public static class LogExtensions { public static void LogStartOfMagic( this Ilogger logger) { logger.Info(“starting magic”) } }
www.bbv.ch
Namespaces Arrange Code per Feature
www.bbv.ch
Façade
Communication
Logic
UI
Business Logic
Data Access
Client
Server
Feature
www.bbv.ch
Namespace per Feature
• MyCompany • MyProject
• Feature1 • Feature2
• Grouping1 • Grouping2
• Feature3 • Feature4
• Grouping1 • DetailStuff
• Grouping2
Keep Change Local
www.bbv.ch
Unit Tests class boundary
www.bbv.ch
www.bbv.ch
Acceptance Tests feature boundary
www.bbv.ch
www.bbv.ch
𝒃𝒊𝒈 𝒔𝒚𝒔𝒕𝒆𝒎 = 𝒔𝒎𝒂𝒍𝒍 𝒔𝒚𝒔𝒕𝒆𝒎
www.bbv.ch
What You Gain
www.bbv.ch
evolving architecture
www.bbv.ch
always validated by
working code
www.bbv.ch
ask you this:
www.bbv.ch
how easily can it
be removed
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