Fundamentals of Web Development, Global Edition

Fundamentals of Web Development, Global Edition

By: Ricardo Hoar (author), Randy Connolly (author)Paperback

Special OrderSpecial Order item not currently available. We'll try and order for you.

Description

Fundamentals of Web Development covers the broad range of topics required for modern web development (both client- and server-side) and is appropriate for students who have taken a CS1 course sequence. The book guides students through the creation of enterprise-quality websites using current development frameworks. It covers the required ACM web development topics in a modern manner closely aligned with best practices in the real world of web development. Teaching and Learning Experience Help students master the fundamentals of web development: A true grasp of web development requires an understanding of both the foundations of the web and current web development practices. Support learning outcomes in various teaching scenarios: This book allows instructors to chart their own unique way through the topics that make up contemporary web development.

Contents

Preface xxxiii Acknowledgments xl Chapter 1 How the Web Works 1 1.1 Definitions and History 2 A Short History of the Internet 2 The Birth of the Web 4 Web Applications in Comparison to Desktop Applications 6 Static Websites versus Dynamic Websites 8 Web 2.0 and Beyond 9 1.2 Internet Protocols 11 A Layered Architecture 12 Link Layer 12 Internet Layer 13 Transport Layer 15 Application Layer 16 1.3 The Client-Server Model 16 The Client 17 The Server 17 The Request-Response Loop 17 The Peer-to-Peer Alternative 18 Server Types 18 Real-World Server Installations 20 1.4 Where Is the Internet? 23 From the Computer to the Local Provider 24 From the Local Provider to the Ocean's Edge 26 Across the Oceans 29 1.5 Domain Name System 30 Name Levels 32 Name Registration 34 Address Resolution 34 1.6 Uniform Resource Locators 38 Protocol 38 Domain 39 Port 39 Path 39 Query String 39 Fragment 39 1.7 Hypertext Transfer Protocol 40 Headers 42 Request Methods 44 Response Codes 45 1.8 Web Servers 46 Operating Systems 47 Web Server Software 47 Database Software 48 Scripting Software 48 1.9 Chapter Summary 48 Key Terms 49 Review Questions 49 References 50 Chapter 2 Introduction to HTML 52 2.1 What Is HTML and Where Did It Come from? 53 XHTML 55 HTML5 57 2.2 HTML Syntax 59 Elements and Attributes 59 Nesting HTML Elements 60 2.3 Semantic Markup 62 2.4 Structure of HTML Documents 64 DOCTYPE 65 Head and Body 66 2.5 Quick Tour of HTML Elements 68 Headings 68 Paragraphs and Divisions 72 Links 72 URL Relative Referencing 74 Inline Text Elements 78 Images 78 Character Entities 79 Lists 80 2.6 HTML5 Semantic Structure Elements 81 Header and Footer 81 Heading Groups 84 Navigation 84 Articles and Sections 85 Figure and Figure Captions 87 Aside 89 2.7 Chapter Summary 89 Key Terms 89 Review Questions 90 Hands-On Practice 90 Chapter 3 Introduction to CSS 95 3.1 What Is CSS? 96 Benefits of CSS 96 CSS Versions 96 Browser Adoption 97 3.2 CSS Syntax 98 Selectors 99 Properties 99 Values 100 3.3 Location of Styles 103 Inline Styles 103 Embedded Style Sheet 104 External Style Sheet 104 3.4 Selectors 105 Element Selectors 106 Class Selectors 106 Id Selectors 107 Attribute Selectors 110 Pseudo-Element and Pseudo-Class Selectors 112 Contextual Selectors 114 3.5 The Cascade: How Styles Interact 116 Inheritance 116 Specificity 116 Location 119 3.6 The Box Model 122 Background 123 Borders 124 Margins and Padding 125 Box Dimensions 128 3.7 CSS Text Styling 134 Font Family 134 Font Sizes 136 Paragraph Properties 138 3.8 Chapter Summary 140 Key Terms 141 Review Questions 141 Hands-On Practice 142 References 147 Chapter 4 HTML Tables and Forms 148 4.1 Introducing Tables 149 Basic Table Structure 149 Spanning Rows and Columns 150 Additional Table Elements 151 Using Tables for Layout 152 4.2 Styling Tables 155 Table Borders 155 Boxes and Zebras 156 4.3 Introducing Forms 158 Form Structure 159 How Forms Work 160 Query Strings 161 The Element 162 4.4 Form Control Elements 163 Text Input Controls 165 Choice Controls 167 Button Controls 169 Specialized Controls 171 Date and Time Controls 172 4.5 Table and Form Accessibility 174 Accessible Tables 175 Accessible Forms 176 4.6 Microformats 177 4.7 Chapter Summary 178 Key Terms 179 Review Questions 179 Hands-On Practice 180 Chapter 5 Advanced CSS: Layout 184 5.1 Normal Flow 185 5.2 Positioning Elements 188 Relative Positioning 188 Absolute Positioning 189 Z-Index 190 Fixed Position 191 5.3 Floating Elements 193 Floating within a Container 193 Floating Multiple Items Side by Side 195 Containing Floats 198 Overlaying and Hiding Elements 199 5.4 Constructing Multicolumn Layouts 203 Using Floats to Create Columns 204 Using Positioning to Create Columns 207 5.5 Approaches to CSS Layout 209 Fixed Layout 210 Liquid Layout 211 Other Layout Approaches 213 5.6 Responsive Design 214 Setting Viewports 215 Media Queries 218 5.7 CSS Frameworks 220 Grid Systems 220 CSS Preprocessors 222 5.8 Chapter Summary 225 Key Terms 225 Review Questions 225 Hands-On Practice 226 Chapter 6 JavaScript: Client-Side Scripting 230 6.1 What Is JavaScript and What Can It Do? 231 Client-Side Scripting 232 JavaScript's History and Uses 235 6.2 JavaScript Design Principles 240 Layers 241 Users without JavaScript 243 Graceful Degradation and Progressive Enhancement 247 6.3 Where Does JavaScript Go? 247 Inline JavaScript 249 Embedded JavaScript 249 External JavaScript 250 Advanced Inclusion of JavaScript 250 6.4 Syntax 251 Variables 252 Comparison Operators 252 Logical Operators 253 Conditionals 253 Loops 254 Functions 255 Errors Using Try and Catch 256 6.5 JavaScript Objects 257 Constructors 257 Properties 258 Objects Included in JavaScript 258 Window Object 261 6.6 The Document Object Model (DOM) 261 Nodes 262 Document Object 263 Element Node Object 265 Modifying a DOM Element 265 Additional Properties 268 6.7 JavaScript Events 268 Inline Event Handler Approach 268 Listener Approach 270 Event Object 271 Event Types 272 6.8 Forms 276 Validating Forms 276 Submitting Forms 278 6.9 Chapter Summary 278 Key Terms 278 Review Questions 279 Hands-On Practice 279 References 282 Chapter 7 Web Media 283 7.1 Digital Representations of Images 284 7.2 Color Models 288 RGB 288 CMYK 289 HSL 291 Opacity 292 Color Relationships 292 7.3 Image Concepts 296 Color Depth 296 Image Size 297 Display Resolution 301 7.4 File Formats 302 JPEG 302 GIF 303 PNG 308 SVG 308 Other Formats 310 7.5 Audio and Video 310 Media Concepts 310 Browser Video Support 312 Browser Audio Support 313 7.6 HTML5 Canvas 315 7.7 Chapter Summary 317 Key Terms 317 Review Questions 317 Hands-On Practice 318 Chapter 8 Introduction to Server-Side Development with PHP 322 8.1 What Is Server-Side Development? 323 Comparing Client and Server Scripts 323 Server-Side Script Resources 323 Comparing Server-Side Technologies 325 8.2 A Web Server's Responsibilities 328 Apache and Linux 329 Apache and PHP 330 PHP Internals 332 Installing Apache, PHP, and MySQL for Local Development 334 8.3 Quick Tour of PHP 336 PHP Tags 336 PHP Comments 337 Variables, Data Types, and Constants 339 Writing to Output 342 8.4 Program Control 346 if . . . else 346 switch . . . case 347 while and do . . . while 348 for 349 Alternate Syntax for Control Structures 349 Include Files 350 8.5 Functions 351 Function Syntax 352 Calling a Function 353 Parameters 353 Variable Scope within Functions 356 8.6 Chapter Summary 358 Key Terms 358 Review Questions 358 Hands-On Practice 359 References 363 Chapter 9 PHP Arrays and Superglobals 364 9.1 Arrays 365 Defining and Accessing an Array 365 Multidimensional Arrays 367 Iterating through an Array 367 Adding and Deleting Elements 369 Array Sorting 371 More Array Operations 372 Superglobal Arrays 373 9.2 $ GET and $ POST Superglobal Arrays 374 Determining If Any Data Sent 375 Accessing Form Array Data 378 Using Query Strings in Hyperlinks 379 Sanitizing Query Strings 380 9.3 $ SERVER Array 382 Server Information Keys 383 Request Header Information Keys 383 9.4 $ FILES Array 385 HTML Required for File Uploads 385 Handling the File Upload in PHP 386 Checking for Errors 388 File Size Restrictions 388 Limiting the Type of File Upload 390 Moving the File 391 9.5 Reading/Writing Files 392 Stream Access 392 In-Memory File Access 393 9.6 Chapter Summary 395 Key Terms 395 Review Questions 395 Hands-On Practice 396 References 401 Chapter 10 PHP Classes and Objects 402 10.1 Object-Oriented Overview 403 Terminology 403 The Unified Modeling Language 403 Differences between Server and Desktop Objects 404 10.2 Classes and Objects in PHP 407 Defining Classes 407 Instantiating Objects 408 Properties 408 Constructors 409 Methods 410 Visibility 412 Static Members 412 Class Constants 414 10.3 Object-Oriented Design 415 Data Encapsulation 415 Inheritance 420 Polymorphism 427 Object Interfaces 429 10.4 Chapter Summary 432 Key Terms 432 Review Questions 433 Hands-On Practice 433 References 435 Chapter 11 Working with Databases 436 11.1 Databases and Web Development 437 The Role of Databases in Web Development 437 Database Design 437 Database Options 443 11.2 SQL 445 SELECT Statement 445 INSERT, UPDATE, and DELETE Statements 447 Transactions 448 Data Definition Statements 453 Database Indexes and Efficiency 453 11.3 Database APIs 454 PHP MySQL APIs 455 Deciding on a Database API 455 11.4 Managing a MySQL Database 456 Command-Line Interface 456 phpMyAdmin 457 MySQL Workbench 459 11.5 Accessing MySQL in PHP 460 Connecting to a Database 460 Handling Connection Errors 462 Executing the Query 464 Processing the Query Results 470 Freeing Resources and Closing Connection 474 Using Transactions 475 11.6 Case Study Schemas 476 Art Database 477 Book CRM Database 477 Travel Photo Sharing Database 478 11.7 Sample Database Techniques 479 Display a List of Links 479 Search and Results Page 480 Editing a Record 484 Saving and Displaying Raw Files in the Database 492 11.8 Chapter Summary 495 Key Terms 496 Review Questions 496 Hands-On Practice 496 References 502 Chapter 12 Error Handling and Validation 503 12.1 What Are Errors and Exceptions? 504 Types of Errors 504 Exceptions 506 12.2 PHP Error Reporting 506 The error reporting Setting 507 The display errors Setting 507 The log error Setting 508 12.3 PHP Error and Exception Handling 509 Procedural Error Handling 509 Object-Oriented Exception Handling 509 Custom Error and Exception Handlers 512 12.4 Regular Expressions 513 Regular Expression Syntax 513 Extended Example 516 12.5 Validating User Input 519 Types of Input Validation 519 Notifying the User 520 How to Reduce Validation Errors 521 12.6 Where to Perform Validation 524 Validation at the JavaScript Level 528 Validation at the PHP Level 531 12.7 Chapter Summary 536 Key Terms 536 Review Questions 537 Hands-On Practice 537 References 540 Chapter 13 Managing State 541 13.1 The Problem of State in Web Applications 542 13.2 Passing Information via Query Strings 544 13.3 Passing Information via the URL Path 546 URL Rewriting in Apache and Linux 546 13.4 Cookies 547 How Do Cookies Work? 548 Using Cookies 550 Persistent Cookie Best Practices 550 13.5 Serialization 552 Application of Serialization 554 13.6 Session State 554 How Does Session State Work? 557 Session Storage and Configuration 558 13.7 HTML5 Web Storage 561 Using Web Storage 561 Why Would We Use Web Storage? 563 13.8 Caching 563 Page Output Caching 565 Application Data Caching 565 13.9 Chapter Summary 567 Key Terms 567 Review Questions 568 Hands-On Practice 568 References 572 Chapter 14 Web Application Design 573 14.1 Real-World Web Software Design 574 Challenges in Designing Web Applications 574 14.2 Principle of Layering 575 What Is a Layer? 575 Consequences of Layering 577 Common Layering Schemes 579 14.3 Software Design Patterns in the Web Context 585 Adapter Pattern 585 Simple Factory Pattern 589 Template Method Pattern 591 Dependency Injection 594 14.4 Data and Domain Patterns 595 Table Data Gateway Pattern 596 Domain Model Pattern 597 Active Record Pattern 601 14.5 Presentation Patterns 604 Model-View-Controller (MVC) Pattern 604 Front Controller Pattern 607 14.6 Chapter Summary 608 Key Terms 608 Review Questions 608 Hands-On Practice 609 References 610 Chapter 15 Advanced JavaScript & jQuery 613 15.1 JavaScript Pseudo-Classes 614 Using Object Literals 614 Emulate Classes through Functions 615 Using Prototypes 617 15.2 jQuery Foundations 619 Including jQuery in Your Page 620 jQuery Selectors 621 jQuery Attributes 624 jQuery Listeners 628 Modifying the DOM 629 15.3 AJAX 633 Making Asynchronous Requests 636 Complete Control over AJAX 642 Cross-Origin Resource Sharing (CORS) 643 15.4 Asynchronous File Transmission 644 Old iframe Workarounds 645 The FormData Interface 646 Appending Files to a POST 648 15.5 Animation 649 Animation Shortcuts 649 Raw Animation 651 15.6 Backbone MVC Frameworks 654 Getting Started with Backbone.js 655 Backbone Models 655 Collections 657 Views 657 15.7 Chapter Summary 660 Key Terms 660 Review Questions 660 Hands-On Practice 661 References 664 Chapter 16 Security 665 16.1 Security Principles 666 Information Security 666 Risk Assessment and Management 667 Security Policy 670 Business Continuity 670 Secure by Design 673 Social Engineering 675 16.2 Authentication 676 Authentication Factors 676 Single-Factor Authentication 677 Multifactor Authentication 677 Third-Party Authentication 678 Authorization 681 16.3 Cryptography 681 Substitution Ciphers 683 Public Key Cryptography 686 Digital Signatures 689 16.4 Hypertext Transfer Protocol Secure (HTTPS) 690 Secure Handshakes 690 Certificates and Authorities 691 16.5 Security Best Practices 694 Data Storage 694 Monitor Your Systems 698 Audit and Attack Thyself 700 16.6 Common Threat Vectors 701 SQL Injection 701 Cross-Site Scripting (XSS) 703 Insecure Direct Object Reference 707 Denial of Service 708 Security Misconfiguration 709 16.7 Chapter Summary 712 Key Terms 713 Review Questions 713 Hands-On Practice 714 References 716 Chapter 17 XML Processing and Web Services 718 17.1 XML Overview 719 Well-Formed XML 719 Valid XML 720 XSLT 723 XPath 725 17.2 XML Processing 727 XML Processing in JavaScript 727 XML Processing in PHP 729 17.3 JSON 734 Using JSON in JavaScript 734 Using JSON in PHP 736 17.4 Overview of Web Services 737 SOAP Services 738 REST Services 740 An Example Web Service 740 Identifying and Authenticating Service Requests 744 17.5 Consuming Web Services in PHP 745 Consuming an XML Web Service 746 Consuming a JSON Web Service 750 17.6 Creating Web Services 756 Creating an XML Web Service 757 Creating a JSON Web Service 764 17.7 Interacting Asynchronously with Web Services 767 Consuming Your Own Service 768 Using Google Maps 769 17.8 Chapter Summary 774 Key Terms 775 Review Questions 775 Hands-On Practice 775 References 780 Chapter 18 Content Management Systems 781 18.1 Managing Websites 782 Components of a Managed Website 782 18.2 Content Management Systems 784 Types of CMS 785 18.3 CMS Components 787 Post and Page Management 787 WYSIWYG Editors 789 Template Management 790 Menu Control 791 User Management and Roles 791 User Roles 792 Workflow and Version Control 794 Asset Management 796 Search 797 Upgrades and Updates 799 18.4 WordPress Technical Overview 800 Installation 800 File Structure 801 WordPress Nomenclature 803 Taxonomies 806 WordPress Template Hierarchy 807 18.5 Modifying Themes 809 Changing Themes in Dashboard 809 Creating a Child Theme (CSS Only) 810 Changing Theme Files 811 18.6 Customizing WordPress Templates 812 WordPress Loop 812 Core WordPress Classes 813 Template Tags 815 Creating a Page Template 817 Post Tags 819 18.7 Creating a Custom Post Type 820 Organization 821 Registering Your Post Type 822 Adding Post-Specific Fields 823 Saving Your Changes 823 Under the Hood 824 Displaying Our Post Type 826 18.8 Writing a Plugin 828 Getting Started 828 Hooks, Actions, and Filters 829 Activate Your Plugin 830 Output of the Plugin 830 Make It a Widget 831 18.9 Chapter Summary 832 Key Terms 833 Review Questions 833 Hands-On Practice 833 References 837 Chapter 19 Web Server Administration 838 19.1 Web Server-Hosting Options 839 Shared Hosting 839 Dedicated Hosting 842 Collocated Hosting 843 Cloud Hosting 844 19.2 Domain and Name Server Administration 845 Registering a Domain Name 846 Updating the Name Servers 848 DNS Record Types 849 Reverse DNS 851 19.3 Linux and Apache Configuration 851 Configuration 853 Daemons 853 Connection Management 855 Data Compression 857 Encryption and SSL 858 Managing File Ownership and Permissions 860 19.4 Apache Request and Response Management 861 Managing Multiple Domains on One Web Server 861 Handling Directory Requests 863 Responding to File Requests 864 URL Redirection 864 Managing Access with .htaccess 868 Server Caching 870 19.5 Web Monitoring and Analytics 872 Internal Monitoring 872 External Monitoring 874 Internal Analytics 874 Third-Party Analytics 875 Third-Party Support Tools 875 19.6 Chapter Summary 877 Key Terms 877 Review Questions 877 Hands-On Practice 878 References 880 Chapter 20 Search Engines 881 20.1 The History and Anatomy of Search Engines 882 Before Google 882 Search Engine Overview 883 20.2 Web Crawlers and Scrapers 885 Robots Exclusion Standard 887 Scrapers 888 20.3 Indexing and Reverse Indexing 889 20.4 PageRank and Result Order 890 20.5 White-Hat Search Engine Optimization 894 Title 894 Meta Tags 895 URLs 896 Site Design 898 Sitemaps 899 Anchor Text 900 Images 901 Content 901 20.6 Black-Hat SEO 902 Content Spamming 902 Link Spam 904 Other Spam Techniques 906 20.7 Chapter Summary 908 Key Terms 908 Review Questions 909 Hands-On Practice 909 References 913 Chapter 21 Social Network Integration 914 21.1 Social Networks 915 How Did We Get Here? 915 Common Characteristics 918 21.2 Social Network Integration 919 Basic Social Media Presence 920 Facebook's Social Plugins 921 Open Graph 926 Google's Plugins 928 Twitter's Widgets 930 Advanced Social Network Integration 933 21.3 Monetizing Your Site with Ads 934 Web Advertising 101 934 Web Advertising Economy 937 21.4 Marketing Campaigns 938 Email Marketing 939 Physical World Marketing 943 21.5 Working in Web Development 945 Types of Web Development Companies 945 Roles and Skills 946 21.6 Chapter Summary 948 Key Terms 948 Review Questions 948 Hands-On Practice 949 References 953 Index 954

Product Details

  • ISBN13: 9781292057095
  • Format: Paperback
  • Number Of Pages: 1024
  • ID: 9781292057095
  • weight: 1550
  • ISBN10: 1292057092

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly

Close