策略模式 (结合印象笔记中来看)
定义: 策略模式定义了一系列的算法,并将每一个算法封装起来,而且它们还可以相互替换。让算法独立于使用它的客户而独立变化。
主要用来分类算法,在相同的行为抽象下有不同的具体实现策略,这个模式很好的展示了开闭原则,也就是定义抽象,注入不同的实现,从而达到很好的可扩展性。
优点: 结构清晰明了、使用简单直观 耦合度相对较低,扩展方便 操作封装也更为彻底,数据更为安全
缺点: 随着策略的增加,子类也会变得繁多
策略模式
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.