Fundamentals of Web Development

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Randy Connolly and Ricardo Hoar
Edition: 3
Publisher: Pearson Education Inc
Year: 2022

Language: English
Pages: 1081

Front Cover
Half-Title Page
Title Page
Copyright Page
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
Visual Walkthrough
Chapter 1 Introduction to Web Development
1.1 A Complicated Ecosystem
1.2 Definitions and History
1.2.1 A Short History of the Internet
1.2.2 The Birth of the Web
1.2.3 Web Applications in Comparison to Desktop Applications
1.2.4 From Static to Dynamic (and Back to Static)
1.3 The Client-Server Model
1.3.1 The Client
1.3.2 The Server
1.3.3 Server Types
1.3.4 Real-World Server Installations
1.3.5 Cloud Servers
1.4 Where Is the Internet?
1.4.1 From the Computer to Outside the Home
1.4.2 From the Home to the Ocean’s Edge
1.4.3 How the Internet Is Organized Today
1.5 Working in Web Development
1.5.1 Roles and Skills
1.5.2 Types of Web Development Companies
1.6 Chapter Summary
1.6.1 Key Terms
1.6.2 Review Questions
1.6.3 References
Chapter 2 How the Web Works
2.1 Internet Protocols
2.1.1 A Layered Architecture
2.1.2 Link Layer
2.1.3 Internet Layer
2.1.4 Transport Layer
2.1.5 Application Layer
2.2 Domain Name System
2.2.1 Name Levels
2.2.2 Name Registration
2.2.3 Address Resolution
2.3 Uniform Resource Locators
2.3.1 Protocol
2.3.2 Domain
2.3.3 Port
2.3.4 Path
2.3.5 Query String
2.3.6 Fragment
2.4 Hypertext Transfer Protocol
2.4.1 Headers
2.4.2 Request Methods
2.4.3 Response Codes
2.5 Web Browsers
2.5.1 Fetching a Web Page
2.5.2 Browser Rendering
2.5.3 Browser Caching
2.5.4 Browser Features
2.5.5 Browser Extensions
2.6 Web Servers
2.6.1 Operating Systems
2.6.2 Web Server Software
2.6.3 Database Software
2.6.4 Scripting Software
2.7 Chapter Summary
2.7.1 Key Terms
2.7.2 Review Questions
2.7.3 References
Chapter 3 HTML 1: Introduction
3.1 What Is HTML and Where Did It Come From?
3.1.1 XHTML
3.1.2 HTML5
3.2 HTML Syntax
3.2.1 Elements and Attributes
3.2.2 Nesting HTML Elements
3.3 Semantic Markup
3.4 Structure of HTML Documents
3.4.1 DOCTYPE
3.4.2 Head and Body
3.5 Quick Tour of HTML Elements
3.5.1 Headings
3.5.2 Paragraphs and Divisions
3.5.3 Links
3.5.4 URL Relative Referencing
3.5.5 Inline Text Elements
3.5.6 Images
3.5.7 Character Entities
3.5.8 Lists
3.6 HTML5 Semantic Structure Elements
3.6.1 Header and Footer
3.6.2 Navigation
3.6.3 Main
3.6.4 Articles and Sections
3.6.5 Figure and Figure Captions
3.6.6 Aside
3.6.7 Details and Summary
3.6.8 Additional Semantic Elements
3.7 Chapter Summary
3.7.1 Key Terms
3.7.2 Review Questions
3.7.3 Hands-On Projects
Chapter 4 CSS 1: Selectors and Basic Styling
4.1 What Is CSS?
4.1.1 Benefits of CSS
4.1.2 CSS Versions
4.1.3 Browser Adoption
4.2 CSS Syntax
4.2.1 Selectors
4.2.2 Properties
4.2.3 Values
4.3 Location of Styles
4.3.1 Inline Styles
4.3.2 Embedded Style Sheet
4.3.3 External Style Sheet
4.4 Selectors
4.4.1 Element Selectors
4.4.2 Class Selectors
4.4.3 Id Selectors
4.4.4 Attribute Selectors
4.4.5 Pseudo-Element and Pseudo-Class Selectors
4.4.6 Contextual Selectors
4.5 The Cascade: How Styles Interact
4.5.1 Inheritance
4.5.2 Specificity
4.5.3 Location
4.6 The Box Model
4.6.1 Block Versus Inline Elements
4.6.2 Background
4.6.3 Borders and Box Shadow
4.6.4 Margins and Padding
4.6.5 Box Dimensions
4.7 CSS Text Styling
4.7.1 Font Family
4.7.2 Font Sizes
4.7.3 Font Weight
4.7.4 Paragraph Properties
4.8 CSS Frameworks and Variables
4.8.1 What Is a CSS Framework?
4.8.2 CSS Variables
4.9 Chapter Summary
4.9.1 Key Terms
4.9.2 Review Questions
4.9.3 Hands-On Practice
4.9.4 References
Chapter 5 HTML 2: Tables and Forms
5.1 HTML Tables
5.1.1 Basic Table Structure
5.1.2 Spanning Rows and Columns
5.1.3 Additional Table Elements
5.1.4 Using Tables for Layout
5.2 Styling Tables
5.2.1 Table Borders
5.2.2 Boxes and Zebras
5.3 Introducing Forms
5.3.1 Form Structure
5.3.2 How Forms Work
5.3.3 Query Strings
5.3.4 The
Element
5.4 Form Control Elements
5.4.1 Text Input Controls
5.4.2 Choice Controls
5.4.3 Button Controls
5.4.4 Specialized Controls
5.4.5 Date and Time Controls
5.5 Table and Form Accessibility
5.5.1 Accessible Tables
5.5.2 Accessible Forms
5.6 Styling and Designing Forms
5.6.1 Styling Form Elements
5.6.2 Form Design
5.7 Validating User Input
5.7.1 Types of Input Validation
5.7.2 Notifying the User
5.7.3 How to Reduce Validation Errors
5.7.4 Where to Perform Validation
5.8 Chapter Summary
5.8.1 Key Terms
5.8.2 Review Questions
5.8.3 Hands-on Practice
Chapter 6 Web Media
6.1 Representing Digital Images
6.1.1 Image Types
6.1.2 Color Models
6.2 Image Concepts
6.2.1 Color Depth
6.2.2 Image Size
6.2.3 Display Resolution
6.3 File Formats
6.3.1 JPEG
6.3.2 GIF
6.3.3 PNG
6.3.4 SVG
6.3.5 Other Formats
6.4 Audio and Video
6.4.1 Media Concepts
6.4.2 Browser Video Support
6.4.3 Browser Audio Support
6.5 Working with Color
6.5.1 Picking Colors
6.5.2 Define Shades
6.6 Chapter Summary
6.6.1 Key Terms
6.6.2 Review Questions
6.6.3 Hands-on Practice
Chapter 7 CSS 2: Layout
7.1 Older Approaches to CSS Layout
7.1.1 Floating Elements
7.1.2 Positioning Elements
7.1.3 Overlapping and Hiding Elements
7.2 Flexbox Layout
7.2.1 Flex Containers and Flex Items
7.2.2 Use Cases for Flexbox
7.3 Grid Layout
7.3.1 Specifying the Grid Structure
7.3.2 Explicit Grid Placement
7.3.3 Cell Properties
7.3.4 Nested Grids
7.3.5 Grid Areas
7.3.6 Grid and Flexbox Together
7.4 Responsive Design
7.4.1 Setting Viewports
7.4.2 Media Queries
7.4.3 Scaling Images
7.5 CSS Effects
7.5.1 Transforms
7.5.2 Filters
7.5.3 Transitions
7.5.4 Animations
7.6 CSS Preprocessors
7.6.1 The Basics of Sass
7.6.2 Mixins and Functions
7.6.3 Modules
7.7 Chapter Summary
7.7.1 Key Terms
7.7.2 Review Questions
7.7.3 Hands-on Practice
7.7.4 References
Chapter 8 Javascript 1: Language Fundamentals
8.1 What Is Javascript and What Can It Do?
8.1.1 Client-Side Scripting
8.1.2 Javascript’s History
8.1.3 Javascript and Web 2.0
8.1.4 Javascript in Contemporary Software Development
8.2 Where Does Javascript Go?
8.2.1 Inline Javascript
8.2.2 Embedded Javascript
8.2.3 External Javascript
8.2.4 Users Without Javascript
8.3 Variables and Data Types
8.3.1 Javascript Output
8.3.2 Data Types
8.3.3 Built-In Objects
8.3.4 Concatenation
8.4 Conditionals
8.4.1 Truthy and Falsy
8.5 Loops
8.5.1 While and do . . . While Loops
8.5.2 For Loops
8.6 Arrays
8.6.1 Iterating an array using for . . . of
8.6.2 Array Destructuring
8.7 Objects
8.7.1 Object Creation Using Object Literal Notation
8.7.2 Object Creation Using Object Constructor
8.7.3 Object Destructuring
8.7.4 JSON
8.8 Functions
8.8.1 Function Declarations vs. Function Expressions
8.8.2 Nested Functions
8.8.3 Hoisting in Javascript
8.8.4 Callback Functions
8.8.5 Objects and Functions Together
8.8.6 Function Constructors
8.8.7 Arrow Syntax
8.9 Scope and Closures in Javascript
8.9.1 Scope in Javascript
8.9.2 Closures in Javascript
8.10 Chapter Summary
8.10.1 Key Terms
8.10.2 Review Questions
8.10.3 Hands-on Practice
8.10.4 References
Chapter 9 Javascript 2: Using Javascript
9.1 The Document Object Model (DOM)
9.1.1 Nodes and Nodelists
9.1.2 Document Object
9.1.3 Selection Methods
9.1.4 Element Node Object
9.2 Modifying the DOM
9.2.1 Changing an Element’s Style
9.2.2 Innerhtml vs Textcontent vs Dom Manipulation
9.2.3 DOM Manipulation Methods
9.2.4 DOM Timing
9.3 Events
9.3.1 Implementing an Event Handler
9.3.2 Page Loading and the DOM
9.3.3 Event Object
9.3.4 Event Propagation
9.3.5 Event Delegation
9.3.6 Using the Dataset Property
9.4 Event Types
9.4.1 Mouse Events
9.4.2 Keyboard Events
9.4.3 Form Events
9.4.4 Media Events
9.4.5 Frame Events
9.5 Forms in Javascript
9.5.1 Responding to Form Movement Events
9.5.2 Responding to Form Changes Events
9.5.3 Validating a Submitted Form
9.5.4 Submitting Forms
9.6 Regular Expressions
9.6.1 Regular Expression Syntax
9.6.2 Extended Example
9.7 Chapter Summary
9.7.1 Key Terms
9.7.2 Review Questions
9.7.3 Hands-on Practice
9.7.4 References
Chapter 10 Javascript 3: Additional Features
10.1 Array Functions
10.1.1 forEach
10.1.2 Find, Filter, Map, and Reduce
10.1.3 Sort
10.2 Prototypes, Classes, and Modules
10.2.1 Using Prototypes
10.2.2 Classes
10.2.3 Modules
10.3 Asynchronous Coding with Javascript
10.3.1 Fetching Data from a Web API
10.3.2 Promises
10.3.3 Async and Await
10.4 Using Browser APIs
10.4.1 Web Storage API
10.4.2 Web Speech API
10.4.3 Geolocation
10.5 Using External APIs
10.5.1 Google Maps
10.5.2 Charting with Plotly.js
10.6 Chapter Summary
10.6.1 Key Terms
10.6.2 Review Questions
10.6.3 Hands-on Practice
10.6.4 References
Chapter 11 Javascript 4: React
11.1 Javascript Front-End Frameworks
11.1.1 Why Do We Need Frameworks?
11.1.2 React, Angular, and Vue
11.2 Introducing React
11.2.1 React Components
11.3 Props, State, Behavior, and Forms
11.3.1 Props
11.3.2 State
11.3.3 Behaviors
11.3.4 Forms in React
11.3.5 Component Data Flow
11.4 React Build Approach
11.4.1 Build Tools
11.4.2 Create React App
11.4.3 Other React Build Approaches
11.5 React Lifecycle
11.5.1 Fetching Data
11.6 Extending React
11.6.1 Routing
11.6.2 CSS in React
11.6.3 Other Approaches to State
11.7 Chapter Summary
11.7.1 Key Terms
11.7.2 Review Questions
11.7.3 Hands-on Practice
11.7.4 References
Chapter 12 Server-Side Development 1: PHP
12.1 What Is Server-Side Development?
12.1.1 Front End Versus Back End
12.1.2 Common Server-Side Technologies
12.2 PHP Language Fundamentals
12.2.1 PHP Tags
12.2.2 Variables and Data Types
12.2.3 Writing to Output
12.2.4 Concatenation
12.3 Program Control
12.3.1 if . . . else
12.3.2 switch . . . case
12.3.3 while and do . . . while
12.3.4 for
12.3.5 Alternate Syntax for Control Structures
12.3.6 Include Files
12.4 Functions
12.4.1 Function Syntax
12.4.2 Invoking a Function
12.4.3 Parameters
12.4.4 Variable Scope Within Functions
12.5 Arrays
12.5.1 Defining and Accessing an Array
12.5.2 Multidimensional Arrays
12.5.3 Iterating Through an Array
12.5.4 Adding and Deleting Elements
12.6 Classes and Objects
12.6.1 Terminology
12.6.2 Defining Classes
12.6.3 Instantiating Objects
12.6.4 Properties
12.6.5 Constructors
12.6.6 Method
12.6.7 Visibility
12.6.8 Static Members
12.6.9 Inheritance
12.7 $_GET and $_POST Superglobal Arrays
12.7.1 Superglobal Arrays
12.7.2 Determining If Any Data Sent
12.7.3 Accessing Form Array Data
12.7.4 Using Query Strings in Hyperlinks
12.7.5 Sanitizing Query Strings
12.8 Working with the HTTP Header
12.8.1 Redirecting Using Location Header
12.8.2 Setting the Content-Type Header
12.9 Chapter Summary
12.9.1 Key Terms
12.9.2 Review Questions
12.9.3 Hands on Practice
12.9.4 Reference
Chapter 13 Server-Side Development 2: Node.js
13.1 Introducing Node.js
13.1.1 Node Advantages
13.1.2 Node Disadvantages
13.2 First Steps with Node
13.2.1 Simple Node Application
13.2.2 Adding Express
13.2.3 Environment Variables
13.3 Creating an API in Node
13.3.1 Simple API
13.3.2 Adding Routes
13.3.3 Separating Functionality into Modules
13.4 Creating a CRUD API
13.4.1 Passing Data to an API
13.4.2 API Testing Tools
13.5 Working with Web Sockets
13.6 View Engines
13.7 Serverless Approaches
13.7.1 What Is Serverless?
13.7.2 Benefits of Serverless Computing
13.7.3 Serverless Technologies
13.8 Chapter Summary
13.8.1 Key Terms
13.8.2 Review Questions
13.8.3 Hands-on Practice
13.8.4 References
Chapter 14 Working with Databases
14.1 Databases and Web Development
14.1.1 The Role of Databases in Web Development
14.2 Managing Databases
14.2.1 Command-Line Interface
14.2.2 phpMyAdmin
14.2.3 MySQL Workbench
14.2.4 SQLite Tools
14.2.5 MongoDB Tools
14.3 SQL
14.3.1 Database Design
14.3.2 SELECT Statement
14.3.3 INSERT, UPDATE, and DELETE Statements
14.3.4 Transactions
14.3.5 Data Definition Statements
14.3.6 Database Indexes and Efficiency
14.4 Working with SQL in PHP
14.4.1 Connecting to a Database
14.4.2 Handling Connection Errors
14.4.3 Executing the Query
14.4.4 Processing the Query Results
14.4.5 Freeing Resources and Closing Connection
14.4.6 Working with Parameters
14.4.7 Using Transactions
14.4.8 Designing Data Access
14.5 NoSQL Databases
14.5.1 Why (and Why Not) Choose NoSQL?
14.5.2 Types of NoSQL Systems
14.6 Working with MongoDB in Node
14.6.1 MongoDB Features
14.6.2 MongoDB Data Model
14.6.3 Working with the MongoDB Shell
14.6.4 Accessing MongoDB Data in Node.js
14.7 Chapter Summary
14.7.1 Key Terms
14.7.2 Review Questions
14.7.3 Hands-on Practice
14.7.4 References
Chapter 15 Managing State
15.1 The Problem of State in Web Applications
15.2 Passing Information in HTTP
15.2.1 Passing Information via the URL
15.2.2 Passing Information via HTTP Header
15.3 Cookies
15.3.1 How Do Cookies Work?
15.3.2 Using Cookies in PHP
15.3.3 Using Cookies in Node and Express
15.3.4 Persistent Cookie Best Practices
15.4 Session State
15.4.1 How Does Session State Work?
15.4.2 Session Storage and Configuration
15.4.3 Session State in PHP
15.4.4 Session State in Node
15.5 Caching
15.5.1 Page Output Caching
15.5.2 Application Data Caching
15.5.3 Redis as Caching Service
15.6 Chapter Summary
15.6.1 Key Terms
15.6.2 Review Questions
15.6.3 Hands-on Practice
15.6.4 References
Chapter 16 Security
16.1 Security Principles
16.1.1 Information Security
16.1.2 Risk Assessment and Management
16.1.3 Security Policy
16.1.4 Business Continuity
16.1.5 Secure by Design
16.1.6 Social Engineering
16.1.7 Authentication Factors
16.2 Approaches to Web Authentication
16.2.1 Basic HTTP Authentication
16.2.2 Form-Based Authentication
16.2.3 HTTP Token Authentication
16.2.4 Third-Party Authentication
16.3 Cryptography
16.3.1 Substitution Ciphers
16.3.2 Public Key Cryptography
16.3.3 Digital Signatures
16.4 Hypertext Transfer Protocol Secure (HTTPS)
16.4.1 SSL/TLS Handshake
16.4.2 Certificates and Authorities
16.4.3 Migrating to HTTPS
16.5 Security Best Practices
16.5.1 Credential Storage
16.5.2 Monitor Your Systems
16.5.3 Audit and Attack Thyself
16.6 Common Threat Vectors
16.6.1 Brute-Force Attacks
16.6.2 SQL Injection
16.6.3 Cross-Site Scripting (XSS)
16.6.4 Cross-Site Request Forgery (CSRF)
16.6.5 Insecure Direct Object Reference
16.6.6 Denial of Service
16.6.7 Security Misconfiguration
16.7 Chapter Summary
16.7.1 Key Terms
16.7.2 Review Questions
16.7.3 Hands-on Practice
16.7.4 References
Chapter 17 DevOps and Hosting
17.1 DevOps: Development and Operations
17.1.1 Continuous Integration, Delivery, and Deployment
17.1.2 Testing
17.1.3 Infrastructure as Code
17.1.4 Microservice Architecture
17.2 Domain Name Administration
17.2.1 Registering a Domain Name
17.2.2 Updating the Name Servers
17.2.3 DNS Record Types
17.2.4 Reverse DNS
17.3 Web Server Hosting Options
17.3.1 Shared Hosting
17.3.2 Dedicated Hosting
17.3.3 Collocated Hosting
17.3.4 Cloud Hosting
17.4 Virtualization
17.4.1 Server Virtualization
17.4.2 Cloud Virtualization
17.5 Linux and Web Server Configuration
17.5.1 Configuration
17.5.2 Starting and Stopping the Server
17.5.3 Connection Management
17.5.4 Data Compression
17.5.5 Encryption and SSL
17.5.6 Managing File Ownership and Permissions
17.6 Request and Response Management
17.6.1 Managing Multiple Domains on One Web Server
17.6.2 Handling Directory Requests
17.6.3 Responding to File Requests
17.6.4 URL Redirection
17.6.5 Managing Access with .htaccess
17.6.6 Server Caching
17.7 Web Monitoring
17.7.1 Internal Monitoring
17.7.2 External Monitoring
17.8 Chapter Summary
17.8.1 Key Terms
17.8.2 Review Questions
17.8.3 Hands-on Practice
17.8.4 References
Chapter 18 Tools and Traffic
18.1 The History and Anatomy of Search Engines
18.1.1 Search Engine Overview
18.2 Web Crawlers and Scrapers
18.2.1 Scrapers
18.3 Indexing and Reverse Indexing
18.4 PageRank and Result Order
18.5 Search Engine Optimization
18.5.1 Title
18.5.2 Meta Tags
18.5.3 URLs
18.5.4 Site Design
18.5.5 Sitemaps
18.5.6 Anchor Text
18.5.7 Images
18.5.8 Content
18.5.9 Black-Hat SEO
18.6 Social Networks
18.6.1 How Did We Get Here?
18.7 Social Network Integration
18.7.1 Basic Social Media Presence
18.7.2 Facebook’s Social Plugins
18.7.3 Open Graph
18.7.4 Twitter’s Widgets
18.7.5 Advanced Social Network Integration
18.8 Content Management Systems
18.8.1 Components of a Managed Website
18.8.2 Types of CMS
18.9 Wordpress Overview
18.9.1 Post and Page Management
18.9.2 WYSIWYG Editors
18.9.3 Template Management
18.9.4 Menu Control
18.9.5 User Management and Roles
18.9.6 User Roles
18.9.7 Workflow and Version Control
18.9.8 Asset Management
18.9.9 Search
18.9.10 Upgrades and Updates
18.10 WordPress Technical Overview
18.10.1 Installation
18.10.2 File Structure
18.10.3 WordPress Nomenclature
18.10.4 WordPress Template Hierarchy
18.11 Modifying Themes
18.11.1 Changing Theme Files
18.12 Web Advertising Fundamentals
18.12.1 Web Advertising 101
18.12.2 Web Advertising Economy
18.13 Support Tools and Analytics
18.13.1 Search Engine Webmaster Tools
18.13.2 Analytics
18.13.3 Third-Party Analytics
18.13.4 Performance Tuning and Rating
18.14 Chapter Summary
18.14.1 Key Terms
18.14.2 Review Questions
18.14.3 Hands-on Practice
18.14.4 References
Index
Credits