SlideShare una empresa de Scribd logo
1 de 46
KING TUT
ARCHITECTURE
PYRAMIDS, PATTERNS, AND TESTS
THE (AUTOMATION)
TESTING PYRAMID
Ideas from Mike Cohn’s Succeeding With Agile, graphic from http://martinfowler.com/bliki/TestPyramid.html
KING TUT
ARCHITECTURE
PYRAMIDS, PATTERNS, AND TESTS
GARY PEDRETTI
• Over 15 years in the software industry with highly cross-functional
experience – DBA, Developer, BA, Application Architect
• Currently Trainer, Coach, Consultant, Owner at Sodoto Solutions
• SODOTO = See One, Do One, Teach One
• Scrum: Development Team member, Scrum Master, Coach,
Professional Scrum Trainer for Scrum.org
• http://blog.GaryPedretti.com/
• http://www.linkedin.com/in/garypedretti
• Twitter: @GaryPedretti
• MCSD:ALM 2012
TESTING PYRAMID
Let’s talk some
details...
UI
Integration &
Service
Unit
PROPORTIONS
To achieve these
proportions and still
cover the application
adequately requires
good application
architecture and design
patterns! “Quality is
built-in from the
beginning.”
UI
1% -
5%
Integration &
Service
5% - 15%
Unit
80% - 94%
TOOLS
UI
Selenium,
Coded UI,
QTP
Integration &
Service
Fit, Fitnesse, Unit Testing
Frameworks (where the
test is not isolated,
resulting in an Integration
or Service test)
Unit
MSTest, nUnit, mbUnit, xUnit,
jUnit, DB unit tests, qUnit, Moq,
RhinoMocks, Mockito
BDD frameworks
(Cucumber,SpecFlow)
could use any of these
test types and tools to
implement their test
steps
UI
Business Logic
Database
Data Access
Layer
UI
Mocked
Business Logic
e.g., testing a
View with a mock
Controller in an
MVC pattern
Unit Test
Business Logic
Mocked Data
Access Layer
Unit Test
Mocked
Database
Data Access
Layer
Testing
Pyramid
Real unit tests that
isolate dependencies
with fakes, mocks, stubs,
dummies, etc.
Integration
Test
Business Logic
Data Access
Layer
Integration
Test
Database
Data Access
Layer
Database
Integration
Test
Mocked
Database
Data Access
Layer
Business Logic
Testing
Pyramid
These tests might be written by a unit
testing framework, or a service- or
integration-specific tool like Fit, Fitnesse,
etc.
UI
Business Logic
Database
Data Access
Layer
Testing
Pyramid
UI
Business Logic
Database
Data Access
Layer
Automated UI
Test
UI
Mocked
Business Logic
Automated UI
Test
Testing
Pyramid
e.g., testing a
View with a mock
Controller in an
MVC pattern
ON SOLID…
S
Single Responsibility
Principle
A class has one single responsibility and therefore
one reason to change.
O Open/Closed Principle Open for extensions, closed for modifications.
L Liskov Substitution Principle Subtypes must be substitutable for their base type.
I
Interface Segregation
Principle
Not one big interface for all clients, but one
interface per kind of client. No methods in interface
that client does not use. No “fat” interfaces.
D
Dependency Inversion
Principle
High-level modules should not depend on low-level
modules. Both should depend on abstractions.
Abstractions should not depend on details. Details
should depend on abstractions.
THREE PATTERNS /
ORIENTATIONS /
FRAMEWORKS
INVERSION OF CONTROL
ASPECT-ORIENTED PROGRAMMING
MV* FRAMEWORKS
INVERSION
OF
CONTROL
INVERSION OF CONTROL
INVERSION OF CONTROL
INVERSION OF CONTROL
See Fowler’s “Inversion of Control Containers and the
Dependency Injection pattern” at
http://martinfowler.com/articles/injection.html for a great
discussion on choices and tradeoffs here
Image from http://msdn.microsoft.com/en-us/library/ff921087.aspx
INVERSION OF CONTROL
Using MyApp.DataAccessLayer;
namespace MyApp.ServiceLayer
{
public class CoolService
{
public CoolThing GetCoolThing(int id)
{
CoolSQLRepository repository =
new CoolSQLRepository();
return repository.GetThing(id);
}
}
}
namespace MyApp.ServiceLayer
{
public class CoolService
{
private IRepository _MyRepository;
public CoolService(IRepository repository)
{
_MyRepository = repository;
}
public CoolThing GetCoolThing(int id)
{
return _MyRepository.GetThing(id);
}
}
public interface IRepository
{
CoolThing GetThing(int id);
}
}
High-level modules should not depend on low-level modules. Both should depend on abstractions.
Abstractions should not depend on details. Details should depend on abstractions.
INVERSION OF CONTROL
Very Nice!!
INVERSION OF CONTROL
WHY?
INVERSION OF CONTROL
SOLID Principles
• Single Responsibility Principle
• Dependency Inversion
Various -ilities, especially maintainability
Implementation Flexibility
Testability!!! Real Unit Tests at the Bottom of Your Pyramid!!
ASPECT-
ORIENTED
PROGRAMMING
ASPECT-ORIENTED
PROGRAMMING
Shared
Common
Not-A-
Layer
Bad Idea?
ASPECT-ORIENTED
PROGRAMMING
ASPECT-ORIENTED
PROGRAMMING
public class MegaDivider
{
private ILog logger;
public int Divide(int numerator, int denominator)
{
logger.DebugFormat("MegaDivider.Divide method entered at ", DateTime.UtcNow);
try
{
return numerator / denominator;
}
finally
{
logger.DebugFormat("MegaDivider.Divide method left at ", DateTime.UtcNow);
}
ASPECT-ORIENTED
PROGRAMMING
ASPECT-ORIENTED
PROGRAMMING
Very Nice!!
ASPECT-ORIENTED
PROGRAMMING
WHY?
ASPECT-ORIENTED
PROGRAMMING
SOLID Principles
• Single Responsibility Principle
Various -ilities, especially maintainability
Domain Driven Design (DDD) ideas (a/k/a “Real” Object-
Orientation)
• Readability
Testability!!! Real Unit Tests at the Bottom of Your Pyramid!!
MV*
PATTERNS
MVC, MVP, MVVM
MV* PATTERNS
Images from http://www.codeproject.com/Articles/42830/Model-View-Controller-Model-View-Presenter-and-Mod
MV* PATTERNS
Very Nice!!
MV* PATTERNS
WHY?
MV* PATTERNS
SOLID Principles…various -ilities, especially maintainability
• Single Responsibility Principle
In-Line With Various Modern Frameworks and Tools
Testability!!! For the Pyramid:
• Model: Unit Testable
• Controllers/Presenters/View Models: Unit Testable
• View: Very Thin (IF YOU FOLLOW THE INTENDED
PRINCIPLES), Allows You To Keep the Top of Your Pyramid
Small
BRINGING IT
ALL
TOGETHER
TESTING PYRAMID =
GOOD DESIGN
Now you have good ideas about the WHYs of
• Inversion of Control (IoC)
• Aspect-Oriented Programming (AOP)
• MVx (MVC, MVP, MVVM)
TESTING PYRAMID =
GOOD DESIGN
• The WHYs for All 3 of These Are In Direct Support of the
Testing Pyramid
• The WHYs for All 3 of These Are In Direct Support of Good
Application Architecture and Design
TESTING PYRAMID =
GOOD DESIGN
• The Testing Pyramid = Good Application Architecture and
Design
• The Testing Pyramid != Testing ??
• The Testing Pyramid = Application Architecture and
Design Statement !!
TESTING PYRAMID =
GOOD DESIGN
• What Happens When You DON’T Use These Patterns?
WHAT ABOUT…
Are we only doing this for testing? Where’s the value?
THE BAR IS HIGH
THANK
YOU!

Más contenido relacionado

La actualidad más candente

Chrome release cycle
Chrome release cycleChrome release cycle
Chrome release cycleJolicloud
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureMarcin Grzejszczak
 
What is Agile Testing?
What is Agile Testing?What is Agile Testing?
What is Agile Testing?vodQA
 
Ui5con virtual tour_around_a_company_site_with_ui5
Ui5con virtual tour_around_a_company_site_with_ui5Ui5con virtual tour_around_a_company_site_with_ui5
Ui5con virtual tour_around_a_company_site_with_ui5Helmut Tammen
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberKnoldus Inc.
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftAspire Systems
 
Domain-driven design
Domain-driven designDomain-driven design
Domain-driven designKnoldus Inc.
 
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...Edureka!
 
Consumer Driven Contracts To Enable API Evolution @Geecon
Consumer Driven Contracts To Enable API Evolution @GeeconConsumer Driven Contracts To Enable API Evolution @Geecon
Consumer Driven Contracts To Enable API Evolution @GeeconMarcin Grzejszczak
 
Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014nyolles
 
Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana GulatiXP Conference India
 
Platform App Deployment : Structure and Opinions
Platform App Deployment : Structure and OpinionsPlatform App Deployment : Structure and Opinions
Platform App Deployment : Structure and OpinionsAndrew Ripka
 
Fastlane on Android 介紹
Fastlane on Android 介紹Fastlane on Android 介紹
Fastlane on Android 介紹Kros Huang
 

La actualidad más candente (19)

Xp conf-tbd
Xp conf-tbdXp conf-tbd
Xp conf-tbd
 
Chrome release cycle
Chrome release cycleChrome release cycle
Chrome release cycle
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice Architecture
 
What is Agile Testing?
What is Agile Testing?What is Agile Testing?
What is Agile Testing?
 
Ui5con virtual tour_around_a_company_site_with_ui5
Ui5con virtual tour_around_a_company_site_with_ui5Ui5con virtual tour_around_a_company_site_with_ui5
Ui5con virtual tour_around_a_company_site_with_ui5
 
Lean Quality & Engineering
Lean Quality & EngineeringLean Quality & Engineering
Lean Quality & Engineering
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+Cucumber
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shift
 
ContinuousIntegration
ContinuousIntegrationContinuousIntegration
ContinuousIntegration
 
Domain-driven design
Domain-driven designDomain-driven design
Domain-driven design
 
MVC 3.0 KU Day 1 v 1.1
MVC 3.0 KU Day 1 v 1.1MVC 3.0 KU Day 1 v 1.1
MVC 3.0 KU Day 1 v 1.1
 
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
 
Angular Js
Angular JsAngular Js
Angular Js
 
Consumer Driven Contracts To Enable API Evolution @Geecon
Consumer Driven Contracts To Enable API Evolution @GeeconConsumer Driven Contracts To Enable API Evolution @Geecon
Consumer Driven Contracts To Enable API Evolution @Geecon
 
Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014
 
.NET Career Direction
.NET Career Direction.NET Career Direction
.NET Career Direction
 
Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana Gulati
 
Platform App Deployment : Structure and Opinions
Platform App Deployment : Structure and OpinionsPlatform App Deployment : Structure and Opinions
Platform App Deployment : Structure and Opinions
 
Fastlane on Android 介紹
Fastlane on Android 介紹Fastlane on Android 介紹
Fastlane on Android 介紹
 

Destacado

InterSystems test automation
InterSystems test automationInterSystems test automation
InterSystems test automationMassTLC
 
Tis better to be effective than efficient
Tis better to be effective than efficientTis better to be effective than efficient
Tis better to be effective than efficientKent McDonald
 
Implementing DDD Concepts in PHP
Implementing DDD Concepts in PHPImplementing DDD Concepts in PHP
Implementing DDD Concepts in PHPSteve Rhoades
 
How I Learnt to Stop Worrying and Love my Agile Team
How I Learnt to Stop Worrying and Love my Agile TeamHow I Learnt to Stop Worrying and Love my Agile Team
How I Learnt to Stop Worrying and Love my Agile TeamDipesh Pala
 

Destacado (6)

Testing
TestingTesting
Testing
 
InterSystems test automation
InterSystems test automationInterSystems test automation
InterSystems test automation
 
Tis better to be effective than efficient
Tis better to be effective than efficientTis better to be effective than efficient
Tis better to be effective than efficient
 
Implementing DDD Concepts in PHP
Implementing DDD Concepts in PHPImplementing DDD Concepts in PHP
Implementing DDD Concepts in PHP
 
How I Learnt to Stop Worrying and Love my Agile Team
How I Learnt to Stop Worrying and Love my Agile TeamHow I Learnt to Stop Worrying and Love my Agile Team
How I Learnt to Stop Worrying and Love my Agile Team
 
SlideShare 101
SlideShare 101SlideShare 101
SlideShare 101
 

Similar a King Tut Architecture

Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
Structuring a Client-Side App
Structuring a Client-Side AppStructuring a Client-Side App
Structuring a Client-Side AppEirik Bakke
 
Refactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test AutomationRefactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test AutomationStephen Fuqua
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Enterprise Node - Code Quality
Enterprise Node - Code QualityEnterprise Node - Code Quality
Enterprise Node - Code QualityKurtis Kemple
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing SoftwareSteven Smith
 
Entity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and BeyondEntity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and BeyondSteve Westgarth
 
ColdBox Hierarchical MVC - Transform Your Monolith
ColdBox Hierarchical MVC - Transform Your MonolithColdBox Hierarchical MVC - Transform Your Monolith
ColdBox Hierarchical MVC - Transform Your MonolithOrtus Solutions, Corp
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
 
Sterling Order Management System on PureApplication
Sterling Order Management System on PureApplicationSterling Order Management System on PureApplication
Sterling Order Management System on PureApplicationJohn Hawkins
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
 
How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...
How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...
How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...Brittany Ingram
 
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Jorge Hidalgo
 
Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...
Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...
Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...Davalen LLC
 

Similar a King Tut Architecture (20)

Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Structuring a Client-Side App
Structuring a Client-Side AppStructuring a Client-Side App
Structuring a Client-Side App
 
Refactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test AutomationRefactoring Legacy Web Forms for Test Automation
Refactoring Legacy Web Forms for Test Automation
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Enterprise Node - Code Quality
Enterprise Node - Code QualityEnterprise Node - Code Quality
Enterprise Node - Code Quality
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing Software
 
Entity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and BeyondEntity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and Beyond
 
Software models
Software modelsSoftware models
Software models
 
ColdBox Hierarchical MVC - Transform Your Monolith
ColdBox Hierarchical MVC - Transform Your MonolithColdBox Hierarchical MVC - Transform Your Monolith
ColdBox Hierarchical MVC - Transform Your Monolith
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Veeru sdlc ppt
Veeru sdlc pptVeeru sdlc ppt
Veeru sdlc ppt
 
Sterling Order Management System on PureApplication
Sterling Order Management System on PureApplicationSterling Order Management System on PureApplication
Sterling Order Management System on PureApplication
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...
How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...
How Docker Accelerates Continuous Development at Codefresh: Containers #101 M...
 
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
 
Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...
Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...
Where Does IBM Web Experience Factory Fit in your Architecture? TECH-D22 from...
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 

Más de Gary Pedretti

Territories, Not Hierarchies
Territories, Not HierarchiesTerritories, Not Hierarchies
Territories, Not HierarchiesGary Pedretti
 
Agile Architecture: Ideals, History, and a New Hope
Agile Architecture: Ideals, History, and a New HopeAgile Architecture: Ideals, History, and a New Hope
Agile Architecture: Ideals, History, and a New HopeGary Pedretti
 
Agile Architecture and Modeling - Where are we Today
Agile Architecture and Modeling - Where are we TodayAgile Architecture and Modeling - Where are we Today
Agile Architecture and Modeling - Where are we TodayGary Pedretti
 
This IS Agile Development
This IS Agile DevelopmentThis IS Agile Development
This IS Agile DevelopmentGary Pedretti
 
Holistic Product Development
Holistic Product DevelopmentHolistic Product Development
Holistic Product DevelopmentGary Pedretti
 
TFS 2012 + VS 2012 = Agile Goodness???
TFS 2012 + VS 2012 = Agile Goodness???TFS 2012 + VS 2012 = Agile Goodness???
TFS 2012 + VS 2012 = Agile Goodness???Gary Pedretti
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Agile Modeling using the Architecture Tools in VS 2010
Agile Modeling  using the Architecture Tools in VS 2010Agile Modeling  using the Architecture Tools in VS 2010
Agile Modeling using the Architecture Tools in VS 2010Gary Pedretti
 

Más de Gary Pedretti (9)

Territories, Not Hierarchies
Territories, Not HierarchiesTerritories, Not Hierarchies
Territories, Not Hierarchies
 
Agile Architecture: Ideals, History, and a New Hope
Agile Architecture: Ideals, History, and a New HopeAgile Architecture: Ideals, History, and a New Hope
Agile Architecture: Ideals, History, and a New Hope
 
Agile Architecture and Modeling - Where are we Today
Agile Architecture and Modeling - Where are we TodayAgile Architecture and Modeling - Where are we Today
Agile Architecture and Modeling - Where are we Today
 
This IS Agile Development
This IS Agile DevelopmentThis IS Agile Development
This IS Agile Development
 
Holistic Product Development
Holistic Product DevelopmentHolistic Product Development
Holistic Product Development
 
TFS 2012 + VS 2012 = Agile Goodness???
TFS 2012 + VS 2012 = Agile Goodness???TFS 2012 + VS 2012 = Agile Goodness???
TFS 2012 + VS 2012 = Agile Goodness???
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
T4 presentation
T4 presentationT4 presentation
T4 presentation
 
Agile Modeling using the Architecture Tools in VS 2010
Agile Modeling  using the Architecture Tools in VS 2010Agile Modeling  using the Architecture Tools in VS 2010
Agile Modeling using the Architecture Tools in VS 2010
 

Último

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

King Tut Architecture

Notas del editor

  1. There's a pyramid in Giza, Egypt.  It's been there for about 4,500 years now. It's the oldest of the original 7 wonders of the world, and the ONLY one still standing.  It was the tallest man made structure in the world for over 3,800 years.  It is the epitome of architectural integrity and longevity - it's lasted for so long because of the very nature of a pyramid - low center of gravity, things are only added to a base which is more solid than what you're adding, etc.
  2. There's another pyramid, from Mike Cohn, introduced in his 2009 book Succeeding With Agile.  It's the Test Automation Pyramid, and it explains a suggested approach to test automation that maximizes Return on Investment, by encouraging the concentration of your testing efforts primarily in the Unit testing area, with some effort in Service layer/integration tests, and the minimal effort in the fragile area of UI testing.  Although it's ostensibly about test automation, I would like to propose that Cohn's pyramid has more value as an architectural or design statement, much like the Great Pyramid of Giza, and it can lend the same sort of integrity and longevity to our applications that is exhibited by the Great Pyramid.  As the *Test Automation* Pyramid it has great value, but we're leaving all kinds of value on the table by viewing it as only that.  In fact, we need to think about it as an architecture and design statement early and continuously, or we won't even be able to use it for Test Automation.
  3. What do I mean?  In order to get full coverage of an application from tests broken out in the ratios described by the Test Automation Pyramid, we must have an app that is continuously designed and refactored a certain way.  It doesn't happen by accident. “Quality is built-in from the beginning” “Quality is job #1” and 42,000 other clichés…
  4. I'd like to talk about 3 patterns or orientations that allow us to design for the Testing Pyramid.  They have all been very popular patterns for some time now, but I'd like to go beyond the buzzword trafficking and just doing "what the cool kids do" to explain the "whys" behind using these patterns.  The patterns I'd like to talk about are Inversion of Control, Aspect Oriented Programming, and Model View Controller.
  5. The typical layered application looks like this In the past we'd have hard dependencies flowing downwards.  IoC via Dependency Injection or the Service Locator pattern, together with a mocking framework, allows us to isolate each individual layer to be completely unit testable.
  6. The typical layered application looks like this In the past we'd have hard dependencies flowing downwards.  IoC via Dependency Injection or the Service Locator pattern, together with a mocking framework, allows us to isolate each individual layer to be completely unit testable.
  7. Inversion of Control is a concept. There are at least two patterns you can use to achieve Inversion of Control: Dependency Injection (constructor or property) or the sometimes-forgotten Service Locator.
  8. In the past we'd also have a silo for cross-cutting concerns.  This often included components for things needed by any layer, such as logging.  But the application layers took hard dependencies on this silo to the side, not just from component references but even worse, through ugly, repetitive, boilerplate code riddled throughout every method of every class of every component.  
  9. AOP allows us to isolate the silo, and only plug it in dynamically at runtime, such as before and after the execution of an object's methods.  This makes something like the logging component completely testable in isolation, but more importantly, leaves the application layers much cleaner, allowing for real unit tests, not there, not integration tests. From : Aspect: A modularization of a concern that cuts across multiple objects. Transaction management is a good example of a crosscutting concern in J2EE applications. In Spring AOP, aspects are implemented using regular classes (the schema-based approach) or regular classes annotated with the @Aspect annotation (@AspectJ style). Join point: A point during the execution of a program, such as the execution of a method or the handling of an exception. In Spring AOP, a join point always represents a method execution. Join point information is available in advice bodies by declaring a parameter of type org.aspectj.lang.JoinPoint. Advice: Action taken by an aspect at a particular join point. Different types of advice include "around," "before" and "after" advice. Advice types are discussed below. Many AOP frameworks, including Spring, model an advice as an interceptor, maintaining a chain of interceptors "around" the join point. Pointcut: A predicate that matches join points. Advice is associated with a pointcut expression and runs at any join point matched by the pointcut (for example, the execution of a method with a certain name). The concept of join points as matched by pointcut expressions is central to AOP: Spring uses the AspectJ pointcut language by default. Introduction: (Also known as an inter-type declaration). Declaring additional methods or fields on behalf of a type. Spring AOP allows you to introduce new interfaces (and a corresponding implementation) to any proxied object. For example, you could use an introduction to make a bean implement an IsModified interface, to simplify caching. Target object: Object being advised by one or more aspects. Also referred to as the advised object. Since Spring AOP is implemented using runtime proxies, this object will always be a proxied object. AOP proxy: An object created by the AOP framework in order to implement the aspect contracts (advise method executions and so on). In the Spring Framework, an AOP proxy will be a JDK dynamic proxy or a CGLIB proxy. Proxy creation is transparent to users of the schema-based and @AspectJ styles of aspect declaration introduced in Spring 2.0. Weaving: Linking aspects with other application types or objects to create an advised object. This can be done at compile time (using the AspectJ compiler, for example), load time, or at runtime. Spring AOP, like other pure Java AOP frameworks, performs weaving at runtime. Types of advice: Before advice: Advice that executes before a join point, but which does not have the ability to prevent execution flow proceeding to the join point (unless it throws an exception). After returning advice: Advice to be executed after a join point completes normally: for example, if a method returns without throwing an exception. After throwing advice: Advice to be executed if a method exits by throwing an exception. After (finally) advice: Advice to be executed regardless of the means by which a join point exits (normal or exceptional return). Around advice: Advice that surrounds a join point such as a method invocation. This is the most powerful kind of advice. Around advice can perform custom behavior before and after the method invocation. It is also responsible for choosing whether to proceed to the join point or to shortcut the advised method execution by returning its own return value or throwing an exception. Around advice is the most general kind of advice. The concept of join points, matched by pointcuts, is the key to AOP which distinguishes it from older technologies offering only interception. Pointcuts enable advice to be targeted independently of the Object-Oriented hierarchy.
  10. Finally, MVC - Model View Controller.  When this pattern is done well, the views are extremely thin, and simply map the model to UI controls.  This leaves what's left to test in the UI very small - just verifying that the model was mapped correctly, and perhaps that UI navigation proceeds through the expected flow inside the Controller.  Why?  Because the Model and your Controllers can all be unit and integration tested in isolation. MVP and MVVM can fit into the “MVx” set of patterns with MVC. The differences between them are primarily around the dependency flow and cardinality. The term MVVM was first mentioned by the WPF Architect, John Gossman, on his blog in 2005 [7]. It was then described in depths by Josh Smith in his MSDN article “WPF Apps with the Model-View-ViewModel Design Pattern” [8]. Gossman explains that the idea of MVVM was built around modern UI architecture where the View is the responsibly of the designer rather than the developer and therefore contains no code. Just like its MVC predecessor, the View in MVVM can bind to the data and display updates, but without any coding at all, just using XAML markup extensions. This way, the View is under the designer’s control, but can update its state from the domain classes using the WPF binding mechanism. This fits the description of the Presentation Model pattern. This is why MVVM is similar to PM where the View will reference the Presentation Model, called ViewModel, which is a better name since it is a “Model of the View”. Unlike the Presentation Model, the ViewModel in MVVM also encapsulates commands just like the Presenter in MVP. Overall, the View builds the UI and binds to the ViewModel
  11. All three of these patterns allow us to design and architect for the Test Automation pyramid.  An application that is built without these patterns - or one that has hard dependencies between layers and between layers and infrastructure code, and application logic riddled throughout the UI - can literally not have full test coverage in the ratios described by Cohn's pyramid.  Use these patterns.  
  12. WHAT’S WRONG WITH THAT? Nothing. We’re all on the same team. We’re all interested in getting quality software, that does what our users want, into the hands of our users…
  13. The Egyptians set the bar high - crafting a product that has lasted 4,500 years - what can we do to craft software with strength, integrity, and longevity?