Javascript Design Patterns #8 - Visitor Pattern
What is the Visitor pattern?
The Visitor pattern allows you to add or define new functionality to an object without changing the code for that object. The new logic resides in a external object or function called the 'visitor'.
Visitors are useful when you are trying to extend the functionality of a library or framework. If the object you want to extend provides some kind of 'accept' method that accepts a visitor object/function, you can grant the visitor object access to the receiving object's internal properties. The visitor can then modify the behavior of the receiving object. This pattern allows you to provide an easy way for clients to implement future extensions to that object.
📚Materials/References:
GitHub Code: https://github.com/pkellz/devsage/blob/master/DesignPatterns/Visitor.js
"Design Patterns Explained Simply" Ebook: https://payhip.com/b/MLtJ
🌎 Find Me Here:
Twitter: https://twitter.com/realDevSage
Ebooks: https://payhip.com/devsage
Discord: https://discord.gg/BP8wPv6raA
Merch: https://cottonbureau.com/people/devsage
Видео Javascript Design Patterns #8 - Visitor Pattern канала DevSage
The Visitor pattern allows you to add or define new functionality to an object without changing the code for that object. The new logic resides in a external object or function called the 'visitor'.
Visitors are useful when you are trying to extend the functionality of a library or framework. If the object you want to extend provides some kind of 'accept' method that accepts a visitor object/function, you can grant the visitor object access to the receiving object's internal properties. The visitor can then modify the behavior of the receiving object. This pattern allows you to provide an easy way for clients to implement future extensions to that object.
📚Materials/References:
GitHub Code: https://github.com/pkellz/devsage/blob/master/DesignPatterns/Visitor.js
"Design Patterns Explained Simply" Ebook: https://payhip.com/b/MLtJ
🌎 Find Me Here:
Twitter: https://twitter.com/realDevSage
Ebooks: https://payhip.com/devsage
Discord: https://discord.gg/BP8wPv6raA
Merch: https://cottonbureau.com/people/devsage
Видео Javascript Design Patterns #8 - Visitor Pattern канала DevSage
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Batch Processing Large Arrays using Generators](https://i.ytimg.com/vi/M_yasPwPVIE/default.jpg)
![My Old Web Developer Portfolio vs New Portfolio](https://i.ytimg.com/vi/51rNBo-WCdM/default.jpg)
![Build an eCommerce Web Scraper with Node.js! (MERN)](https://i.ytimg.com/vi/WyYcSFy3uh8/default.jpg)
![Let's Learn VueJS #2 - Vue Instance](https://i.ytimg.com/vi/xKBurk8XTcc/default.jpg)
![Three.js #2 - Build A Bitcoin!](https://i.ytimg.com/vi/X7ClQDZQfwU/default.jpg)
![TypeScript Tutorial #4 - Interfaces](https://i.ytimg.com/vi/a053r9YOX7Y/default.jpg)
![TypeScript Tutorial #2 - Variable Types](https://i.ytimg.com/vi/33omon_8QKE/default.jpg)
![NPM: Publish Your First Package](https://i.ytimg.com/vi/uTQUSJMVGSI/default.jpg)
![Javascript Array filter Explained](https://i.ytimg.com/vi/kMt65BrE1hc/default.jpg)
![TypeScript Tutorial #6 - Generics](https://i.ytimg.com/vi/EVHQ70xXzsI/default.jpg)
![Javascript Array reduce Explained](https://i.ytimg.com/vi/tRDaDZPYcIE/default.jpg)
![Let's Learn VueJS #5 - Computed Properties](https://i.ytimg.com/vi/IY8BFZPAbgk/default.jpg)
![TypeScript Tutorial #1 - Introduction](https://i.ytimg.com/vi/nwVDd6Fca2E/default.jpg)
![JSON Web Tokens (JWT) Explained in 15 Minutes](https://i.ytimg.com/vi/E5gnjCfhLr4/default.jpg)
![JavaScript Data Structures - Arrays](https://i.ytimg.com/vi/bzknBUbLYXs/default.jpg)
![Let's Learn VueJS #1 - Intro](https://i.ytimg.com/vi/Jrtkj6lTsYw/default.jpg)
![My Journey Into Web Development / Software Engineering](https://i.ytimg.com/vi/MbrEHAAoE58/default.jpg)
![JavaScript Data Structures - Sets](https://i.ytimg.com/vi/bFZjTIQIneY/default.jpg)
![JavaScript Data Structures - Stacks](https://i.ytimg.com/vi/wefheMQ5O3c/default.jpg)
![ES6 Rest & Spread Explained Simply](https://i.ytimg.com/vi/WqYk7T7yOXQ/default.jpg)
![Let's Learn VueJS #7 - Form Bindings](https://i.ytimg.com/vi/3W-j4TApOHU/default.jpg)