Book description
Learn how a frontend web framework works by coding your own!Web developers use frontend frameworks every day—but do you know how these essential parts of your stack really work? Build a Frontend Web Framework (From Scratch) reveals the inner workings of web frameworks by helping you create your very own.
In Build a Frontend Web Framework (From Scratch), you’ll learn the secrets behind frameworks like React, Vue, and Angular, including:
- Create HTML documents programmatically
- Define the view with virtual DOM
- Update the HTML efficiently with reconciliation algorithms
- Create two-way communication mechanisms between components in a hierarchy
Whatever your experience level, you’ll be able to start building your framework with this guide. All you need is some core skills in HTML, CSS, and JavaScript. And once you’ve learned how frameworks function, you’ll be able to work with them more efficiently, troubleshoot bugs more effectively, and even customize them for your specific needs!
About the Technology
You use frontend frameworks every day, but do you really know what’s going on behind the API? Building your own framework is a great way to learn how they interact with the DOM, generate page views, route data between components, and communicate with the underlying operating system. With this interesting and entertaining book, you’ll build your own web framework step-by-step in JavaScript, ready to share with the world as an NPM package!
About the Book
Build a Frontend Web Framework (From Scratch) guides you through a simple component-based frontend framework that borrows from React, Svelte, Angular, and other familiar tools. You’ll learn how a modern framework operates by adding features like component state and lifecycle management, a virtual DOM, and reconciliation algorithms to update the HTML efficiently. You’ll appreciate how each critical concept is broken down into easy-to-digest chunks and explained with engaging graphics.
What's Inside
- Create HTML documents programmatically
- Define the view with the virtual DOM
- Implement a component lifecycle scheduler
About the Reader
For web developers familiar with JavaScript and Node.
About the Author
Angel Sola Orbaiceta has worked in the software industry for over a decade, creating software for the cloud, macOS, and Windows desktop applications.
Quotes
If you’re looking for a project to really explore JavaScript and web technology—this book might be just the thing. It delivers an excellent overview of the nuts and bolts.
- Eric Elliott, Engineering Manager, Adobe
You will understand and learn how to create a framework, better master your current framework, and become an even more qualified professional. Prepare your environment and enjoy the reading!
- Mayk Brito, Chief Content Officer, Rocketseat
Extraordinarily educational and fascinating. The best path to understanding how frameworks work under the hood.
- Rod Weis, CodeTheWeb.ca
Table of contents
- copyright
- contents
- Build a Frontend Web Framework (From Scratch)
- dedication
- preface
- acknowledgments
- about this book
- about the author
- about the cover illustration
- Part 1 No framework
- 1 Are frontend frameworks magic to you?
- 2 Vanilla JavaScript—like in the old days
- Part 2 A basic framework
- 3 Rendering and the virtual DOM
- 4 Mounting and destroying the virtual DOM
- 5 State management and the application’s lifecycle
- 6 Publishing and using your framework’s first version
- 7 The reconciliation algorithm: Diffing virtual trees
- 8 The reconciliation algorithm: Patching the DOM
- Part 3 Improving the framework
- 9 Stateful components
- 10 Component methods
- 11 Subcomponents: Communication via props and events
- 12 Keyed lists
- 13 The component lifecycle hooks and the scheduler
- 14 Testing asynchronous components
-
appendix Setting up the project
- A.1 Where to find the source code
- A.2 Solutions to the exercises
- A.3 Advanced topics
- A.4 Note on the technologies used
- A.5 Read the docs
- A.6 Structure of the project
- A.7 Finding a name for your framework
- A.8 Option A: Using the CLI tool
- A.9 Option B: Configuring the project from scratch
- A.10 Publishing your framework to NPM
- A.11 Using a CDN to import the framework
Product information
- Title: Build a Frontend Web Framework (From Scratch)
- Author(s):
- Release date: May 2024
- Publisher(s): Manning Publications
- ISBN: 9781633438064
You might also like
video
Java SE 17 Developer (1Z0-829)
21+ Hours of Video Instruction An intensive and guided video course to learn and practice while …
video
The Complete Java Developer Course: From Beginner to Master
Be it websites, mobile apps, or desktop software, Java remains one of the most popular programming …
video
React - The Complete Guide (Includes Hooks, React Router, and Redux) - Second Edition
**This course is now updated for React 18** Starting with an introduction to React concepts, you …
book
Node.js Design Patterns - Third Edition
Learn proven patterns, techniques, and tricks to take full advantage of the Node.js platform. Master well-known …