Node.js Design Patterns by Mario Casciaro && Luciano Mammino
Author:Mario Casciaro && Luciano Mammino
Language: eng
Format: epub
Tags: COM051260 - COMPUTERS / Programming Languages / JavaScript, COM060180 - COMPUTERS / Web / Web Services & APIs, COM060160 - COMPUTERS / Web / Web Programming
Publisher: Packt
Published: 2020-07-23T12:39:56+00:00
This is what's happening in the preceding code:
In the constructor, we create an instance variable called data to hold the configuration data. Then we also store formatStrategy, which represents the component that we will use to parse and serialize the data.
We provide two methods, set() and get(), to access the configuration properties using a dotted path notation (for example, property.subProperty) by leveraging a library called object-path (nodejsdp.link/object-path).
The load() and save() methods are where we delegate, respectively, the deserialization and serialization of the data to our strategy. This is where the logic of the Config class is altered based on the formatStrategy passed as an input in the constructor.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Content Management | Programming |
User Experience & Usability | User Generated Content |
Web Design | Web Marketing |
Web Services | Website Analytics |
Hello! Python by Anthony Briggs(9577)
The Mikado Method by Ola Ellnestam Daniel Brolund(9487)
Dependency Injection in .NET by Mark Seemann(9038)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7554)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7280)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6355)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6169)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5618)
Svelte with Test-Driven Development by Daniel Irvine(4982)
Kotlin in Action by Dmitry Jemerov(4811)
Test-Driven Development with PHP 8 by Rainier Sarabia(4594)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(4576)
Audition by Ryu Murakami(4306)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4138)
Web Development with Django by Ben Shaw Saurabh Badhwar(4011)
Functional Programming in JavaScript by Mantyla Dan(3849)
React Application Architecture for Production by Alan Alickovic(3726)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(3238)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(3163)