All Projects → 52fhy → design_patterns

52fhy / design_patterns

Licence: other
PHP设计模式

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to design patterns

express-mvc-pattern
Example nodejs using express implementation design pattern using mvc architecture.
Stars: ✭ 52 (+205.88%)
Mutual labels:  design-patterns
betterdocs
📚 Web version of https://github.com/khusnetdinov/ruby.fundamental repo - Fundamental programming with ruby examples and references. It covers threads, SOLID principles, design patterns, data structures, algorithms. Books for reading.
Stars: ✭ 25 (+47.06%)
Mutual labels:  design-patterns
design-pattern
Design patterns
Stars: ✭ 200 (+1076.47%)
Mutual labels:  design-patterns
Design-Patterns-In-Swift-CN
设计模式(Swift 5.0 实现)- 中文版
Stars: ✭ 290 (+1605.88%)
Mutual labels:  design-patterns
goodcode
A curated collection of annotated code examples from prominent open-source projects
Stars: ✭ 184 (+982.35%)
Mutual labels:  design-patterns
HeadFirstDesignPatternsSwift
An implementation of examples from "Head First Design Patterns", written in Swift.
Stars: ✭ 20 (+17.65%)
Mutual labels:  design-patterns
refactoringtopatterns
A place to practice Refactoring To Patterns that Kerievsky wrote about in his book
Stars: ✭ 46 (+170.59%)
Mutual labels:  design-patterns
design-system
British Columbia Government Design System for Digital Services
Stars: ✭ 33 (+94.12%)
Mutual labels:  design-patterns
Java-design-patterns
Java Design patterns.
Stars: ✭ 49 (+188.24%)
Mutual labels:  design-patterns
laravel-decorator
Easily decorate your method calls with laravel-decorator package
Stars: ✭ 125 (+635.29%)
Mutual labels:  design-patterns
notes
My personal tutorials and notes.
Stars: ✭ 34 (+100%)
Mutual labels:  design-patterns
design-patterns
Grokking design patterns in python
Stars: ✭ 24 (+41.18%)
Mutual labels:  design-patterns
JavaScript-design-patterns
Examples of popular design patterns in JavaScript
Stars: ✭ 41 (+141.18%)
Mutual labels:  design-patterns
design-patterns-cpp14
🙏 Design patterns implemented in C++14
Stars: ✭ 35 (+105.88%)
Mutual labels:  design-patterns
design-patterns-explained
Explanation for most of the well-known design patterns with examples and figures.
Stars: ✭ 18 (+5.88%)
Mutual labels:  design-patterns
Design-Patterns
Design Patterns
Stars: ✭ 29 (+70.59%)
Mutual labels:  design-patterns
swe
Examples and exercises used during Software Engineering course
Stars: ✭ 18 (+5.88%)
Mutual labels:  design-patterns
design-pattern-examples-in-crystal
UML model and code examples of design patterns for Crystal. The model is created with Astah.
Stars: ✭ 51 (+200%)
Mutual labels:  design-patterns
design-patterns-php
All Design Patterns Samples in PHP
Stars: ✭ 43 (+152.94%)
Mutual labels:  design-patterns
jw-design-library
A library of product design patterns comprised of code, usage and guidelines.
Stars: ✭ 16 (-5.88%)
Mutual labels:  design-patterns

PHP设计模式

代码实现均在Yjc目录,测试代码在App里。

本库是学习PHP设计模式所写的测试代码。核心代码均在Yjc目录里。为了测试方便,其实已经完成了简单的MVC框架的封装。

大家可以按照下面的文档进行测试,然后看代码实现。本人水平有限,欢迎提出修改建议。

设计模式

简介

创建模式

架构模式

行为模式

参考

开始测试

需要有运行环境。使用PHP7的同学可以直接使用下面的方法开启Server,免去Nginx配置PHP环境烦扰。

开启server

php -S 0.0.0.0:8888

浏览器输入:http://localhost:8888

设计模式测试

简单工厂

/SimpleFactoryTest/index

示例:
URL路径:http://localhost:8888/SimpleFactoryTest/index
对应文件:App/SimpleFactoryTest
对应源码:Yjc/SimpleFactory

工厂方法

/FactoryTest/index

抽象工厂

/AbstractFactoryTest/index

单例模式

/SingletonTest/index

注册树模式

/RegisterTest/index

原型模式

/PrototypeTest/index

适配器模式

/AdapterTest/index
AdapterTest/index2

装饰器模式

/DecoratorTest/index

策略模式

/StrategyTest/index

观察者模式

/Observertest/index

迭代器模式

/IteratorTest/index

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].