effective architecting: best practices for software architects
TRANSCRIPT
Effective ArchitectingBest Practices & Guidelines for Software Architects
Case Study: Patterns and Styles in Compilers
Overarching StyleLexical Analyzer
Parser (Syntax & Semantic Analysis)
Optimizer
Code generator
Pipe-and-filter style
Compiler DriverFacade pattern
Representing grammarInterpreter
pattern
Generating code
Source: “Design Patterns: Elements of Reusable Object-Oriented Software”, Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, Addison-Wesley,1994
Visitor pattern
source: https://github.com/cer/event-sourcing-examples/wiki/i/applicationarchitecture.png
Apply relevant patterns and styles for effective architecting
“Cities grow, cities evolve, cities have parts that simply die while other
parts flourish; each city has to be renewed in order to meet the needs of its populace… Software-intensive systems
are like that. They grow, they evolve, sometimes they wither away, and
sometimes they flourish…”
Grady Booch in the foreword for “Refactoring for Software Design Smells: Managing Technical Debt”, Girish Suryanarayana, Ganesh Samarthyam, Tushar Sharma, Morgan Kaufmann/Elsevier, 2014.
CodeCity tool
Code Query Language (NDepend, Architect, …)
Look at the world differently for creative design solutions
Who coined the term “code
smell”?
Hint: He also originated the
terms TDD and XP
Kent Beck
Who coined the acronym “SOLID”?
(as in SOLID principles)
Hint: He is the author of the book
“Working effectively with legacy code”
Michael Feathers
S Single Responsibility Principle
Every object should have a single responsibility and that should be encapsulated by the class
O Open Closed Principle Software should be open for extension, but closed for modification
L Liskov’s Substitution Principle
Any subclass should always be usable instead of its parent class
I Interface Segregation Principle
Many client specific interfaces are better than one general purpose interface
D Dependency Inversion Principle
Abstractions should not depend upon details. Details should depend upon abstractions
Who coined the term “technical
debt”?
Hint: He is the creator of “wiki”
Ward Cunningham
When,duetoconstraints,Idesignquicklyanddirty,myprojectisloadedwithtechnicaldebt
NumberofAccessedVariables
CyclomaticComplexity
NewlyAddedService
PercentageofNewlyAddedService
Infusionwww.intooitus.com/products/infusion
Violates Single Responsibility
Principle (SRP)
PublishedinJournalofObjectTechnology(Vol.12,No.2,2013) SGGanesh,TusharSharma,GirishSuryanarayana.TowardsaPrinciple-basedClassifica4onofStructuralDesignSmells.InJournalofObjectTechnology,vol.12,no.2,2013,pages1:1–29.doi:10.5381/jot.2013.12.2.a1 URL:hLp://www.jot.fm/issues/issue_2013_06/arPcle1.pdf(openaccess)
"This is a good book about ‘Design Smells’ – actually a great book – nicely organized - clearly written with
plenty of examples and a fair sprinkling of anecdotes."
- Will Tracz (Principal Research Scientist & Fellow, Lockheed Martin)
(review in ACM SIGSOFT Software Engineering Notes)
Believe in your ideas: how small or “insignificant” it may
appear to be!
Steve Jobs is viewed as an excellent speaker, business person, and leader. But
not much as an architect. He is an excellent architect.
Why?
In the movie Steve Jobs, he gives an example of a music composer. The composer directs the
people and focuses on the orchestra.
That is the case with a software architect as well.
As an architect, be a problem solver & technology leader
What is the key to grow big and succeed?
Other organizations
Your organization
Gradually expand your circle of influence
Your departmentYour team
The world
Some ways to expand your
circle of influence
Give talks (conference, workshop…)
Write articles, books, white papers, …
Organize meet-ups,
training programs, …
Contribute to process,
quality, and cost-saving
initiatives
Meetups• Software Architecture:
http://www.meetup.com/SoftwareArchitectsBangalore/
• Container Developers: http://www.meetup.com/Container-Developers-Meetup-Bangalore/
• Software Craftsmanship: http://www.meetup.com/Software-Craftsmanship-Bangalore-Meetup/
• Core Java: http://www.meetup.com/Core-Java-Meetup-Bangalore/
• Technical Writers: http://www.meetup.com/Technical-Writers-Meetup-Bangalore/
• JavaScript: http://www.meetup.com/JavaScript-Meetup-Bangalore/
Influence is leadership - expand your influence!
Register here: https://www.townscript.com/e/designpattern
SOLID Principles and Design Patterns BootcampLocation: Bangalore
11 JUN 2016: 10:00AM - 6:00 PM
email [email protected]
website www.designsmells.com
twitter @GSamarthyam
linkedin bit.ly/sgganesh
slideshare slideshare.net/sgganesh