Giter VIP home page Giter VIP logo

solid-principles-examples-using-typescript's Introduction

SOLID Principles Examples using Typescript

This tutorial was insprired from the Encapsulation SOLID course on Pluralsight.

What is SOLID

SOLID is an acronym for 5 important design principles when doing OOP (Object Oriented Programming). These 5 principles were introduced by Robert C. Martin (Uncle Bob), in his 2000 paper Design Principles and Design Patterns.

These principles, when combined together, make it easy for a programmer to develop software that are easy to maintain and extend. They also make it easy for developers to avoid code smells, easily refactor code.

  • S - Single Responsibility Principle (SRP)
  • O - Open Closed Principle (OCP)
  • L - Liskov Substitution Principle (LSP)
  • I - Interface Segregation Principle (ISP)
  • D - Dependency Inversion Principle (DIP)

How to use this tutorial

Start with the original file here the start folder and we then take that and apply refectorings step by step in the order of SOLID.

So prehaps take a look at the original file as a reference. As you can see all the functionality is included in this file and none of the SOLID priniples have yet to be applied. Then move to each priniple one at a time folowing the same order of SOLID.

If you want to jump directly to the final solution, that is once all the SOLID priniples have been applied to this original file, then take a look at the code in the conclusion) folder. In that code all the SOLID principles have been applied. If you want a sort of journey on how we got there, I suggest following each step at a time.

So, what are you waiting for? Navigate to the separate folder linked above in this repo for further explainations and an example application written in Typescript.

Issue Reporting

If you experience with bugs or need further improvement, please create a new issue under Issues.

Contributing to this SOLID journey!

Pull requests are very welcome. Before submitting a pull request, please make sure that your changes are well tested.

License

This application is released under AGPL

Disclaimer

This application is part of a research and learning project and is most definitely not suitable for Production use! :)

solid-principles-examples-using-typescript's People

Contributors

jensendarren avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.