Title:
Web application design and implementation : APACHE 2, PHP5, MySQL, JavaScript, and Linux/Unix
Personal Author:
Series:
Quantitative software engineering series
Publication Information:
Hoboken, NJ : Wiley-Interscience, 2007
ISBN:
9780471773917
Added Corporate Author:
Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010125932 | TK5105.8883 G32 2007 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
Web Application Design and Implementation uses a hands-on approach of the major technologies and programming languages to teach readers web development. Providing an understanding of all major aspects of web programming in order to achieve the construction of a database-driven website, the book features state-of-the-art programming languages such as HTML, JavaScript, MySQL, PHP, Apache, Linux/Unix.
Author Notes
STEVEN A. GABARRÓ , MSc, is a member of the faculty at Stevens Institute of Technology. He created the first Web programming course at Stevens in 2003, a course which is now considered one of the most instructive computer science elective courses by students and fellow faculty. The success of the course became the drive to create this book.
Table of Contents
Preface | p. xiii |
About the Author | p. xiii |
Before We Get Started | p. xiii |
Who Should Read This Book? | p. xiv |
About the Examples | p. xiv |
How to Read This Book | p. xiv |
Acknowledgments | p. xv |
Introduction: Web Application Recipe | p. 1 |
Overview | p. 1 |
Procedure | p. 1 |
Step 1 Understanding the Problem and Finding the Solution | p. 1 |
Step 2 Designing the Database | p. 2 |
Step 3 Major Functionalities | p. 2 |
Step 4 Backside | p. 2 |
Step 5 Improvements on Functionality | p. 2 |
Step 6 Improvements on Looks | p. 3 |
Step 7 Thorough Testing, Hacking Attempts | p. 3 |
Step 8 Presentation | p. 3 |
Step 9 Publication | p. 3 |
Step 10 Celebration (and Maintenance) | p. 4 |
1 Fundamentals | p. 5 |
The Origins of the Internet | p. 5 |
The World Wide Web | p. 6 |
The Web Browsers | p. 7 |
The Web Servers | p. 7 |
TCP/IP Basics | p. 8 |
The Internet Layer | p. 9 |
The Transport Layer | p. 11 |
The Application Layer | p. 11 |
The Toolbox | p. 12 |
Browsers | p. 12 |
FTP | p. 13 |
Email Clients | p. 14 |
Programming Tools | p. 14 |
Other Useful Tools | p. 15 |
2 The Different Approaches of Web Programming | p. 17 |
Before We Get Started | p. 17 |
The Basics-HTML | p. 17 |
The Creator-SGML | p. 18 |
Other SGML-Based Languages-XML and XSL | p. 19 |
The Good Old Java | p. 20 |
Something Different-JavaScript | p. 21 |
The Savior-PHP | p. 22 |
The Rival-ASP.NET | p. 22 |
The Myth-CGI | p. 23 |
Another Big Option-Perl | p. 23 |
The Future?-C# | p. 24 |
Client-Side versus Server-Side-Which Side to Pick? | p. 24 |
My Choices-PHP, MySQL, JavaScript | p. 25 |
3 Introduction to HTML | p. 27 |
What Do You Need to Get Started? | p. 27 |
How Does HTML Work? | p. 28 |
Syntax Basics | p. 28 |
File Structure | p. 28 |
Tag Parameters | p. 30 |
Basic Text Formatting | p. 30 |
External References | p. 32 |
Links | p. 32 |
Images | p. 33 |
Organizing Data | p. 34 |
Lists | p. 35 |
Tables | p. 36 |
Frames | p. 39 |
Special Characters | p. 43 |
4 Work Environment | p. 45 |
Introduction | p. 45 |
Downloading the Software | p. 45 |
Installing the Apache Server | p. 46 |
Installation Steps | p. 46 |
Checking the Installation | p. 47 |
Possible Errors | p. 47 |
Configuring Apache | p. 48 |
Installing PHP5 | p. 48 |
Testing PHP | p. 50 |
Installing MySQL | p. 50 |
Adding a MySQL User | p. 51 |
How Do I Know if MySQL is Running? | p. 51 |
Installing PhpMyAdmin | p. 51 |
Installing a Bulletin Board: phpBB | p. 52 |
Installation Steps | p. 52 |
Basic Security Considerations | p. 54 |
Conclusion | p. 55 |
5 PHP-A Server-Side Scripting Language | p. 57 |
How Does It Work? | p. 57 |
Some "New" Words on PHP | p. 57 |
Syntax Generalities | p. 58 |
Instructions | p. 58 |
Operators | p. 61 |
Mathematical Functions | p. 61 |
Data Types | p. 63 |
Constants | p. 64 |
Variables | p. 65 |
6 PHP Arrays and Flow of Control | p. 69 |
Arrays | p. 69 |
Basic Arrays | p. 69 |
Associative Arrays | p. 70 |
Multidimensional Arrays | p. 71 |
Array Functions | p. 74 |
PHP Program Structure and Flow of Control | p. 77 |
Conditions | p. 77 |
Loops | p. 80 |
Functions | p. 82 |
7 Using Files, Folders, and Strings in PHP | p. 85 |
Using Files | p. 85 |
Folder Manipulation | p. 89 |
Basic String Manipulation | p. 90 |
Changing a String | p. 90 |
Finding and Comparing | p. 93 |
Formatting Strings | p. 94 |
Manipulating HTML Files | p. 95 |
PHP Information Functions | p. 96 |
Closing Remarks | p. 97 |
Writing a Basic File Explorer | p. 97 |
Requirements | p. 97 |
Hints | p. 98 |
Case Study: An Indexer/Searcher-Step 1 | p. 98 |
Overview | p. 98 |
The Indexer-Step 1 | p. 99 |
8 PHP5 and Object-Oriented Programming | p. 101 |
Overview | p. 101 |
Classes and Objects | p. 101 |
Classes in PHP | p. 102 |
Constructors and Destructors | p. 103 |
Visibility | p. 104 |
The Scope Resolution Operator | p. 105 |
The Static Keyword | p. 105 |
Class Constants | p. 106 |
Class Abstraction | p. 106 |
Object Interfaces | p. 106 |
Copying and Cloning Objects | p. 107 |
Comparing Objects | p. 108 |
Type Hinting | p. 109 |
Exceptions | p. 109 |
Final Words | p. 110 |
9 Creating Some Interactivity | p. 111 |
Overview | p. 111 |
Forms | p. 111 |
Writing a Form in HTML | p. 111 |
Get versus Post | p. 115 |
Retrieving the Form Information on a PHP Script | p. 115 |
Dynamically Creating Forms | p. 116 |
Transferring Data Between PHP Scripts | p. 117 |
Cookies | p. 117 |
Sessions | p. 120 |
One Last Useful Function and Design Techniques | p. 122 |
Assignments | p. 123 |
File Explorer-Step 2 | p. 123 |
Case Study: Indexer/Searcher-Step 2 | p. 124 |
10 Making Cleaner Code and Output | p. 127 |
Cleaning Up Your Code | p. 127 |
What You Need | p. 127 |
How to Use It?-HTML Side | p. 128 |
How to Use It?-PHP Side | p. 128 |
Cleaning Up Your Output | p. 131 |
The CSS File | p. 132 |
Useful Tools | p. 134 |
Assignment | p. 135 |
11 Using Databases | p. 137 |
Overview | p. 137 |
Database Basics | p. 137 |
The Entity Relationship Model | p. 137 |
More Practical Examples | p. 138 |
Typical Sources of Error | p. 139 |
Simplifying the Diagrams | p. 140 |
Using MySQL | p. 140 |
MySQL Syntax | p. 141 |
Data Types | p. 142 |
MySQL Numeric Data Types | p. 142 |
Date and Time Data Types | p. 143 |
String Data Types | p. 144 |
MySQL Operators | p. 144 |
MySQL Instructions | p. 145 |
Using Functions in MySQL | p. 150 |
12 Using PhpMyAdmin | p. 151 |
Overview | p. 151 |
Creating a Database | p. 151 |
Creating Tables | p. 152 |
Accessing an Existing Table | p. 154 |
Exporting/Importing a Database Structure and Content | p. 154 |
Assignment-Final Project | p. 157 |
13 Creating Database-Driven Websites with PHP/MySQL | p. 159 |
Overview | p. 159 |
Connecting to Your MySQL Server with PHP | p. 159 |
Submitting SQL Queries | p. 160 |
Processing the Results of a Query | p. 161 |
Example of Login Procedure | p. 162 |
Other Useful Functions | p. 163 |
Grouping Our Methods in a Class | p. 164 |
Indexer/Searcher-Steps 3 and 4 | p. 168 |
14 JavaScript-A Client-Side Scripting Language | p. 171 |
Introduction | p. 171 |
JavaScript Syntax | p. 173 |
Types of Data and Variables | p. 173 |
Operations and Calculations | p. 173 |
Arrays | p. 175 |
Decisions | p. 176 |
Loops | p. 176 |
Using Functions | p. 177 |
Using Objects | p. 178 |
The String Objects | p. 178 |
The Math Class | p. 179 |
The Array Objects | p. 181 |
The Date Objects | p. 181 |
15 Programming the Browser | p. 185 |
Overview | p. 185 |
The Window Object | p. 185 |
The Location Object | p. 186 |
The History Object | p. 186 |
The Navigator Object | p. 186 |
The Screen Object | p. 187 |
The Document Object | p. 187 |
Using Events | p. 191 |
Timers | p. 194 |
Time to Practice! | p. 195 |
16 Windows and Frames | p. 197 |
Frames and JavaScript | p. 197 |
Windows and JavaScript | p. 201 |
Assignments | p. 206 |
One Last Funny Example | p. 206 |
17 String Manipulations Revisited | p. 209 |
Overview | p. 209 |
New Basic String Methods | p. 209 |
Regular Expressions in JavaScript | p. 210 |
Regular Expressions in PHP | p. 213 |
The Set of PCRE | p. 214 |
18 JavaScript and DHTML | p. 217 |
Overview | p. 217 |
Positioning Elements | p. 217 |
Writing Dynamic Menus in DHTML | p. 222 |
Your Turn!! | p. 225 |
19 Putting It All Together! | p. 227 |
Overview | p. 227 |
Procedure | p. 227 |
Step 1 Understanding the Problem and Finding the Solution | p. 227 |
Step 2 Designing the Database | p. 228 |
Step 3 Main Functionalities | p. 230 |
Step 4 Backside | p. 231 |
Step 5 Improvements on Functionality | p. 231 |
Step 6 Improvements on Looks | p. 232 |
Step 7 Thorough Testing, Hacking Attempts | p. 232 |
Step 8 Presentation | p. 233 |
Step 9 Publication | p. 233 |
Step 10 Celebration [Characters not reproducible] (and Maintenance) | p. 234 |
What Language to Use? | p. 234 |
Appendix A Special Characters | p. 217 |
Appendix B Installing on UNIX | p. 241 |
Overview | p. 241 |
Installing Apache and PHP | p. 241 |
Installing MySQL | p. 243 |
Appendix C Advanced phpBB | p. 247 |
Appendix D class.FastTemplate.php | p. 251 |
Appendix E File Upload Script | p. 267 |
Bibliography | p. 269 |
Index | p. 271 |