JavaScript (eBook)
196 Seiten
Azhar Sario Hungary (Verlag)
978-3-384-75881-1 (ISBN)
JavaScript: Software Development (2025-2026 Edition) - The only book that actually teaches like MIT, Stanford, CMU, and Berkeley combined.
This is not another recycled tutorial.
You start with why JavaScript runs the world in 2025 - V8, TC39, TypeScript tsunami, Vite revolution.
You master the event loop before lunch, closures before dinner, and ECMAScript 2025 features before anyone else.
You go vanilla DOM first (yes, really), then React hooks, then React Query, Zustand, Next.js, server actions, edge functions.
You build real REST APIs, GraphQL, WebSockets, microservices, Docker, CI/CD, Vercel + AWS deployments.
You learn testing the way CMU and Berkeley teach it - pyramid, Jest, RTL, Cypress, zero excuses.
You finish with WebAssembly, WebGPU, TensorFlow.js, LLM streaming, and AI agents - because 2025 developers ship AI products, not just CRUD apps.
Every chapter ends with real 2024-2025 company case studies - Slack's million WebSocket connections, Shopify's 30% faster admin, Figma's no-downtime Next.js migration, Netflix microservices, Figma's Wasm engine.
You don't just read theory; you see exactly how the best engineering teams on the planet solved the same problems you will face on Monday morning.
Most JavaScript books are already outdated the day they print.
This one was built by reverse-engineering the actual 2024-2025 curricula of the four best CS programs in the world, then updated with the bleeding-edge reality of 2025 production systems.
No filler projects. No 2018 Create-React-App. No pretending Redux is still the default.
Just the book that finally matches what FAANG and top startups actually hire for right now.
Ready to stop learning 'JavaScript' and start thinking like the engineers who get $300k+ offers?
© 2025 Azhar ul Haque Sario. This book is independently produced with no affiliation to MIT, Stanford, Carnegie Mellon, UC Berkeley, or any institution mentioned. All university course references are nominative fair use for factual comparison and educational critique.
Part 2: Client-Side Software Engineering
The Browser Environment and Document Object Model (DOM)
4.1. The Browser as a Platform: APIs, Storage, and Security
The Misconception of the "Viewer"
For a long time, many beginners—and even some intermediate developers—viewed the web browser simply as a document viewer. You give it an HTML file, and it paints it on the screen. However, if you look at the curriculum of MIT 6.4500 or Stanford CS142, you quickly realize this is a dangerous oversimplification.
In 2025, the browser is not a viewer; it is a fully-fledged operating system. It has its own file system access, its own network layer, and a rigid security model. If you treat it like a PDF reader, you will build insecure software.
The Security Foundation: Same-Origin Policy (SOP)
The absolute bedrock of web security is the Same-Origin Policy (SOP). Imagine living in an apartment complex. You have a key to your apartment (your "origin"). The SOP is the rule that says your key cannot open your neighbor's door, nor can your neighbor's key open yours.
Technically, an "origin" is defined by three things: the Protocol (https), the Host (https://www.google.com/search?q=google.com), and the Port (443). If any one of these differs, the browser erects a wall. Without this, a malicious script on evil-site.com could simply read the emails open in your gmail.com tab.
Client-Side Storage: A Practical Guide to "Where to Put Data"
One of the most common debates in engineering teams is state management. "Where do we store the data?" In 2025, we have clear, distinct lanes for this, and mixing them up is a security vulnerability waiting to happen.
Local Storage: This is like a persistent locker. It stays there until you delete it. It is perfect for non-sensitive UI preferences.
Example: If a user toggles "Dark Mode" or minimizes a specific dashboard widget, save that boolean value here. If an attacker steals this via Cross-Site Scripting (XSS), the worst thing that happens is the user's theme changes.
Session Storage: This is temporary. It dies when the tab closes.
Example: This is great for multi-step form data (e.g., an airline checkout flow) where you want the data to vanish if the user rage-quits the page.
Cookies (The Security Critical Layer): This is where authentication lives.
The Stanford "Cookie Management" Approach
In Stanford's CS142 projects, students often face the harsh reality of session management. Here is the standard for 2025 that separates junior developers from seniors: Never store JSON Web Tokens (JWTs) or session IDs in LocalStorage.
If you store a session token in LocalStorage, any JavaScript running on your page (including that third-party analytics script you didn't audit) can read it. Instead, we use HttpOnly Cookies.
When a user logs in via the fetch API, the server should respond with a Set-Cookie header. You must configure this cookie with three specific flags:
HttpOnly: This makes the cookie invisible to JavaScript. document.cookie returns nothing. This neutralizes XSS attacks regarding auth theft.
Secure: The cookie is only sent over encrypted HTTPS connections.
SameSite: This helps prevent Cross-Site Request Forgery (CSRF) by telling the browser not to send the cookie if the request comes from an external site.
The Network Layer: The Fetch API
Gone are the days of the clunky XMLHttpRequest. The Fetch API is the modern standard, using "Promises" to handle the asynchronous nature of the web.
Real-World Scenario: When you load a user profile, the browser doesn't freeze. You fire a fetch request. While that request travels across the ocean to a data center, the browser continues rendering the rest of the page. When the data returns (as a JSON object), the Promise resolves, and you update the UI. This non-blocking behavior is what makes the web feel fluid.
4.2. DOM Manipulation: The "Vanilla" JavaScript Approach
Why We Start "Naked"
There is a reason top universities and bootcamps force you to write "Vanilla" (plain) JavaScript before touching React, Vue, or Angular. React is an abstraction. It is a layer of paint over the raw machinery of the Document Object Model (DOM). If you don't understand the machinery, you cannot fix it when the abstraction leaks.
The DOM Tree
The DOM is a tree structure. The "Root" is the document. Every tag—<div>, <p>, <span>—is a node (branch or leaf) on that tree.
Traversal and Selection To change something, you first have to find it. We use document.querySelector() for this. It uses the same syntax as CSS.
Example: document.querySelector('.submit-btn') finds the first element with the class submit-btn. This is the digital equivalent of pointing your finger at a specific item on a shelf.
Manipulation: The CRUD of the DOM Once you have the element, you perform operations. This is often taught through the classic "To-Do List" Project, a staple in curriculums like Berkeley CS198 and Stanford CS142.
Create: You use document.createElement('li') to conjure a new list item into existence in memory. It isn't visible yet; it's just a floating object.
Update: You add text: newItem.textContent = "Buy Milk".
Read/Append: You must attach it to the DOM tree to make it visible: list.appendChild(newItem).
Delete: You use newItem.remove() to detach it from the tree.
Event Propagation: Bubbling vs. Capturing
This is the concept that trips up 90% of new developers during interviews. When you click a button inside a div, inside a section, inside the body, you aren't just clicking the button. You are clicking all of them.
Bubbling: Imagine blowing a bubble underwater. It floats up to the surface. When an event happens, it starts at the target (the button) and "bubbles up" to the parents. This allows for a powerful pattern called Event Delegation.
Practical Application: Instead of adding 100 event listeners to 100 items in your To-Do list (which eats up memory), you add one listener to the parent <ul>. When a user clicks an item, the event bubbles up to the <ul>, and you check event.target to see which item was actually clicked. This is an optimization technique used in high-performance applications.
Real-Time Case Study: Wingify's VWO Editor (2024)
Wingify, the company behind VWO (a massive A/B testing platform), provided a fascinating case study in 2024 regarding this. They built a visual editor that allows marketing teams to change the text or color of a website without coding.
While the customers use a GUI, the underlying engine uses aggressive, raw DOM manipulation. They inject a script that must traverse the client's website DOM, identify elements despite dynamic class names, and force style changes. They found that frameworks like React were too heavy and opinionated for this specific task. They had to use pure, vanilla JavaScript to ensure their editor worked on any website, regardless of whether that site was built with WordPress, React, or raw HTML. This proves that "Framework Interoperability"—the ability to write code that works outside of a framework—is a critical, high-level job skill.
4.3. Modern Browser APIs: Building Richer Applications
Closing the Gap with Native Apps
For years, "Native" mobile apps (iOS/Android) were superior to web apps because they could work offline and had push notifications. In subtopic 4.3, we explore how the browser has closed this gap. The browser is now a "platform" capable of running near-native software.
WebSockets: True Real-Time Communication
Before WebSockets, if you wanted to check for new messages in a chat app, you had to use "Polling." This is like a child in the backseat asking, "Are we there yet?" every 3 seconds. It wastes battery and bandwidth.
WebSockets changed this. It opens a permanent, two-way tunnel between the client and the server.
The Analogy: It is like a telephone call. The line stays open. Neither party has to dial again; they just speak.
Application: In a 2025 chat application, when User A types a message, the server pushes it down the WebSocket pipe to User B instantly. No polling required.
Service Workers and PWAs (Progressive Web Apps)
A Service Worker is a script that your browser runs in the background, separate from a web page. It is the "air traffic controller" of the browser.
Offline Functionality: When you visit a site, the Service Worker can cache the HTML, CSS, and JS files. If you lose your internet connection (common on subways or airplanes), the Service Worker intercepts the network request. Seeing you are offline, it serves the cached files instead of a "No Internet" dinosaur...
| Erscheint lt. Verlag | 19.11.2025 |
|---|---|
| Reihe/Serie | Software Development |
| Sprache | englisch |
| Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
| Schlagworte | AI powered JavaScript • full stack javascript • JavaScript 2025 • Microservices • modern javascript • Software engineering • Web Development 2025 |
| ISBN-10 | 3-384-75881-1 / 3384758811 |
| ISBN-13 | 978-3-384-75881-1 / 9783384758811 |
| Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
| Haben Sie eine Frage zum Produkt? |
Digital Rights Management: ohne DRM
Dieses eBook enthält kein DRM oder Kopierschutz. Eine Weitergabe an Dritte ist jedoch rechtlich nicht zulässig, weil Sie beim Kauf nur die Rechte an der persönlichen Nutzung erwerben.
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür die kostenlose Software Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür eine kostenlose App.
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich