SEVEN PEAKS SPEAKS
.NET Summer Meetup
SOLID Pattern in .NET
26.07.22
SEVEN PEAKS SOFTWARE
Cloud & Backend Team
Giorgio
Dinand
Korn
Nicolas
Siw
Bank
Khoa
Massimo
Mean
Phu
Steven
Thiha
Bond
Tanvi
Fir
Mredhul
Amit
Nazmul
Deepa
SEVEN PEAKS SOFTWARE
Giorgio Desideri
Senior cloud lead who have been working in IT since 2006.
I covered all the roles from System Engineer / Administrator until Project Manager, step through Development, Software Architecture, Integration, and Admin roles.
Certified cloud architect for AWS and Azure.
Why I am here ?
Let me explain why I present this subject today
Why am I here ?
Reason
MOREOVER …
Why am I here ?
Reason
I found myself in several situations which raised these questions:
SO …
LET ME EXPLAIN THEM AGAIN !
Reason
Principles
Let’s Begin !
Principles
SOLID Acronym
SRP - Single Responsibility Principle
Principle #1
(*) Martin, Robert C. (2003). Agile Software Development, Principles, Patterns, and Practices. Prentice Hall. p. 95. ISBN 978-0135974445.
SRP - Single Responsibility Principle
Principle #1
(*) Martin, Robert C. (2003). Agile Software Development, Principles, Patterns, and Practices. Prentice Hall. p. 95. ISBN 978-0135974445.
SRP - Single Responsibility Principle
Principle #1
OCP - Open Closed Principle
Principle #2
OCP - Open Closed Principle
Principle #2
OCP - Open Closed Principle
Principle #2
static class MyClassExtension
{
static void MyNewMethod(this MyClass mc)
{
// Do here what is new for you !
Console.WriteLine(“Hi Master,
I am here to serve you !”);
}
}
LSP - Liskov Substitution Principle
Principle #3
Subtype Requirement:
Let ϕ ( x ) be a property provable about objects x of type T.
Then ϕ ( y ) should be true for objects y of type S where S is a subtype of T.
LSP - Liskov Substitution Principle
Principle #3
LSP - Liskov Substitution Principle
Principle #3
// Dependency Injection
service
.AddTransient<ISavingAccount, SalaryAccount>();
// Facade, Proxy, Connectors
ISendEmailFacade sems =
new GmailSendEmailProxy(...);
new GenericSmtpFacade(...)
ISP - Interface Segregation Principle
Principle #4
ISP - Interface Segregation Principle
Principle #4
DIP - Dependency Inversion Principle
Principle #5
(*) Martin, Robert C. (2003). Agile Software Development, Principles, Patterns, and Practices. Prentice Hall. pp. 127–131. ISBN 978-0135974445.
DIP - Dependency Inversion Principle
Principle #5
DIP - Dependency Inversion Principle
Principle #5
DIP - Dependency Inversion Principle
Principle #5
Conclusion
Bring Away Points
CONCLUSION
Bring Away Points
Q&A
Questions ?
UPCOMING MEETUP
Check out our event page
Stay tuned for what’s coming next!