SlideShare a Scribd company logo
1 of 23
There are only 3 
operations in a web 
application 
(or maybe 2)
History 
Worked on lots of web applications 
Seems to be lots of attempts at the same 
problems 
Typically non-SOLID solutions
History 
Without SOLID web applications are 
Difficult to maintain 
Buggy 
Difficult to scale
Back to basics 
As any other application 
Identify the entities 
Identify the operations these entities execute
Back to basics 
Web applications have lots of entities 
Customer … Order … Hotel … Basket … Page 
… Section … SubSection … etc.
Back to basics 
However the stateless nature of the web 
plus user expectations lead to …..
The big idea. 
… A limited number of operations 
1. Find 0 or more entities 
2. Add a new entity 
3. Change an entity
The big idea. 
… A limited number of operations 
1. Find 0 or more entities 
2. Add a new entity 
3. Change an entity 
Sometimes combined into a ‘Crupdate’
The big idea. 
Sign up? Add item to basket? Log error? 
Add new entity 
Login? Get Hotel Details? View sale items ? 
Find 0 or more entities 
Update password? 
Change an entity
The big idea 
So … can we make a framework that 
abstracts away all the common parts of 
these operations, allowing us to produce 
SOLID software with the minimum of 
changes?
The big idea 
So … can we make a framework that 
abstracts away all the common parts of 
these operations, allowing us to produce 
SOLID software with the minimum of 
changes? ….. MAYBE?
The big idea. 
How about creating a suite of “Micro 
services” for each entity. 
The service contains all the (validation) 
business logic for the entity, returning the 
results in a consistent way. ….
The big idea. 
These micro services can only be reached 
through a message, making them fully 
decoupled from the consuming application.
The Message 
A POCO class whose single responsibility is 
to transmit information between the 
provider and the producer
The Message Processor 
A POCO class whose sole responsibility is to 
update the state of the message. 
Simple to test. 
Simple to read. 
Only place for business logic.
Consuming with MVC 
Can be consumed by any .net framework. 
As there is no business logic consuming is 
simple. 
Every message is consumed in the same 
way, so consuming code follows a similar, 
simple pattern.
Epilogue 
● Normalising code to its common 
components reduces repeated code. 
● Normalising code to its common 
components reduces the amount of code 
needed. 
● Normalising code to its common 
components encourages SOLID software.
Questions...

More Related Content

Viewers also liked (12)

Generics
GenericsGenerics
Generics
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Producing Quality Software
Producing Quality SoftwareProducing Quality Software
Producing Quality Software
 
Implementing Soa
Implementing SoaImplementing Soa
Implementing Soa
 
Io e Wikipedia
Io e WikipediaIo e Wikipedia
Io e Wikipedia
 
Prototype and Test - Idea 1
Prototype and Test - Idea 1Prototype and Test - Idea 1
Prototype and Test - Idea 1
 
Liberal Democracy by Muhammad Muinul Islam
Liberal Democracy by Muhammad Muinul IslamLiberal Democracy by Muhammad Muinul Islam
Liberal Democracy by Muhammad Muinul Islam
 
我的32個臉孔
我的32個臉孔我的32個臉孔
我的32個臉孔
 
愛德華的神奇旅行
愛德華的神奇旅行愛德華的神奇旅行
愛德華的神奇旅行
 
HMES Imágenes
HMES ImágenesHMES Imágenes
HMES Imágenes
 
Fiesta En Santa Clara
Fiesta En Santa ClaraFiesta En Santa Clara
Fiesta En Santa Clara
 
我感恩
我感恩我感恩
我感恩
 

Similar to There are only 3 operations in a web app

RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and MicroservicesRedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
Redis Labs
 

Similar to There are only 3 operations in a web app (20)

Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
Software as a Service - Concepts and Implementation
Software as a Service - Concepts and ImplementationSoftware as a Service - Concepts and Implementation
Software as a Service - Concepts and Implementation
 
A Tale of Contemporary Software
A Tale of Contemporary SoftwareA Tale of Contemporary Software
A Tale of Contemporary Software
 
Ncrafts.io - Refactor your software architecture
Ncrafts.io - Refactor your software architectureNcrafts.io - Refactor your software architecture
Ncrafts.io - Refactor your software architecture
 
Going open source with small teams
Going open source with small teamsGoing open source with small teams
Going open source with small teams
 
Managing Large Flask Applications On Google App Engine (GAE)
Managing Large Flask Applications On Google App Engine (GAE)Managing Large Flask Applications On Google App Engine (GAE)
Managing Large Flask Applications On Google App Engine (GAE)
 
Joomla in a world of ubiquitous computing
Joomla in a world of ubiquitous computingJoomla in a world of ubiquitous computing
Joomla in a world of ubiquitous computing
 
Welcome to the world of micro-applications
Welcome to the world of micro-applicationsWelcome to the world of micro-applications
Welcome to the world of micro-applications
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating Buzzwords
 
Enterprise integration primer
Enterprise integration primerEnterprise integration primer
Enterprise integration primer
 
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and MicroservicesRedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
 
Isset Presentation @ EECI2009
Isset Presentation @ EECI2009Isset Presentation @ EECI2009
Isset Presentation @ EECI2009
 
Web services & com+ components
Web services & com+ componentsWeb services & com+ components
Web services & com+ components
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
 
Creating a workflow with Azure Logic and API Apps
Creating a workflow with Azure Logic and API AppsCreating a workflow with Azure Logic and API Apps
Creating a workflow with Azure Logic and API Apps
 
Introduction to Serverless. Oracle Fn Project.
Introduction to Serverless. Oracle Fn Project.Introduction to Serverless. Oracle Fn Project.
Introduction to Serverless. Oracle Fn Project.
 
Designingapplswithnet
DesigningapplswithnetDesigningapplswithnet
Designingapplswithnet
 
Small is beautiful
Small is beautifulSmall is beautiful
Small is beautiful
 
RabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxRabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docx
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft Microservices
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

There are only 3 operations in a web app

  • 1. There are only 3 operations in a web application (or maybe 2)
  • 2. History Worked on lots of web applications Seems to be lots of attempts at the same problems Typically non-SOLID solutions
  • 3. History Without SOLID web applications are Difficult to maintain Buggy Difficult to scale
  • 4. Back to basics As any other application Identify the entities Identify the operations these entities execute
  • 5. Back to basics Web applications have lots of entities Customer … Order … Hotel … Basket … Page … Section … SubSection … etc.
  • 6. Back to basics However the stateless nature of the web plus user expectations lead to …..
  • 7. The big idea. … A limited number of operations 1. Find 0 or more entities 2. Add a new entity 3. Change an entity
  • 8. The big idea. … A limited number of operations 1. Find 0 or more entities 2. Add a new entity 3. Change an entity Sometimes combined into a ‘Crupdate’
  • 9. The big idea. Sign up? Add item to basket? Log error? Add new entity Login? Get Hotel Details? View sale items ? Find 0 or more entities Update password? Change an entity
  • 10. The big idea So … can we make a framework that abstracts away all the common parts of these operations, allowing us to produce SOLID software with the minimum of changes?
  • 11. The big idea So … can we make a framework that abstracts away all the common parts of these operations, allowing us to produce SOLID software with the minimum of changes? ….. MAYBE?
  • 12. The big idea. How about creating a suite of “Micro services” for each entity. The service contains all the (validation) business logic for the entity, returning the results in a consistent way. ….
  • 13. The big idea. These micro services can only be reached through a message, making them fully decoupled from the consuming application.
  • 14. The Message A POCO class whose single responsibility is to transmit information between the provider and the producer
  • 15.
  • 16.
  • 17. The Message Processor A POCO class whose sole responsibility is to update the state of the message. Simple to test. Simple to read. Only place for business logic.
  • 18.
  • 19.
  • 20. Consuming with MVC Can be consumed by any .net framework. As there is no business logic consuming is simple. Every message is consumed in the same way, so consuming code follows a similar, simple pattern.
  • 21.
  • 22. Epilogue ● Normalising code to its common components reduces repeated code. ● Normalising code to its common components reduces the amount of code needed. ● Normalising code to its common components encourages SOLID software.