𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Web Development Using PHP

✍ Scribed by Connolly, Randy;Hoar, Ricardo


Publisher
Addison-Wesley Professional
Year
2014
Tongue
English
Leaves
1026
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Fundamentals of Web Development,2/ecovers 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, its comprehensive coverage of a modern internet development platform includes HTML5, CSS3, Javascript, and the LAMP stack (that is, Linux, Apache, MySQL, and PHP). Other important technologies covered include jQuery, XML, WordPress, Bootstrap, and a variety of third-party APIs that include Facebook, Twitter, and Google and Bing Maps. Coverage also includes the required ACM web development topics in a modern manner closely aligned with best practices in the real world of web development.

✦ Table of Contents


Cover......Page 1
Title ......Page 5
Copyright......Page 6
Contents......Page 11
Preface......Page 35
Acknowledgments......Page 42
Chapter 1 How the Web Works......Page 47
A Short History of the Internet......Page 48
The Birth of the Web......Page 50
Web Applications in Comparison to Desktop Applications......Page 52
Static Websites versus Dynamic Websites......Page 54
Web 2.0 and Beyond......Page 55
1.2 Internet Protocols......Page 57
Link Layer......Page 58
Internet Layer......Page 59
Transport Layer......Page 61
1.3 The Client-Server Model......Page 62
The Request-Response Loop......Page 63
Server Types......Page 64
Real-World Server Installations......Page 66
1.4 Where Is the Internet?......Page 69
From the Computer to the Local Provider......Page 70
From the Local Provider to the Ocean’s Edge......Page 72
Across the Oceans......Page 75
1.5 Domain Name System......Page 76
Name Levels......Page 78
Address Resolution......Page 80
Protocol......Page 84
Fragment......Page 85
1.7 Hypertext Transfer Protocol......Page 86
Headers......Page 88
Request Methods......Page 90
Response Codes......Page 91
1.8 Web Servers......Page 92
Web Server Software......Page 93
1.9 Chapter Summary......Page 94
Review Questions......Page 95
References......Page 96
Chapter 2 Introduction to HTML......Page 98
2.1 What Is HTML and Where Did It Come from?......Page 99
XHTML......Page 101
HTML5......Page 103
Elements and Attributes......Page 105
Nesting HTML Elements......Page 106
2.3 Semantic Markup......Page 108
2.4 Structure of HTML Documents......Page 110
DOCTYPE......Page 111
Head and Body......Page 112
Headings......Page 114
Links......Page 118
URL Relative Referencing......Page 120
Images......Page 124
Character Entities......Page 125
Lists......Page 126
Header and Footer......Page 127
Navigation......Page 130
Articles and Sections......Page 131
Figure and Figure Captions......Page 133
Key Terms......Page 135
Hands-On Practice......Page 136
Chapter 3 Introduction to CSS......Page 141
CSS Versions......Page 142
Browser Adoption......Page 143
3.2 CSS Syntax......Page 144
Properties......Page 145
Values......Page 146
Inline Styles......Page 149
External Style Sheet......Page 150
3.4 Selectors......Page 151
Class Selectors......Page 152
Id Selectors......Page 153
Attribute Selectors......Page 156
Pseudo-Element and Pseudo-Class Selectors......Page 158
Contextual Selectors......Page 160
Specificity......Page 162
Location......Page 165
3.6 The Box Model......Page 168
Background......Page 169
Borders......Page 170
Margins and Padding......Page 171
Box Dimensions......Page 174
Font Family......Page 180
Font Sizes......Page 182
Paragraph Properties......Page 184
3.8 Chapter Summary......Page 186
Review Questions......Page 187
Hands-On Practice......Page 188
References......Page 193
Chapter 4 HTML Tables and Forms......Page 194
Basic Table Structure......Page 195
Spanning Rows and Columns......Page 196
Additional Table Elements......Page 197
Using Tables for Layout......Page 198
Table Borders......Page 201
Boxes and Zebras......Page 202
4.3 Introducing Forms......Page 204
Form Structure......Page 205
How Forms Work......Page 206
Query Strings......Page 207
The

Element......Page 208
4.4 Form Control Elements......Page 209
Text Input Controls......Page 211
Choice Controls......Page 213
Button Controls......Page 215
Specialized Controls......Page 217
Date and Time Controls......Page 218
4.5 Table and Form Accessibility......Page 220
Accessible Tables......Page 221
Accessible Forms......Page 222
4.6 Microformats......Page 223
4.7 Chapter Summary......Page 224
Review Questions......Page 225
Hands-On Practice......Page 226
Chapter 5 Advanced CSS: Layout......Page 230
5.1 Normal Flow......Page 231
Relative Positioning......Page 234
Absolute Positioning......Page 235
Z-Index......Page 236
Fixed Position......Page 237
Floating within a Container......Page 239
Floating Multiple Items Side by Side......Page 241
Containing Floats......Page 244
Overlaying and Hiding Elements......Page 245
5.4 Constructing Multicolumn Layouts......Page 249
Using Floats to Create Columns......Page 250
Using Positioning to Create Columns......Page 253
5.5 Approaches to CSS Layout......Page 255
Fixed Layout......Page 256
Liquid Layout......Page 257
Other Layout Approaches......Page 259
5.6 Responsive Design......Page 260
Setting Viewports......Page 261
Media Queries......Page 264
Grid Systems......Page 266
CSS Preprocessors......Page 268
Review Questions......Page 271
Hands-On Practice......Page 272
Chapter 6 JavaScript: Client-Side Scripting......Page 276
6.1 What Is JavaScript and What Can It Do?......Page 277
Client-Side Scripting......Page 278
JavaScript’s History and Uses......Page 281
6.2 JavaScript Design Principles......Page 286
Layers......Page 287
Users without JavaScript......Page 289
6.3 Where Does JavaScript Go?......Page 292
Embedded JavaScript......Page 295
Advanced Inclusion of JavaScript......Page 296
6.4 Syntax......Page 297
Comparison Operators......Page 298
Conditionals......Page 299
Loops......Page 300
Functions......Page 301
Errors Using Try and Catch......Page 302
Constructors......Page 303
Objects Included in JavaScript......Page 304
6.6 The Document Object Model (DOM)......Page 307
Nodes......Page 308
Document Object......Page 309
Modifying a DOM Element......Page 311
Inline Event Handler Approach......Page 314
Listener Approach......Page 316
Event Object......Page 317
Event Types......Page 318
Validating Forms......Page 322
Key Terms......Page 324
Hands-On Practice......Page 325
References......Page 328
Chapter 7 Web Media......Page 329
7.1 Digital Representations of Images......Page 330
RGB......Page 334
CMYK......Page 335
HSL......Page 337
Color Relationships......Page 338
Color Depth......Page 342
Image Size......Page 343
Display Resolution......Page 347
JPEG......Page 348
GIF......Page 349
SVG......Page 354
Media Concepts......Page 356
Browser Video Support......Page 358
Browser Audio Support......Page 359
7.6 HTML5 Canvas......Page 361
Review Questions......Page 363
Hands-On Practice......Page 364
Chapter 8 Introduction to Server-Side Development with PHP......Page 368
Server-Side Script Resources......Page 369
Comparing Server-Side Technologies......Page 371
8.2 A Web Server’s Responsibilities......Page 374
Apache and Linux......Page 375
Apache and PHP......Page 376
PHP Internals......Page 378
Installing Apache, PHP, and MySQL for Local Development......Page 380
PHP Tags......Page 382
PHP Comments......Page 383
Variables, Data Types, and Constants......Page 385
Writing to Output......Page 388
if . . . else......Page 392
switch . . . case......Page 393
while and do . . . while......Page 394
Alternate Syntax for Control Structures......Page 395
Include Files......Page 396
8.5 Functions......Page 397
Function Syntax......Page 398
Parameters......Page 399
Variable Scope within Functions......Page 402
Review Questions......Page 404
Hands-On Practice......Page 405
References......Page 409
Chapter 9 PHP Arrays and Superglobals......Page 410
Defining and Accessing an Array......Page 411
Multidimensional Arrays......Page 413
Iterating through an Array......Page 414
Adding and Deleting Elements......Page 416
Array Sorting......Page 417
More Array Operations......Page 418
Superglobal Arrays......Page 419
9.2 $_GET and $_POST Superglobal Arrays......Page 420
Determining If Any Data Sent......Page 421
Accessing Form Array Data......Page 424
Using Query Strings in Hyperlinks......Page 425
Sanitizing Query Strings......Page 426
9.3 $_SERVER Array......Page 428
Request Header Information Keys......Page 429
HTML Required for File Uploads......Page 431
Handling the File Upload in PHP......Page 432
File Size Restrictions......Page 434
Limiting the Type of File Upload......Page 436
Moving the File......Page 437
Stream Access......Page 438
In-Memory File Access......Page 439
Review Questions......Page 441
Hands-On Practice......Page 442
References......Page 447
Chapter 10 PHP Classes and Objects......Page 448
Terminology......Page 449
The Unified Modeling Language......Page 450
Differences between Server and Desktop Objects......Page 451
Defining Classes......Page 453
Constructors......Page 454
Methods......Page 455
Visibility......Page 457
Static Members......Page 458
Class Constants......Page 460
Data Encapsulation......Page 461
Inheritance......Page 466
Polymorphism......Page 473
Object Interfaces......Page 475
Key Terms......Page 478
Hands-On Practice......Page 479
References......Page 481
Chapter 11 Working with Databases......Page 482
Database Design......Page 483
Database Options......Page 489
SELECT Statement......Page 491
Transactions......Page 494
Database Indexes and Efficiency......Page 499
11.3 Database APIs......Page 500
Deciding on a Database API......Page 501
Command-Line Interface......Page 502
phpMyAdmin......Page 503
MySQL Workbench......Page 504
Connecting to a Database......Page 506
Handling Connection Errors......Page 508
Executing the Query......Page 510
Processing the Query Results......Page 516
Freeing Resources and Closing Connection......Page 520
Using Transactions......Page 521
11.6 Case Study Schemas......Page 522
Book CRM Database......Page 523
Travel Photo Sharing Database......Page 524
Display a List of Links......Page 525
Search and Results Page......Page 526
Editing a Record......Page 530
Saving and Displaying Raw Files in the Database......Page 538
11.8 Chapter Summary......Page 541
Hands-On Practice......Page 542
References......Page 548
Chapter 12 Error Handling and Validation......Page 549
Types of Errors......Page 550
12.2 PHP Error Reporting......Page 552
The display_errors Setting......Page 553
The log_error Setting......Page 554
Object-Oriented Exception Handling......Page 555
Custom Error and Exception Handlers......Page 558
Regular Expression Syntax......Page 559
Extended Example......Page 562
Types of Input Validation......Page 565
Notifying the User......Page 566
How to Reduce Validation Errors......Page 567
12.6 Where to Perform Validation......Page 570
Validation at the JavaScript Level......Page 574
Validation at the PHP Level......Page 577
Key Terms......Page 582
Hands-On Practice......Page 583
References......Page 586
Chapter 13 Managing State......Page 587
13.1 The Problem of State in Web Applications......Page 588
13.2 Passing Information via Query Strings......Page 590
URL Rewriting in Apache and Linux......Page 592
13.4 Cookies......Page 593
How Do Cookies Work?......Page 594
Persistent Cookie Best Practices......Page 596
13.5 Serialization......Page 598
13.6 Session State......Page 600
How Does Session State Work?......Page 603
Session Storage and Configuration......Page 604
Using Web Storage......Page 607
13.8 Caching......Page 609
Application Data Caching......Page 611
Key Terms......Page 613
Hands-On Practice......Page 614
References......Page 618
Chapter 14 Web Application Design......Page 619
Challenges in Designing Web Applications......Page 620
What Is a Layer?......Page 621
Consequences of Layering......Page 623
Common Layering Schemes......Page 625
Adapter Pattern......Page 631
Simple Factory Pattern......Page 635
Template Method Pattern......Page 637
Dependency Injection......Page 640
14.4 Data and Domain Patterns......Page 641
Table Data Gateway Pattern......Page 642
Domain Model Pattern......Page 643
Active Record Pattern......Page 647
Model-View-Controller (MVC) Pattern......Page 650
Front Controller Pattern......Page 653
Review Questions......Page 654
Hands-On Practice......Page 655
References......Page 656
Chapter 15 Advanced JavaScript & jQuery......Page 659
Using Object Literals......Page 660
Emulate Classes through Functions......Page 661
Using Prototypes......Page 663
15.2 jQuery Foundations......Page 665
Including jQuery in Your Page......Page 666
jQuery Selectors......Page 667
jQuery Attributes......Page 670
jQuery Listeners......Page 674
Modifying the DOM......Page 675
15.3 AJAX......Page 679
Making Asynchronous Requests......Page 682
Complete Control over AJAX......Page 688
Cross-Origin Resource Sharing (CORS)......Page 689
Old iframe Workarounds......Page 690
The FormData Interface......Page 692
Appending Files to a POST......Page 694
Animation Shortcuts......Page 695
Raw Animation......Page 697
15.6 Backbone MVC Frameworks......Page 700
Backbone Models......Page 701
Views......Page 703
Review Questions......Page 706
Hands-On Practice......Page 707
References......Page 710
Chapter 16 Security......Page 711
Information Security......Page 712
Risk Assessment and Management......Page 713
Business Continuity......Page 716
Secure by Design......Page 719
Social Engineering......Page 721
Authentication Factors......Page 722
Multifactor Authentication......Page 723
Third-Party Authentication......Page 724
Authorization......Page 725
16.3 Cryptography......Page 727
Substitution Ciphers......Page 728
Public Key Cryptography......Page 731
Digital Signatures......Page 734
16.4 Hypertext Transfer Protocol Secure (HTTPS)......Page 735
Secure Handshakes......Page 736
Certificates and Authorities......Page 737
Data Storage......Page 739
Monitor Your Systems......Page 744
Audit and Attack Thyself......Page 746
SQL Injection......Page 747
Cross-Site Scripting (XSS)......Page 749
Insecure Direct Object Reference......Page 753
Denial of Service......Page 754
Security Misconfiguration......Page 755
16.7 Chapter Summary......Page 758
Review Questions......Page 759
Hands-On Practice......Page 760
References......Page 762
Chapter 17 XML Processing and Web Services......Page 764
Well-Formed XML......Page 765
Valid XML......Page 766
XSLT......Page 769
XPath......Page 771
XML Processing in JavaScript......Page 773
XML Processing in PHP......Page 775
17.3 JSON......Page 780
Using JSON in JavaScript......Page 781
Using JSON in PHP......Page 782
17.4 Overview of Web Services......Page 783
SOAP Services......Page 784
An Example Web Service......Page 786
Identifying and Authenticating Service Requests......Page 790
17.5 Consuming Web Services in PHP......Page 791
Consuming an XML Web Service......Page 792
Consuming a JSON Web Service......Page 796
17.6 Creating Web Services......Page 802
Creating an XML Web Service......Page 803
Creating a JSON Web Service......Page 810
Consuming Your Own Service......Page 813
Using Google Maps......Page 815
17.8 Chapter Summary......Page 820
Hands-On Practice......Page 821
References......Page 826
Chapter 18 Content Management Systems......Page 827
Components of a Managed Website......Page 828
18.2 Content Management Systems......Page 830
Types of CMS......Page 831
Post and Page Management......Page 833
WYSIWYG Editors......Page 835
Template Management......Page 836
User Management and Roles......Page 837
User Roles......Page 838
Workflow and Version Control......Page 840
Asset Management......Page 842
Search......Page 843
Upgrades and Updates......Page 845
Installation......Page 846
File Structure......Page 847
WordPress Nomenclature......Page 849
Taxonomies......Page 852
WordPress Template Hierarchy......Page 853
Changing Themes in Dashboard......Page 855
Creating a Child Theme (CSS Only)......Page 856
Changing Theme Files......Page 857
WordPress Loop......Page 858
Core WordPress Classes......Page 859
Template Tags......Page 861
Creating a Page Template......Page 863
Post Tags......Page 865
18.7 Creating a Custom Post Type......Page 866
Organization......Page 867
Registering Your Post Type......Page 868
Saving Your Changes......Page 869
Under the Hood......Page 870
Displaying Our Post Type......Page 872
Getting Started......Page 874
Hooks, Actions, and Filters......Page 875
Output of the Plugin......Page 876
Make It a Widget......Page 877
18.9 Chapter Summary......Page 878
Hands-On Practice......Page 879
References......Page 883
Chapter 19 Web Server Administration......Page 884
Shared Hosting......Page 885
Dedicated Hosting......Page 888
Collocated Hosting......Page 889
Cloud Hosting......Page 890
19.2 Domain and Name Server Administration......Page 891
Registering a Domain Name......Page 892
Updating the Name Servers......Page 894
DNS Record Types......Page 895
19.3 Linux and Apache Configuration......Page 897
Daemons......Page 899
Connection Management......Page 901
Data Compression......Page 903
Encryption and SSL......Page 904
Managing File Ownership and Permissions......Page 906
Managing Multiple Domains on One Web Server......Page 907
Handling Directory Requests......Page 909
URL Redirection......Page 910
Managing Access with .htaccess......Page 914
Server Caching......Page 916
Internal Monitoring......Page 918
Internal Analytics......Page 920
Third-Party Support Tools......Page 921
Review Questions......Page 923
Hands-On Practice......Page 924
References......Page 926
Chapter 20 Search Engines......Page 927
Before Google......Page 928
Search Engine Overview......Page 929
20.2 Web Crawlers and Scrapers......Page 931
Robots Exclusion Standard......Page 933
Scrapers......Page 934
20.3 Indexing and Reverse Indexing......Page 935
20.4 PageRank and Result Order......Page 936
Title......Page 940
Meta Tags......Page 941
URLs......Page 942
Site Design......Page 944
Sitemaps......Page 945
Anchor Text......Page 946
Content......Page 947
Content Spamming......Page 948
Link Spam......Page 950
Other Spam Techniques......Page 952
Key Terms......Page 954
Hands-On Practice......Page 955
References......Page 959
Chapter 21 Social Network Integration......Page 960
How Did We Get Here?......Page 961
Common Characteristics......Page 964
21.2 Social Network Integration......Page 965
Basic Social Media Presence......Page 966
Facebook’s Social Plugins......Page 967
Open Graph......Page 972
Google’s Plugins......Page 974
Twitter’s Widgets......Page 976
Advanced Social Network Integration......Page 979
Web Advertising......Page 980
Web Advertising Economy......Page 983
21.4 Marketing Campaigns......Page 984
Email Marketing......Page 985
Physical World Marketing......Page 989
Types of Web Development Companies......Page 991
Roles and Skills......Page 992
Review Questions......Page 994
Hands-On Practice......Page 995
References......Page 998
A......Page 1000
B......Page 1001
C......Page 1002
D......Page 1004
E......Page 1006
F......Page 1007
H......Page 1008
I......Page 1009
J......Page 1010
L......Page 1011
M......Page 1012
O......Page 1013
P......Page 1014
R......Page 1016
S......Page 1017
T......Page 1019
U......Page 1020
W......Page 1021
Z......Page 1023
Credits......Page 1024

✦ Subjects


Computer Science;Programming;Science


πŸ“œ SIMILAR VOLUMES


Web Application Development with Yii 2 a
✍ Mark Safronov, Jeffrey Winesett πŸ“‚ Library πŸ“… 2014 πŸ› Packt Publishing 🌐 English

Yii is a high performance PHP framework used for rapid web application development. It is well designed, well supported, easy to learn, and easy to maintain. This book embraces the learn-by-example methodology to show you the most important features of the Yii 2 framework. Throughout the course of t

PHP Web Development: Building Dynamic We
✍ Edet, Theophilus πŸ“‚ Library πŸ“… 2023 πŸ› CompreQuest Books 🌐 English

Are you ready to embark on a thrilling journey into the dynamic world of web development? Look no further! "PHP Web Development: Building Dynamic Websites" is your comprehensive guide to mastering PHP and creating captivating, interactive websites that leave a lasting impression. PHP, standing stro

PHP and MySQL Web Development
✍ Luke Welling, Laura Thomson πŸ“‚ Library πŸ“… 2001 πŸ› Sams 🌐 English

This is quite simply, the best computer book I've ever read, and the book I wish I'd had ten years ago when I was just starting with websites. It explains PHP and MySQL and how to create even large and complicated websites clearly and concisely. Its examples are well chosen for both their practica

PHP fast & easy Web development
✍ Julie C. Meloni πŸ“‚ Library πŸ“… 2000 πŸ› Course Technology PTR 🌐 English

PHP is a server-side, HTML embedded scripting language used to create dynamic Web pages. PHP is the number one add on module for Apache servers, and best of all--it's free! This is the only book on PHP that takes a visual approach to learning this topic. As a part of the Fast & Easy Web Development

PHP and MySQL Web development
✍ Luke Welling, Laura Thomson πŸ“‚ Library πŸ“… 2008 πŸ› Addison-Wesley 🌐 English

This is quite simply, the best computer book I've ever read, and the book I wish I'd had ten years ago when I was just starting with websites. It explains PHP and MySQL and how to create even large and complicated websites clearly and concisely. Its examples are well chosen for both their practica