Mastering JavaScript Design Patterns Год издания: 2014 Автор: Simon Timms Издательство: Packt Publishing ISBN: 9781783987986 Язык: Английский Формат: PDF Качество: Изначально компьютерное (eBook) Интерактивное оглавление: Да Количество страниц: 290 Описание: Applying design patterns to JavaScript code creates more reliable and maintainable code. In this book, you will explore different design patterns and learn where and how to implement them with the help of detailed examples. In the first part of the book, we start off with an introduction to design patterns, and then move on to creating classical structures that are used to organize code. Next, we look at the creational, structural, and behavioral patterns. The second part of the book dives into patterns used for functional programming, model view patterns, patterns to build web applications, and messaging patterns. A number of very interesting advanced JavaScript patterns such as dependency injection and live postprocessing are also covered. By the end of this book, you will learn to identify places where a pattern would improve code readability and maintainability.
Примеры страниц
Оглавление
1: Organizing Code Chunks of code What's the matter with global scope anyway? Objects in JavaScript Build me a prototype Inheritance Modules ECMAScript 6 classes and modules Best practices and troubleshooting Summary 2: Creational Patterns Abstract Factory Implementation Builder Factory Method Singleton Prototype Hints and tips Summary 3: Structural Patterns Adapter Bridge Composite Decorator Façade Flyweight Proxy Hints and tips Summary 4: Behavioral Patterns Chain of responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template method Visitor Hints and tips Summary 5: Functional Programming Functional functions are side-effect free Function passing Filters and pipes Accumulators Memoization Immutability Lazy instantiation Hints and tips Summary 6: Model View Patterns First, some history Model View Controller Model View Presenter Model View ViewModel Hints and tips Summary 7: Web Patterns Sending JavaScript Plugins Doing two things at once – multithreading The circuit breaker pattern The promise pattern Hints and tips Summary 8: Messaging Patterns What's a message anyway? Request-reply Publish-subscribe Dead-letter queues Hints and tips Summary 9: Patterns for Testing The testing pyramid Test in the small with unit tests Arrange-Act-Assert Fake objects Monkey patching Interacting with the user interface Build and test tools Hints and tips Summary 10: Advanced Patterns Dependency injection Live postprocessing Aspect-oriented programming Macros Hints and tips Summary 11: ES6 Solutions Today TypeScript Traceur Hints and tips Summary
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum