WeihanLi / Designpatterns
Licence: mit
DesignPatterns samples by csharp on dotnetcore 《大话设计模式》 中设计模式总结/C#(.NETCore)代码
Stars: ✭ 73
Programming Languages
csharp
926 projects
Projects that are alternatives of or similar to Designpatterns
Designpatternslibrary
A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
Stars: ✭ 485 (+564.38%)
Mutual labels: patterns, design-patterns, oop
Java-Programs
Java Practiced Problems including concepts of OOPS, Interface, String , Collection.
Stars: ✭ 51 (-30.14%)
Mutual labels: patterns, oop, design-patterns
Design Patterns
Contains examples of design patterns that implemented in php
Stars: ✭ 375 (+413.7%)
Mutual labels: design-patterns, oop
Reason Design Patterns
🗺 An unofficial collection of "design patterns" for Reason and OCaml
Stars: ✭ 379 (+419.18%)
Mutual labels: patterns, design-patterns
Cloud Design Patterns
Prescriptive Architecture Guidance for Cloud Applications
Stars: ✭ 484 (+563.01%)
Mutual labels: patterns, design-patterns
design-patterns
Simple examples of Design Patterns with PHP Examples
Stars: ✭ 75 (+2.74%)
Mutual labels: oop, design-patterns
design-patterns-java
📗 Classic OOP Design Patterns from GoF, implemented in Java.
Stars: ✭ 25 (-65.75%)
Mutual labels: oop, design-patterns
Go Patterns
Design patterns for the Go programming language
Stars: ✭ 432 (+491.78%)
Mutual labels: patterns, design-patterns
goodcode
A curated collection of annotated code examples from prominent open-source projects
Stars: ✭ 184 (+152.05%)
Mutual labels: patterns, design-patterns
Go Pattern Examples
Examples of implement for awesome go patterns including usual design patterns, in easy understanding examples.
Stars: ✭ 65 (-10.96%)
Mutual labels: patterns, design-patterns
Modular Monolith With Ddd
Full Modular Monolith application with Domain-Driven Design approach.
Stars: ✭ 6,210 (+8406.85%)
Mutual labels: dotnetcore, design-patterns
Java design patterns
Java 实现的面向对象设计模式示例, 创建者、抽象工厂、工厂方法、原型、单例、适配器、桥接、组合、装饰器、备忘录、观察者、状态、策略、模板方法、访问者
Stars: ✭ 547 (+649.32%)
Mutual labels: design-patterns, oop
estore
Electronic Store Application - A web based application developed using PHP and Driven by MySQL Database
Stars: ✭ 48 (-34.25%)
Mutual labels: oop, design-patterns
software-design-pattern
Software design pattern
Stars: ✭ 43 (-41.1%)
Mutual labels: patterns, design-patterns
Designpatternsphp
sample code for several design patterns in PHP 8
Stars: ✭ 20,158 (+27513.7%)
Mutual labels: design-patterns, oop
express-mvc-pattern
Example nodejs using express implementation design pattern using mvc architecture.
Stars: ✭ 52 (-28.77%)
Mutual labels: oop, design-patterns
Buildingblocks
Building blocks for Aspnet Core Microservices Development
Stars: ✭ 43 (-41.1%)
Mutual labels: patterns, dotnetcore
DesignPatterns
Intro 简介
Design patterns from 《大话设计模式》 and some samples implemented by C#.
《大话设计模式》 中设计模式总结,示例代码是以 C# 写的,基于 .NET Core 如果要自己编译请下载安装 .NET Core SDK
设计模式设计原则
-
单一职责原则
对于一个类而言,应该仅有一个引起它变化的原因
如果一个类承担的职责过多,就等于把这些职责耦合再一起,一个职责的变化可能会削弱或者抑制这个类完全其他职责的能力。这种耦合会导致脆弱的设计,当发生变化时,设计会遭受到意想不到的破坏。
-
开放-封闭原则
开放-封闭原则是说软件实体(类、模块、函数等等)应该可以扩展,但是不可修改。
对于扩展开放,对于更改封闭
-
依赖倒转原则
- 高层模块不应该依赖低层模式,两个都应该依赖抽象。
- 抽象不应该依赖细节,细节应该依赖于抽象。基于接口编程。
-
里氏代换原则
子类型必须能够替换掉它们的父类型
-
接口隔离原则
使用多个隔离的接口,比使用单个接口好,建立最小的接口
一个接口只负责一个功能
-
迪米特法则
如果两个类不必彼此通信,那么这两个类就不应当发生直接的相互作用。如果其中一个类需要调用另一个类的某一个方法,可以通过第三者转发这个调用。
类的结构设计上,每一个类都应当尽量降低成员的访问权限
类之间的耦合越弱,越有利于复用,一个处在弱耦合的类别修改,不会对有关系的类造成波及
Overview 概览
设计模式大体上可分为三类:
Contact
Contact me if you need: [email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].