Embark on an exciting journey into the world of design patterns from a fresh paradigm to revolutionize your JavaScript programs on the web
Key FeaturesExplore various JavaScript design patterns, delving deep into their intricacies, benefits, and best practicesUnravel the decision-making process behind selecting a specific design patternServes as a valuable stepping stone towards advanced topics in web development and JavaScript performanceBook DescriptionJavaScript design patterns are crucial for businesses as they offer structured and reusable solutions to common software development problems, leading to code maintainability, scalability, and efficiency. By following established patterns, businesses can ensure cleaner and more maintainable code, promote team collaboration, reduce errors, and save time and costs.
This book provides a cohesive and comprehensive view of design patterns in modern (ES6+) JavaScript with real-world examples of how to deploy them in a professional setting. We will begin the first part of the book by looking at how to leverage creational, structural, and behavioral design patterns in idiomatic JavaScript. The second part of the book dives into the architecture and UI patterns. Here you will learn how to apply these types of patterns for libraries such as React or Vue and extend it further to general web frontend and micro frontend approaches. The concluding section of the book will introduce and illustrate sets of performance and security patterns including leveraging messaging and events, asset and JavaScript loading strategies and asynchronous programming performance patterns.
Throughout the book, you will get to see React and Next.js examples in addition to JavaScript and Web API examples to demonstrate how different patterns can be leveraged in different web ecosystems.
What you will learnDiscover the classification of creational, structural and behavioralLearn why and when to implement the right of patterns based on the different business scenarios and leverage Reactive View Library patternsimplement multiple frontend architectures while leveraging different rendering approachesRecognize common asynchronous programming performance pitfalls and how to resolve themLeverage event-driven programming in the browser to deliver fast and secure applicationsBoost application performance using asset loading strategies and offloading JavaScript executionWho this book is forThis book is for developers and software architects who want to leverage JavaScript and the web platform to increase productivity, software quality and performance of their applications.
Prior experience with JavaScript and web development is assumed. Some of the more advanced topics in the book will be of interest to developers with intermediate experience building for the web with JavaScript.
Table of ContentsWorking with Creational Design PatternImplementing Structural Design PatternsLeveraging Behavioral Design PatternsExploring Reactive View Library PatternsRendering Strategies and Page HydrationMicro frontends, “zones” and “islands” architecturesAsynchronous programming performance patternsEvent-driven programming patternsLazy-loading, dynamic imports and code-splittingAsset loading strategies and executing code off the main thread