Leanpub Header

Skip to main content

Software Architecture: Meta and SOLID Principles in C#

Learn how to develop maintainable software systems applying Meta and SOLID Principles.

SOLID is an acronym which stands for SRP, OCP, LSP, ISP and DIP. These five acronyms in their turn stand for:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

This book is available in multiple packages!

Pick Your Package
PDF
EPUB
WEB
217
Readers
About

About

About the Book

In this book, you’ll learn how to apply meta and SOLID principles so that your application will live a long healthy life. It means you are going to learn how to write code of the high quality: readable, understandable and reliable.

Improve your knowledge in object-oriented programming

  • Understand the meta principles on which all the other development principles are based
  • Understand the symptoms of code defects
  • Learn the foundations of SOLID principles
  • Learn how to detect the violations of SOLID principles and how to fix the problems
  • Learn how meta principles and SOLID principles are related to each other and how to find the balance between them

There are plenty of code examples throughout this course so that you will learn both theoretical and practical material.

Starting with SOLID principles we will go further to the meta-principles. Going through the SOLID principles, you’ll also learn about the related patterns. Then we will get to the problem of contradictions between different principles. You’ll learn about the relationships between SOLID principles and meta principles.

Learning DIP you’ll in addition learn what is Dependency Injection, Inversion of Control, IoC-Containers and what are the architectural implications of DI.

Here are other topics you’ll learn in the course:

  • DRY – don’t repeat yourself
  • KISS – keep it simple stupid
  • YAGNI – You Ain’t Gonna Need It
  • SoC – separation of concerns
  • CQS – command query separation
  • Law of Demeter
  • Principle of Least Astonishment
  • Information Hiding and Encapsulation
  • API Development Principles
  • Contradiction between SOLID and YAGNI
  • Contradiction between OCP and YAGNI
  • What is Architecture and Design

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

The Book

Minimum price

Suggested price$7.99

$7.99

    BOOK + VIDEO COURSE

    Minimum price

    Suggested price$12.99

    Get a book and full video course on udemy.com.

    $9.99

    • Video Course: Meta and SOLID Principles in C#
      Get a full video course on udemy.com.

    Author

    About the Author

    EngineerSpock

    I'm thankful enough for that I love what I do.

    I began my career as a postgraduate student participating in Microsoft ImagineCup contest.

    I've been working with .NET platform since 2003. I've been professionally architecting and implementing software for more than 10 years, primarily based on the .NET platform. I'm passionate about building rich and powerful applications using modern technologies. I'm a certified specialist in Windows Applications and Service Communication Applications by Microsoft. I'm one of the coordinators of the MskDotNet User Group in Moscow.

    "If it's work, we try to do less. If it's art, we try to do more." - Seth Godin.

    What I can say is that software is my art.

    Contents

    Table of Contents

    Few Words About Me

    A Bit of Advertisment

    SOLID Principles

    Introduction

    1. But what is design?
    2. How to define the design of software?
    3. Did you notice that almost all the smells are related to bad dependencies management?
    4. So, the key to achieving a good architecture is to manage the dependencies well.

    SRP - Single Responsibility Principle

    1. Outline
    2. Problem Statement
    3. Classes with too many responsibilities are hard to understand!
    4. Demonstration of the Problem
    5. Refactoring to a Better Design
    6. Remember that inheritance couples the parent and child classes very tight.
    7. Everything depends on the requirements of an application.
    8. More Example of Violation the SRP
    9. Does this method violate SRP?
    10. Tip
    11. Does this method violate the SRP?
    12. Tip
    13. Does this method violates the SRP?
    14. Related Patterns
    15. Conclusion

    OCP – OpenClosed Principle

    1. Outline
    2. Problem Statement
    3. Question
    4. Why OCP?
    5. FYI
    6. So, the Principle of Single Choice sounds like this:
    7. Demo of the Problem
    8. Refactoring to a Better Design
    9. OCP-Related Patterns
    10. How to choose between them?
    11. Rule of thumb
    12. Question
    13. Common Smells
    14. Conclusion

    LSP – Liskov Substitution Principle

    1. Outline
    2. Problem Statement
    3. Question
    4. FYI
    5. Contracts
    6. So, what is a contract?
    7. Interfaces are not contracts.
    8. What constitutes a method’s contract?
    9. Important
    10. Demo of the Problem
    11. FYI
    12. Refactoring to a Better Design
    13. Question
    14. More Examples of LSP Violation
    15. Common Smells
    16. Here are some tips to conform with LSP:
    17. Conclusion

    ISP – Interface Segregation Principle

    1. Outline
    2. Problem Statement
    3. Demo of the Problem
    4. Refactoring to a Better Design
    5. Important
    6. Demo of the Problem 2
    7. Refactoring to a Better Design 2
    8. Common Smells, Fixes and Related Patterns
    9. Tip
    10. Question
    11. FYI
    12. Tip
    13. Tip
    14. Tip
    15. Conclusion

    DIP – Dependency Inversion Principle

    1. Outline
    2. Definition of DIP
    3. FYI
    4. Question
    5. Dependencies
    6. Volatile and Stable dependencies
    7. Question
    8. Definitions of IoC and DI
    9. DIP violation Demo
    10. Refactoring to a Better Design applying Dependency Injection
    11. DI Techniques
    12. Architectural Implications
    13. Question
    14. Pure DI and IoC-Containers
    15. Building a Simple IoC-Container
    16. Demo with IoC-Container
    17. Common Smells
    18. Conclusion

    Metaprinciples and SOLID

    1. Outline
    2. DRY – Don’t Repeat Yourself
    3. The question is
    4. FYI
    5. KISS – Keep it Simple, Stupid
    6. Question
    7. Remember, that there are two values of software.
    8. YAGNI – You Ain’t Gonna Need It
    9. Separation of Concerns
    10. CQS Principle
    11. Violation of Law of Demeter
    12. Principle of Least Astonishment
    13. Information Hiding and Encapsulation
    14. Question
    15. General Principles of Building APIs
    16. Question
    17. Conclusion

    The Interconnection between Metaprinciples and SOLID

    1. Outline
    2. SOLID vs YAGNI
    3. Question
    4. OCP vs YAGNI
    5. Question
    6. SRP and ISP. What’s the Difference?
    7. Architecture and Design
    8. Question
    9. Conclusion

    Get the free sample chapters

    Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

    The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

    You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

    So, there's no reason not to click the Add to Cart button, is there?

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub