Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorAdam Scott

No description

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on guide to building one full-stack JavaScript application that runs on the web, desktop, and mobile, using GraphQL, React, React Native, and Electron. Best for developers who know some JavaScript and want a single coherent project to learn cross-platform architecture end to end. 【Book Arc】 - **Opening (~0%–13%)**: Sets up the development environment—editor, terminal, filesystem navigation, and tooling conventions like Prettier and ESLint—so every later project shares a consistent, low-friction workflow. - **Early (~13%–32%)**: Builds the backend: a Node/Express server exposing a GraphQL API with Apollo Server, backed by MongoDB/Mongoose, and evolves it from a "hello world" query into full CRUD for notes. - **Middle (~32%–48%)**: Adds real product concerns—user accounts and authentication, ownership permissions on updates/deletes, favorites, and pagination—turning a demo API into a usable MVP ready to deploy. - **Late (~48%–70%)**: Moves to the client, introducing React and user interfaces, then connecting the web app to the GraphQL API so the front end consumes the same backend. - **Late (~70%–90%)**: Extends the same application to desktop with Electron, covering integration of the existing web app, configuration, content security policy, and packaging/deployment with Electron Builder. - **Ending (~90%–100%)**: Ports the application to mobile with React Native, reusing the shared API and patterns to demonstrate true cross-platform reach. 【Key Takeaways】 - **One app, many platforms** (Early): the book's spine is a single notes application that is progressively deployed as an API, a web app, a desktop app, and a mobile app—teaching reuse over rewrites. - **GraphQL as the contract** (Early): schema-first design with typeDefs and resolvers, plus Apollo Server, lets the same API serve every client; queries, mutations, and arguments are introduced concretely. - **MongoDB fits JavaScript developers** (Early): documents map naturally to JavaScript objects, and Mongoose models handle schema, uniqueness, and timestamps without heavy SQL ceremony. - **Authentication is a layered concern** (Middle): password hashing, tokens passed via an Authorization header, and per-resolver checks (AuthenticationError vs ForbiddenError) show how ownership and permissions are enforced. - **Data operations need guardrails** (Middle): favorites via toggle logic and pagination (offset discussed, with scaling caveats) illustrate how naive "return everything" queries break down as data grows. - **Tooling discipline pays off** (Opening): Prettier and ESLint configured per project keep code consistent and catch quality issues like unused variables and unreachable code early. - **Deployment is part of the build** (Late): hosting the database (e.g., MongoDB Atlas) and packaging desktop apps with Electron Builder, icons, and code signing are treated as first-class steps. - **Cross-platform reuse is the payoff** (Ending): Electron and React Native chapters show how much of the web application's logic and API integration carries over to new targets. 【Reading Tips】 - Deep-read the GraphQL schema/resolver chapters (Early–Middle); they define the patterns reused by every client later. - Skim the environment setup (Opening) if you already have a working editor, terminal, and linter setup—just note the per-project config conventions. - Treat authentication and permissions (Middle) as the hardest conceptual stretch; trace the user context flow from request to resolver before moving on. - When reaching Electron and React Native (Late–Ending), focus on what is reused versus what is platform-specific rather than memorizing every config flag. - Keep the running project open and type the code yourself; this book is a build-along, not a reference to read passively. 【Coverage Limits】 This guide is synthesized from stratified excerpts (front matter, table of contents, and selected chapters); later chapters on React, Electron, and React Native are represented mainly by headings and fragments, so specific implementation details there are not fully covered.
Page 13
ron. . . . . . . . . . . . . . . . . . . . . . . . . . 215 Integrating Our Web Application 215 Warnings and Errors 216 Configuration 218 Content Security Pol...
View in text
Excerpt 2
al, along with Adobe’s Source Code Pro typeface. Conclusion In this chapter we’ve set up a working and flexible JavaScript development environ‐ ment on our c...
View in text
Excerpt 3
ema is now ready to perform CRUD operations. CRUD Resolvers With our schema in place, we can now update our resolvers to either remove or update a note. Let’...
View in text
Excerpt 4
to return the updated doc new: true } } else { // if the user doesn't exist in the list // add them to the list and increment the favoriteCount by 1 return a...
View in text
Excerpt 5
paragraphs red, making the color: green rule obsolete. This is such a simple idea, but it has resulted in dozens of patterns and techniques to aid in avoidin...
View in text
Excerpt 6
mponent, which includes the match property via React Router. This property contains information about how the route path matches the URL. This will give us a...
View in text
Excerpt 7
from our components This will allow us to easily reuse them in our application and is also useful for mocking during testing. 182 | Chapter 16: Create, Read,...
View in text
Excerpt 8
elated to Electron’s security. We will address these before bundling our application for production, but it’s worth exploring now what these warnings are. In...
View in text
Tags
AI categories
JavaScriptWeb TechnologyProgramming
javascript
ISBN: 1492046981
Publisher: O'Reilly Media
Publish Year: 2020
Language: English
Pages: 341
File Format: PDF
File Size: 9.2 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…