SlideShare una empresa de Scribd logo
1 de 40
Advanced OOP
Laws  Principles  Idioms
Clint Edmonson
Senior Consultant
Polaris Solutions
clinted@polarissoutions.com
Platinum
Sponsors

Gold Sponsors

Silver
Sponsors
what is oop?
abstraction
encapsulation
inheritance
polymorphism
structural
domain driven design
All software can be composed of only
four elements:
- Value objects
- Entities
- Services
- Modules
separation of concerns
Every class and method should have a
single responsibility.
All its functionality should be narrowly
aligned with that responsibility.
the DRY principle
Don’t repeat yourself.
Don’t repeat yourself.
Don’t repeat yourself.
theory of one right place
There should be only one right place for a
piece of nontrivial of code,

and one right place to make a likely
maintenance change.
unit of work
Define entity families around transactional
boundaries and aggregate root entities.
the open-closed principle
Software entities (classes, methods, and modules)
should be
open for extension
but closed for modification.
design by contract
Fortify your methods through
preconditions,
post-conditions,
and invariant assertions.
creational
declarative programming
Use attributes to describe what you want to
happen and leverage a framework will take
care of the how.
the provider model
Define a public service façade that uses an
private implementation to perform all of it’s
work.
the provider model
code example
inversion of control
Hide implementation details by letting
subsystems automatically create their objects as
they are needed.
inversion of control
code example
dependency injection
Declaratively describe dependencies between
classes and an IOC framework can automatically
instantiate all of them.
dependency injection
code example
object:relational mapping
Leverage IOC and dependency injection to
automatically load entities from your database.
behavioral
principle of scenario driven design
All functionality should be driven by
usage scenarios.
occam’s razor
The simplest solution is usually the best.
the pareto principle
For many phenomena, 80% of the consequences
stem from 20% of the causes
the law of demeter
“Don’t talk to your neighbor’s neighbor!”
An object should only call methods and
properties belonging to:
- Itself
- Any parameters passed in
- Objects it creates
- Child components
principle of least resource usage
The minimal amount of computational resources
should be used to solve a particular need.
principle of least privilege
Provide the minimal level of access necessary
for consumers to do their job.
Combined with the previous principle…
Classes and methods should be as stateless
and private as possible.
the liskov substitution principle
A derived class should be completely and
transparently substitutable for it’s base class.
idempotents
Transactional systems should allow the
same information to be received multiple times
without being reprocessed.
cyclomatic complexity
The depth of nested logic should
be kept to a minimum.
What are your principles?
References
Books
–
–
–
–
–

Code Complete - McConnell
Domain Driven Design – Evans
Effective C# - Wagner
Framework Design Guidelines – Cwalina & Abrams
Writing Solid Code – Maguire

Links
–
–
–
–

Application Architecture for .NET
OO Design Principles
Principles of Object Oriented Design
SOLID Principles (Wikipedia)
Clint Edmonson
Email: clinted@polarissolutions.com
Blog: http://www.notsotrivial.net
Twitter: @clinted
Advanced oop laws, principles, idioms

Más contenido relacionado

Destacado

Architecting Scalable Applications in the Cloud
Architecting Scalable Applications in the CloudArchitecting Scalable Applications in the Cloud
Architecting Scalable Applications in the CloudClint Edmonson
 
Introduction to Windows Azure Virtual Machines
Introduction to Windows Azure Virtual MachinesIntroduction to Windows Azure Virtual Machines
Introduction to Windows Azure Virtual MachinesClint Edmonson
 
Windows Azure jumpstart
Windows Azure jumpstartWindows Azure jumpstart
Windows Azure jumpstartClint Edmonson
 
Peering through the Clouds - Cloud Architectures You Need to Master
Peering through the Clouds - Cloud Architectures You Need to MasterPeering through the Clouds - Cloud Architectures You Need to Master
Peering through the Clouds - Cloud Architectures You Need to MasterClint Edmonson
 
Advanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesAdvanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesJon Kruger
 

Destacado (6)

Architecting Scalable Applications in the Cloud
Architecting Scalable Applications in the CloudArchitecting Scalable Applications in the Cloud
Architecting Scalable Applications in the Cloud
 
Introduction to Windows Azure Virtual Machines
Introduction to Windows Azure Virtual MachinesIntroduction to Windows Azure Virtual Machines
Introduction to Windows Azure Virtual Machines
 
Windows Azure jumpstart
Windows Azure jumpstartWindows Azure jumpstart
Windows Azure jumpstart
 
Peering through the Clouds - Cloud Architectures You Need to Master
Peering through the Clouds - Cloud Architectures You Need to MasterPeering through the Clouds - Cloud Architectures You Need to Master
Peering through the Clouds - Cloud Architectures You Need to Master
 
Advanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesAdvanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID Principles
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 

Similar a Advanced oop laws, principles, idioms

Advanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, IdiomsAdvanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, IdiomsClint Edmonson
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilitiesguest2a92cd9
 
Principled And Clean Coding
Principled And Clean CodingPrincipled And Clean Coding
Principled And Clean CodingMetin Ogurlu
 
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdfMaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdfAhmed Mohamed
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural PatternsSameh Deabes
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design patternMindfire Solutions
 
2011 iska - tim m - domain driven design
2011   iska - tim m - domain driven design2011   iska - tim m - domain driven design
2011 iska - tim m - domain driven designTim Mahy
 
What gets into Software code after some time
What gets into Software code  after some timeWhat gets into Software code  after some time
What gets into Software code after some timePrasad Narasimhan
 
Code how it matures in syste
Code how it matures in systeCode how it matures in syste
Code how it matures in systePrasad Narasimhan
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testingKMS Technology
 
Segue to design patterns
Segue to design patternsSegue to design patterns
Segue to design patternsRahul Singh
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignIrwansyah Irwansyah
 
Practical Enterprise Application Development
Practical Enterprise Application DevelopmentPractical Enterprise Application Development
Practical Enterprise Application DevelopmentAdil Mughal
 
From Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesFrom Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesObeo
 

Similar a Advanced oop laws, principles, idioms (20)

Advanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, IdiomsAdvanced OOP - Laws, Principles, Idioms
Advanced OOP - Laws, Principles, Idioms
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilities
 
Principled And Clean Coding
Principled And Clean CodingPrincipled And Clean Coding
Principled And Clean Coding
 
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdfMaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
MaLeNe2021-Evolving_Autonomous_Networks-L_Ciavaglia.pdf
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Solid principes
Solid principesSolid principes
Solid principes
 
2011 iska - tim m - domain driven design
2011   iska - tim m - domain driven design2011   iska - tim m - domain driven design
2011 iska - tim m - domain driven design
 
What gets into Software code after some time
What gets into Software code  after some timeWhat gets into Software code  after some time
What gets into Software code after some time
 
Code maintainability
Code maintainability Code maintainability
Code maintainability
 
Code how it matures in syste
Code how it matures in systeCode how it matures in syste
Code how it matures in syste
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
 
Segue to design patterns
Segue to design patternsSegue to design patterns
Segue to design patterns
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
 
L23 Summary and Conclusions
L23 Summary and ConclusionsL23 Summary and Conclusions
L23 Summary and Conclusions
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Practical Enterprise Application Development
Practical Enterprise Application DevelopmentPractical Enterprise Application Development
Practical Enterprise Application Development
 
What’s Up, EDoc?!
What’s Up,EDoc?!What’s Up,EDoc?!
What’s Up, EDoc?!
 
From Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesFrom Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems Architectures
 

Más de Clint Edmonson

New Product Concept Design.pptx
New Product Concept Design.pptxNew Product Concept Design.pptx
New Product Concept Design.pptxClint Edmonson
 
Lean & Agile Essentials
Lean & Agile EssentialsLean & Agile Essentials
Lean & Agile EssentialsClint Edmonson
 
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?Clint Edmonson
 
Flow, the Universe and Everything
Flow, the Universe and EverythingFlow, the Universe and Everything
Flow, the Universe and EverythingClint Edmonson
 
Application architecture jumpstart
Application architecture jumpstartApplication architecture jumpstart
Application architecture jumpstartClint Edmonson
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsClint Edmonson
 
Lean & Agile DevOps with VSTS and TFS 2015
Lean & Agile DevOps with VSTS and TFS 2015Lean & Agile DevOps with VSTS and TFS 2015
Lean & Agile DevOps with VSTS and TFS 2015Clint Edmonson
 
Application Architecture Jumpstart
Application Architecture JumpstartApplication Architecture Jumpstart
Application Architecture JumpstartClint Edmonson
 
Agile Metrics That Matter
Agile Metrics That MatterAgile Metrics That Matter
Agile Metrics That MatterClint Edmonson
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity FrameworkClint Edmonson
 
Windows 8 - The JavaScript Story
Windows 8 - The JavaScript StoryWindows 8 - The JavaScript Story
Windows 8 - The JavaScript StoryClint Edmonson
 
Windows Azure Jumpstart
Windows Azure JumpstartWindows Azure Jumpstart
Windows Azure JumpstartClint Edmonson
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual MachinesClint Edmonson
 
A Force of One - Agile and the Solo Developer
A Force of One - Agile and the Solo DeveloperA Force of One - Agile and the Solo Developer
A Force of One - Agile and the Solo DeveloperClint Edmonson
 
Agile is as Agile Does
Agile is as Agile DoesAgile is as Agile Does
Agile is as Agile DoesClint Edmonson
 
Visual Studio 2010 Ultimate
Visual Studio 2010 UltimateVisual Studio 2010 Ultimate
Visual Studio 2010 UltimateClint Edmonson
 
Visual Studio 2010 - The Good Stuff
Visual Studio 2010 - The Good StuffVisual Studio 2010 - The Good Stuff
Visual Studio 2010 - The Good StuffClint Edmonson
 
Architecting Applications the Microsoft Way
Architecting Applications the Microsoft WayArchitecting Applications the Microsoft Way
Architecting Applications the Microsoft WayClint Edmonson
 
Intro to VS 2010 & .Net 4.0
Intro to VS 2010 & .Net 4.0Intro to VS 2010 & .Net 4.0
Intro to VS 2010 & .Net 4.0Clint Edmonson
 

Más de Clint Edmonson (20)

New Product Concept Design.pptx
New Product Concept Design.pptxNew Product Concept Design.pptx
New Product Concept Design.pptx
 
Lean & Agile Essentials
Lean & Agile EssentialsLean & Agile Essentials
Lean & Agile Essentials
 
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
 
Flow, the Universe and Everything
Flow, the Universe and EverythingFlow, the Universe and Everything
Flow, the Universe and Everything
 
Application architecture jumpstart
Application architecture jumpstartApplication architecture jumpstart
Application architecture jumpstart
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software Odors
 
State of agile 2016
State of agile 2016State of agile 2016
State of agile 2016
 
Lean & Agile DevOps with VSTS and TFS 2015
Lean & Agile DevOps with VSTS and TFS 2015Lean & Agile DevOps with VSTS and TFS 2015
Lean & Agile DevOps with VSTS and TFS 2015
 
Application Architecture Jumpstart
Application Architecture JumpstartApplication Architecture Jumpstart
Application Architecture Jumpstart
 
Agile Metrics That Matter
Agile Metrics That MatterAgile Metrics That Matter
Agile Metrics That Matter
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
Windows 8 - The JavaScript Story
Windows 8 - The JavaScript StoryWindows 8 - The JavaScript Story
Windows 8 - The JavaScript Story
 
Windows Azure Jumpstart
Windows Azure JumpstartWindows Azure Jumpstart
Windows Azure Jumpstart
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
A Force of One - Agile and the Solo Developer
A Force of One - Agile and the Solo DeveloperA Force of One - Agile and the Solo Developer
A Force of One - Agile and the Solo Developer
 
Agile is as Agile Does
Agile is as Agile DoesAgile is as Agile Does
Agile is as Agile Does
 
Visual Studio 2010 Ultimate
Visual Studio 2010 UltimateVisual Studio 2010 Ultimate
Visual Studio 2010 Ultimate
 
Visual Studio 2010 - The Good Stuff
Visual Studio 2010 - The Good StuffVisual Studio 2010 - The Good Stuff
Visual Studio 2010 - The Good Stuff
 
Architecting Applications the Microsoft Way
Architecting Applications the Microsoft WayArchitecting Applications the Microsoft Way
Architecting Applications the Microsoft Way
 
Intro to VS 2010 & .Net 4.0
Intro to VS 2010 & .Net 4.0Intro to VS 2010 & .Net 4.0
Intro to VS 2010 & .Net 4.0
 

Último

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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
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
 
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 DevelopmentsTrustArc
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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 2024Rafal Los
 
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
 

Último (20)

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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
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...
 
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
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
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
 

Advanced oop laws, principles, idioms

Notas del editor

  1. Photo credits: http://www.flickr.com/photos/booleansplit
  2. Photo credits: http://www.flickr.com/photos/booleansplit
  3. Comments
  4. CommentsAlso know as “Single Responsibility Principle”Cohesion comes from building systems from simple parts that each perform a single duty with no overlap in responsibilitiesAvoid designing classes with more than one responsibility – this leads to the famous “Blob” and “Swiss Army Knife” anti-patternsBusiness Entities should NOT know how to persist themselves
  5. Comments
  6. CommentsSpend the extra 2 minutes to think about the best place for a class or method, it will pay huge dividends later on (see also “Single Responsibility Principle”)Misplaced code leads to the “Lava Flow” and “Cut & Paste” anti-patternsAn elegant design will “feel” rightAlso known as the DRY principle, or Single Point of Truth
  7. Comments
  8. CommentsAllow for hooks into your code, but don’t allow an opening where a derived or external class can alter the fundamental behaviors or algorithms encapsulated by your codeDon’t provide virtual methods for the core behaviors in your classes, only the places where you want to allow extension or changeEvents are (currently) the safest way to adhere to this principle
  9. CommentsIn the words of Steve McConnell, “Assert thyself!”
  10. Comments
  11. CommentsMakes for swappable implementations – analogous to the windows driver model.
  12. CommentsMakes for swappable implementations – analogous to the windows driver model.
  13. CommentsTypical outside sources are xml configuration files.
  14. CommentsTypical outside sources are xml configuration files.
  15. Comments
  16. Comments
  17. Comments
  18. CommentsDon’t write code unless a use case requires itDon’t write code until you need itDon’t build out excess and unnecessary architecture – let it evolve through iterationsChoose the technology to solve the need – not the other way around (avoid the “Golden Hammer” anti-pattern)
  19. CommentsIn software development terms, the simplest solution is usually the best.Strive for simplicity in architecture and design to minimize system entropy and brittlenessWrite the least amount of code necessary to fix a bug or solve the problem
  20. CommentsYour users will only use a small portion of your application most of the time 80% of the execution time in an application is spent executing only 20% of the code Therefore, 80% of your reported bugs will come from the same 20% of codeFocus on simplifying, optimizing, and fortifying that 20%
  21. “Don’t talk to your neighbor’s neighbor” Encapsulation works best when it’s not circumvented
  22. CommentsAvoid allocating more memory or consuming more CPU than necessary to do the job (see also “Occam’s Razor”) Classes and methods should be as static as possible. If a class or method does not need to maintain state (have any member variables), it should be staticBeware of premature optimization
  23. CommentsClasses and members should be as private as possible - “Hide the plumbing”Exposing the internal mechanisms in your library - (accidentally or on purpose) can provide an opening for incorrect usage, breakage or security breachFailure to do so leads to the “Leaky Abstraction” anti-pattern
  24. CommentsDerived classes should never alter the fundamental behavior described by the contract of the base classShould not behave differently (no extra public properties or methods)Should not throw different exceptionsIf this principle is violated, a unit test should uncover it immediatelyPolymorphism works best when not circumventedAlgorithms should not check the type of an object at runtime to determine appropriate behavior
  25. Comments
  26. Comments
  27. Photo credits: http://www.flickr.com/photos/yozza
  28. Photo credit: http://www.professionalequipment.com/product_images/full/143650big.jpg
  29. Photo credits: http://www.flickr.com/photos/dbking
  30. Comments