Frontend Development

Chapter 14
Delivery, Deployment and Team Practice

Certificate in Full stack programming
Frontend Development   •   Certificate

Delivery, Deployment and Team Practice

Introduction

Frontend development does not end when an application works on a developer’s computer. A professional frontend product must be delivered reliably to users, deployed to an appropriate hosting environment, connected to a domain, monitored after release, and maintained by a team. These activities transform source code into a dependable service.

Delivery refers to the activities that prepare and move software toward users. Deployment is the act of installing or publishing a particular version in an environment. Continuous integration and continuous delivery (CI/CD) provide automated controls for building, testing, and releasing software. Team practice provides the human and organizational foundations: requirements, design systems, version control, documentation, review, planning, and responsible decision-making.

A useful principle is that deployment is not a single event. It is a controlled feedback loop:

Frontend delivery feedback loop Plan Build & test Deploy Observe Feedback informs the next change
Frontend delivery feedback loop
Figure: Frontend delivery feedback loop

Figure: Delivery as a repeated plan–build–deploy–observe feedback loop.

Learning Objectives

By the end of this chapter, learners should be able to:

  1. Explain the difference between delivery, deployment, hosting, and release.
  2. Configure a basic frontend deployment using a hosting platform.
  3. Describe environments, environment variables, domains, HTTPS, and deployment strategies.
  4. Design a simple CI/CD pipeline with appropriate quality gates.
  5. Select useful monitoring and security practices for frontend applications.
  6. Apply requirements analysis, design-system principles, agile practices, and technical documentation.
  7. Explain how effort, quality, scope, time, and risk influence professional decisions.

1. From Source Code to a Running Application

A frontend application commonly passes through these stages:

StagePurposeTypical evidence
DevelopmentCreate and test changes locallyLocal build and tests
IntegrationCombine changes safelyPull request and automated checks
StagingValidate a release-like versionPreview URL and acceptance testing
ProductionServe the application to usersPublic URL and monitoring

A build transforms source files into deployable assets. For a modern application this may include transpilation, bundling, tree-shaking, image optimization, and generation of HTML, CSS, and JavaScript files. A deployment places those outputs into an environment. A release makes a version available to its intended audience; deployment and release may occur together, but they are conceptually distinct.

Static frontend applications are often deployed to a content delivery network (CDN). The CDN stores assets at geographically distributed edge locations and serves them close to users. Applications requiring server-side rendering, API routes, authentication services, or persistent data may additionally require a server, serverless functions, or managed backend services.

Hosting choices

Common choices include:

  • Static hosting: suitable for files generated at build time. It is usually simple, scalable, and inexpensive.
  • Platform as a service: supplies builds, deployments, previews, domain management, and logs with limited infrastructure administration.
  • Cloud infrastructure: offers extensive control over networks, servers, containers, storage, and security, but requires greater operational knowledge.
  • Self-managed servers: can provide control and predictable configuration, but the team is responsible for patching, availability, backups, and incident response.

The choice should follow application requirements rather than fashion. Consider rendering model, traffic, data sensitivity, regional availability, cost, team skill, compliance, rollback capability, and vendor dependence.

2. Environments and Configuration

An environment is a controlled context in which an application runs. Development, testing, staging, and production should be sufficiently similar to expose deployment problems, while remaining appropriately isolated.

Configuration includes values that vary between environments, such as an API base URL, analytics identifier, feature flag, or public authentication-client identifier. Secrets include passwords, private tokens, signing keys, and database credentials. Secrets must not be placed in source code or exposed in browser-delivered JavaScript. A value inserted into a frontend bundle should be treated as public because users can inspect downloaded assets.

A sound configuration practice is:

  1. Keep non-secret configuration explicit and documented.
  2. Store secrets in the hosting provider’s secret manager or protected CI/CD variables.
  3. Use separate credentials and services for each environment.
  4. Validate required variables during the build or application startup.
  5. Never commit secret files to version control.
  6. Rotate credentials when exposure is suspected.

Environment names alone do not provide security. A production API must still authenticate requests, authorize actions, validate input, apply rate limits where appropriate, and protect sensitive data.

3. A Practical Deployment Workflow

A basic deployment can be performed as follows:

  1. Create a production build locally and confirm that it succeeds.
  2. Inspect the output and verify that asset paths work when hosted from the intended base URL.
  3. Create a repository and commit the application using meaningful messages.
  4. Connect the repository to a hosting platform.
  5. Select the framework, build command, output directory, and supported runtime version.
  6. Add environment variables through the platform’s protected configuration interface.
  7. Deploy to a preview or staging environment.
  8. Test navigation, forms, accessibility, responsive behavior, performance, and API integration.
  9. Configure the production domain and HTTPS.
  10. Release the approved version and monitor it.

A common deployment failure occurs when client-side routing works locally but fails on direct navigation in production. A single-page application typically needs the host to return the application entry document for routes that are not actual files. The exact rewrite configuration depends on the hosting platform. This requirement should be tested by opening a nested route directly, not merely by clicking links from the home page.

Another frequent issue is a mismatch between build-time and runtime configuration. In many frontend tools, environment variables are substituted during the build. Changing a platform variable may therefore require a new build and deployment.

4. Domains, DNS, and HTTPS

A domain name is a human-readable address mapped to hosting infrastructure through the Domain Name System (DNS). Typical records include:

  • A record: maps a name to an IPv4 address.
  • AAAA record: maps a name to an IPv6 address.
  • CNAME record: maps a name to another hostname.
  • TXT record: stores text used for verification, email policies, or other configuration.

A domain setup normally involves adding the domain to the hosting platform, receiving the required DNS values, updating the authoritative DNS provider, and waiting for records to propagate. DNS caching means that changes may not appear immediately everywhere.

HTTPS encrypts traffic between the browser and the server and authenticates the server through a certificate. Modern managed platforms commonly issue and renew certificates automatically. Teams should redirect HTTP to HTTPS, avoid mixed content, use secure cookies where applicable, and verify that third-party resources also use secure protocols.

Subdomains can separate functions—for example, a public application, documentation site, and API. Naming should be understandable and should not reveal confidential infrastructure details.

5. Continuous Integration and Continuous Delivery

Continuous integration (CI) means that changes are integrated frequently and automatically checked. Continuous delivery means that software remains in a deployable state and can be released through a controlled process. Continuous deployment goes further by automatically releasing every change that passes the pipeline.

A frontend pipeline may contain these stages:

  1. Install dependencies using a lockfile.
  2. Check formatting and linting.
  3. Run unit and component tests.
  4. Build the application.
  5. Run accessibility, security, and dependency checks.
  6. Publish a preview deployment.
  7. Run end-to-end tests against the preview.
  8. Require approval where risk warrants it.
  9. Deploy to production.
  10. Record the commit, version, actor, time, and result.

Quality gates should be meaningful. A pipeline that ignores failed tests creates false confidence; a pipeline that blocks every minor warning may encourage unsafe workarounds. Checks should be fast enough for frequent use, deterministic, and maintained as production code.

A pull request should normally contain a small, reviewable change, a clear description, testing evidence, screenshots where visual behavior changes, and notes about migration or deployment risk. Automated checks do not replace human review: automation finds repeatable problems, while reviewers assess intent, maintainability, usability, and risk.

6. Release and Rollback Strategies

A rolling deployment gradually replaces instances or versions. A blue–green deployment maintains two environments: one serving the current version and one prepared with the candidate version. Traffic can be switched after validation. A canary release exposes a new version to a small audience before wider release. A feature flag separates code deployment from feature exposure, allowing a capability to be enabled, disabled, or limited by user group.

For small static sites, a platform’s previous-deployment rollback may be sufficient. For more complex systems, rollback planning must include database compatibility, cached assets, API versions, and irreversible migrations. A rollback is not a substitute for understanding the cause of failure.

The safest release is reversible, observable, and small. Teams should define who can approve a release, how incidents are declared, where logs are found, and how users are informed.

7. Monitoring and Operational Feedback

Monitoring answers three questions: Is the system available? Is it functioning correctly? Is the user experience acceptable?

Important frontend signals include:

  • JavaScript error rate and error details
  • failed network requests and API latency
  • page-load and interaction performance
  • availability of key routes
  • real-user experience by device and region
  • conversion or task-completion failures
  • deployment and rollback events

Real-user monitoring (RUM) collects performance and error data from actual users. Synthetic monitoring uses scheduled automated checks from selected locations. They complement one another: synthetic checks provide regular controlled evidence, while RUM reveals the diversity of real devices, networks, and user behavior.

Monitoring must respect privacy. Collect only necessary data, avoid passwords and sensitive form values, control access to logs, define retention periods, and obtain consent where required by law or organizational policy. Error reports should be scrubbed so that tokens and personal information are not transmitted.

Alerts should be actionable. An alert should identify a meaningful condition, specify severity, reach the responsible person, and provide a response procedure. Excessive low-value alerts create alert fatigue and may cause serious failures to be ignored.

8. Requirements and Design Systems

Delivery quality begins before coding. A requirement describes a user need, business rule, constraint, or quality expectation. Requirements should be testable and expressed in language understandable to stakeholders and developers.

A user story commonly identifies a role, desired capability, and benefit: “As a customer, I want to save an address so that checkout is faster.” Acceptance criteria define observable conditions under which the story is complete. They should address normal behavior, validation, permissions, loading states, empty states, errors, accessibility, and responsive behavior.

A design system is a shared collection of design principles, tokens, components, patterns, usage guidance, and governance. Tokens may represent color, spacing, typography, radius, and elevation. Components such as buttons, forms, dialogs, and navigation should have documented states and accessibility expectations.

A design system improves consistency and reduces duplicated decisions, but it is not merely a component library. It also requires contribution rules, versioning, ownership, documentation, and a process for handling exceptions. Overly rigid systems can prevent appropriate innovation; uncontrolled variation creates inconsistency and maintenance cost.

9. Agile Team Practice

Agile practice emphasizes incremental delivery, collaboration, feedback, and adaptation. A lightweight workflow may include refinement, planning, implementation, review, testing, release, and retrospective. The purpose of a ceremony is not attendance; it is improved coordination and decision-making.

Useful team habits include:

  • defining a shared “done” standard;
  • limiting work in progress;
  • integrating changes frequently;
  • reviewing code respectfully and specifically;
  • pairing or collaborating on complex work;
  • documenting decisions that future developers must understand;
  • measuring outcomes rather than activity alone.

Version control practices should support traceability. Branch names, commits, pull requests, tags, and release notes should make it possible to identify what changed and why. Commit history should not contain credentials, generated secrets, or misleading descriptions.

Documentation should be close to the work. A project README can explain installation, commands, architecture, environment setup, deployment, and troubleshooting. An operations document should explain monitoring, rollback, ownership, and incident procedures. Decision records are valuable when a choice has significant consequences, such as selecting a rendering strategy or authentication approach.

10. Effort–Quality Trade-offs

Software decisions involve constraints. Increasing testing, accessibility review, documentation, or observability requires effort, but omitting them may create later rework, defects, legal exposure, or user harm. The objective is not maximum ceremony; it is an appropriate level of quality for the risk.

A useful decision process is:

  1. Identify the user and business impact of failure.
  2. Estimate technical and delivery risk.
  3. Identify the minimum acceptable quality level.
  4. Select safeguards proportional to risk.
  5. Record deliberate compromises and revisit them.

For example, a decorative marketing page may need visual review, responsive testing, semantic HTML, and performance checks. A healthcare appointment interface requires stronger privacy, accessibility, auditability, error handling, and security controls. Both are frontend applications, but their risk profiles differ.

Speed and quality are not always opposites. Automated tests, reusable components, clear documentation, and reliable deployment often increase initial effort while reducing repeated effort and failure cost. Technical debt becomes dangerous when it is invisible, accumulates without ownership, or affects critical paths.

11. Security, Ethics, and Governance

Frontend teams share responsibility for secure and ethical delivery. Essential practices include:

  • protecting authentication tokens and session data;
  • escaping or safely rendering untrusted content;
  • using a strong content security policy where practical;
  • validating authorization on the server, not only in the interface;
  • managing dependencies and responding to vulnerabilities;
  • providing keyboard access, readable contrast, labels, and meaningful errors;
  • avoiding deceptive interfaces, hidden costs, and manipulative consent;
  • meeting applicable privacy, accessibility, consumer-protection, and records obligations.

Accessibility is a quality and inclusion requirement, not merely a testing step. Semantic elements, keyboard operation, focus management, text alternatives, sufficient contrast, responsive layouts, and understandable error messages should be designed from the beginning.

AI tools can assist with scaffolding, test generation, documentation drafts, and code explanation. They can also produce insecure, inaccessible, licensed, or factually incorrect output. Teams must review generated code, avoid entering confidential data into unapproved services, check dependencies and licenses, and retain human accountability for decisions.

12. Illustrative Case: Campus Events Portal

Background

A small university team is building a responsive portal where students can browse events, filter by date, and register. The application is a client-rendered frontend hosted on a managed platform and connected to an institutional API.

Problem

The first release works locally but has three weaknesses: direct navigation to an event page returns a not-found error, the API URL is hard-coded, and no one knows whether registration failures affect users in production.

Analysis

The routing error is a hosting configuration problem. The hard-coded URL prevents safe separation between staging and production. The absence of monitoring means that a successful deployment could still produce a poor user outcome.

Approach and solution

The team configures the host to rewrite application routes to the entry document while preserving actual static assets. It moves the API base URL into environment-specific build configuration and uses separate staging and production API credentials. The CI pipeline installs from the lockfile, runs linting and tests, builds the application, and creates a preview deployment for each pull request.

The team adds an end-to-end test that opens a nested event URL directly and completes a registration flow against a test service. Production monitoring records JavaScript exceptions, failed registration requests, and performance by device category. Reports exclude names, email addresses, and registration details unless explicitly required and protected.

A release checklist confirms accessibility review, responsive testing, rollback availability, and domain/HTTPS status. The team documents the deployment process and assigns an owner for alerts.

Outcome

The portal can be tested before release, direct links work, staging and production are separated, and the team can detect registration failures. The additional work delays the first release slightly but reduces operational uncertainty and future troubleshooting effort.

Learning points

The case demonstrates that deployment configuration, environment management, CI/CD, monitoring, and team documentation are interconnected. A technically successful build is not sufficient evidence of a successful product.

Contemporary Developments and Best Practices

Frontend delivery increasingly uses edge networks, server components, automated accessibility testing, preview environments, infrastructure as code, and software supply-chain security controls. These tools can improve delivery, but they also increase complexity. Teams should adopt them when they solve a measured problem and when the team can operate them responsibly.

Current best practices include:

  • keep changes small and reversible;
  • use protected branches and required checks;
  • pin dependency versions and review updates;
  • test production-like behavior in previews;
  • separate public configuration from secrets;
  • monitor user outcomes, not only server status;
  • document ownership and rollback;
  • treat accessibility, privacy, and security as design requirements;
  • review deployment metrics and incidents for learning rather than blame.

Chapter Summary

Professional frontend development includes the complete path from source code to a reliable user experience. Builds create deployable assets; hosting makes them available; domains and HTTPS provide an accessible and secure public address. Development, staging, and production environments should be isolated but sufficiently similar, and secrets must never be exposed in browser code.

CI/CD automates repeatable checks and deployment steps, while human review evaluates intent, usability, maintainability, and risk. Preview deployments, release strategies, rollback plans, monitoring, and privacy-aware observability make delivery safer. Requirements and acceptance criteria establish what should be built, while design systems create shared visual and interaction standards. Agile practices, version control, documentation, and decision records support coordinated teamwork.

Finally, effort and quality must be balanced according to user impact and risk. Accessibility, security, privacy, ethical design, and responsible use of AI are professional obligations. The strongest delivery process is incremental, observable, documented, and reversible.

Key Terms

Deployment: Placing a software version into an environment.

Delivery: The process of preparing and moving software toward users.

Release: Making a deployed version available to its intended audience.

Hosting: Providing infrastructure that serves an application.

CDN: A distributed network that serves cached content close to users.

Environment: A controlled context in which an application runs.

Environment variable: Configuration supplied outside application source code.

Secret: Confidential configuration such as a private token or password.

CI: Continuous integration through frequent merging and automated checks.

Continuous delivery: Keeping software deployable through an automated process.

Continuous deployment: Automatically releasing changes that pass required checks.

Pipeline: Ordered automated stages that build, test, and deploy software.

DNS: The system that maps domain names to network destinations.

HTTPS: Encrypted and authenticated communication using HTTP over TLS.

Rollback: Returning to a previously known version.

Feature flag: A control that separates code deployment from feature exposure.

RUM: Real-user monitoring based on actual user sessions.

Design system: Shared principles, tokens, components, patterns, and guidance.

Technical debt: Future cost created by expedient or incomplete technical choices.

Acceptance criteria: Observable conditions used to determine whether a requirement is satisfied.

Review Questions

Short Answer Questions

  1. Distinguish between deployment and release.
  2. Why must frontend secrets not be placed in browser-delivered code?
  3. State two purposes of a staging environment.
  4. What is the role of HTTPS in a production frontend application?
  5. Give two examples of information that should appear in deployment documentation.

Long Answer Questions

  1. Explain the stages and quality gates in a practical frontend CI/CD pipeline.
  2. Compare static hosting, a platform as a service, and self-managed infrastructure.
  3. Discuss how requirements, acceptance criteria, and design systems improve frontend delivery.
  4. Explain the relationship between monitoring, alerting, rollback, and incident response.
  5. Discuss how a team should balance delivery speed with accessibility, security, testing, and maintainability.

Analytical / Application Questions

  1. A single-page application works when users click links but fails when a nested URL is opened directly. Diagnose the likely cause and propose a deployment solution.
  2. A team wants to expose every build automatically to production, but the application handles sensitive student data. Recommend a release and governance approach, explaining your reasoning.
  3. A production dashboard shows normal availability but users report that registration frequently fails on mobile devices. Identify additional evidence the team should collect and describe an appropriate response plan.

Multiple Choice Questions with Answers

Question 1

Which statement best distinguishes continuous delivery from continuous deployment?

A. Continuous delivery keeps software deployable, while continuous deployment automatically releases qualifying changes.

B. Continuous delivery applies only to databases, while continuous deployment applies only to frontend code.

C. Continuous delivery requires no automated testing, while continuous deployment requires testing.

D. Continuous delivery means deploying manually once per year, while continuous deployment means deploying locally.

Correct Answer: A. Continuous delivery keeps software deployable, while continuous deployment automatically releases qualifying changes.

Question 2

Why should a frontend application use separate staging and production credentials?

A. To make the production bundle larger

B. To prevent testing activities from unintentionally affecting production services

C. To ensure all users see staging data

D. To eliminate the need for authentication

Correct Answer: B. To prevent testing activities from unintentionally affecting production services

Question 3

Which DNS record commonly maps one hostname to another hostname?

A. TXT

B. CNAME

C. AAAA

D. MX

Correct Answer: B. CNAME

Question 4

A client-side route fails only when its URL is opened directly in production. What is the most likely remedy?

A. Remove the route from the application

B. Configure the host to return the application entry document for application routes

C. Disable HTTPS

D. Store the route in a password manager

Correct Answer: B. Configure the host to return the application entry document for application routes

Question 5

What is the main purpose of a preview deployment?

A. To expose unfinished code permanently to all users

B. To provide an environment for reviewing a proposed change before production release

C. To replace version control

D. To hide failed automated tests

Correct Answer: B. To provide an environment for reviewing a proposed change before production release

Question 6

Which practice is appropriate for frontend secrets?

A. Commit them to a private repository and assume they cannot leak

B. Place them in visible HTML comments

C. Store them in protected platform or CI/CD secret configuration and keep them out of client bundles

D. Encode them with Base64 in JavaScript

Correct Answer: C. Store them in protected platform or CI/CD secret configuration and keep them out of client bundles

Question 7

What does real-user monitoring primarily provide?

A. Evidence from actual users’ devices, networks, and sessions

B. A replacement for all unit tests

C. A list of developer salaries

D. A method for changing DNS records

Correct Answer: A. Evidence from actual users’ devices, networks, and sessions

Question 8

Which item is an acceptance criterion?

A. The developer prefers a particular framework

B. The registration form shows a clear error when a required field is empty

C. The project uses a repository

D. The team meets every Monday

Correct Answer: B. The registration form shows a clear error when a required field is empty

Question 9

What is a principal advantage of a feature flag?

A. It guarantees that code contains no defects

B. It separates deploying code from exposing a feature to users

C. It removes the need for monitoring

D. It converts a domain into an IP address

Correct Answer: B. It separates deploying code from exposing a feature to users

Question 10

Which response best reflects proportional quality management?

A. Apply exactly the same controls to every feature regardless of risk

B. Skip accessibility and security checks when delivery is urgent

C. Select safeguards according to user impact, failure risk, and obligations

D. Maximize documentation even when no one can maintain it

Correct Answer: C. Select safeguards according to user impact, failure risk, and obligations

Frontend Development
Chapter 14 of 15