Skip to main content

5. 📚 Home Task

  1. Identify SOLID Principles

    Choose a large open source project written in TypeScript preferably (choose another OOP language if you want: Java, C#, Ruby). You may want to look at Angular or VS Code source code. A project may be considered large enough if it contains at least 30 classes.

    Try to identify at least 1 (one) example of each SOLID principle. Document them by filling in the table below. Note that you don't need to give code examples itself, just provide the link to file with line numbers range (or whatever you want to clearly recognize the example you describe, e.g. file hello.ts:15-36, class Foo), you can also write free text.

    PrincipleExamples
    Single Responsibility Principle
    Open / Closed Principle
    Liskov Substitution Principle
    Interface Seggregation Principle
    Dependency Inversion Principle
  2. Violations of SOLID and Other Principles

    Try to find at least 1 (one) violations of each SOLID principle in the project you have chosen for Problem 1 and document it. Additionally, you can describe other (DRY/KISS/YAGNI/etc.) violations.

    You may provide short descriptions about how to refactor/improve such violations.

    Optionally, you can add small examples with results of such refactoring using pseudocode or real code.