GithubHelp home page GithubHelp logo

bernlewal / fhtw-bif4-swen2-eventlister-cs Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 20 KB

Sample project in C# for SWEN2 course, shows SOLID architecture, MVVM-pattern and Unit-Tests with MVVM

License: MIT License

C# 100.00%

fhtw-bif4-swen2-eventlister-cs's Introduction

EventListerInCSharp

Sample project in C# for SWEN2-course, shows

  • SOLID architecture,
  • MVVM-pattern and
  • Unit-Tests with MVVM.

SOLID

see: https://dotnetcoretutorials.com/2019/10/17/solid-in-c-single-responsibility-principle/ and https://www.baeldung.com/solid-principles

SRP - Single Responsibility Principle

  • A class should have only one reason to change.
    • change of the html should not require a change of other logic
    • change of the transfer protocol (http -> https) should not require ...
    • ...
  • no clear border

see split between communication and content interpretation

OCP - Open/Closed Principle

  • Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.
    • Can I extend this code and add more functionality without modifying the original code in any way.

CommandLineArgumentHandler loads filters based on command line parameters. see DefaultArgumentHandler

LSP - Liskov Substitution Principle

  • Types can be replaced by their subtypes without altering the desirable properties of the program.
  • if class A is a subtype of class B, then we should be able to replace B with A without disrupting the behavior of our program.

see: ArgumentHandler

Interface Segregation Principle

  • No client should be forced to depend on methods it does not use
    • keep interfaces small

Dependency Inversion Principle

  • High-level modules should not depend on low-level modules. Both should depend on abstractions (e.g. interfaces).
  • Abstractions should not depend on details. Details (concrete implementations) should depend on abstractions.

Dependency Injection is a way to achieve Dependency Inversion

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.