Home Page Icon
Home Page
Table of Contents for
V. Web Programming
Close
V. Web Programming
by Wallace Wang
Beginning Programming ALL-IN-ONE DESK REFERENCE FOR DUMMIES®
Copright
About the Author
Acknowledgments
Introduction
Who Should Buy This Book
How This Book Is Organized
Book I: Getting Started
Book II: Programming Basics
Book III: Data Structures
Book IV: Algorithms
Book V: Web Programming
Book VI: Programming Language Syntax
Book VII: Applications
How to Use This Book
Icons Used in This Book
Getting Started
I. Getting Started
I.1. Getting Started Programming a Computer
I.1.1. How Computer Programming Works
I.1.1.1. Identifying the problem
I.1.1.2. Defining the steps
I.1.2. The History of Computer Programming
I.1.2.1. Talking to a processor in machine language
I.1.2.2. Using assembly language as a shortcut to machine language
I.1.2.3. Hiding the details of a computer with a high-level language
I.1.2.4. Combining the best of both worlds with the C programming language
I.1.2.5. Pros and cons of programming languages
I.1.3. Figuring Out Programming
I.1.3.1. Desire beats technical training every time
I.1.3.2. Picking a computer and an operating system
I.1.3.3. Writing programs with an editor
I.1.3.4. Converting source code with an assembler or compiler
I.1.3.5. Translating source code with an interpreter
I.1.3.6. Combining a compiler with an interpreter to create p-code
I.1.3.7. Taking the time to understand
I.1.4. Getting Started with Programming
I.1.4.1. Starting with Windows
I.1.4.2. Starting with Mac OS X
I.1.4.3. Starting with Linux
I.1.4.4. Starting with Java
I.1.5. Knowing Programming versus Knowing Programming Language
I.2. Different Methods for Writing Programs
I.2.1. Spaghetti Programming without a Plan
I.2.2. Planning Ahead with Structured Programming
I.2.2.1. The three parts of structured programming
I.2.2.2. Top-down programming
I.2.3. Making User Interfaces with Event-Driven Programming
I.2.3.1. Designing a user interface
I.2.3.2. Writing event handlers
I.2.3.3. Writing your program
I.2.4. Organizing a Program with Object-Oriented Programming
I.2.4.1. Objects isolate data
I.2.4.2. Objects simplify modifications
I.2.5. Designing Programs with Today's Methodology
I.3. Types of Programming Languages
I.3.1. Choosing Your First Language
I.3.1.1. C the BASIC choices
I.3.1.2. Having second thoughts
I.3.2. Teaching Languages
I.3.2.1. Getting back to BASIC
I.3.2.2. Turtle graphics with Logo
I.3.2.3. The philosophy of Pascal
I.3.2.4. Other teaching languages
I.3.3. "Curly Bracket" Languages
I.3.3.1. The power of C
I.3.3.2. The efficiency of C
I.3.3.3. The portability of C
I.3.3.4. Adding object-oriented programming with C++
I.3.3.5. True portability with Java
I.3.3.6. Safer programming with C#
I.3.3.7. Choosing a curly bracket language
I.3.4. Artificial Intelligence Languages
I.3.5. Scripting Languages
I.3.5.1. Automating a program
I.3.5.2. Customizing a program
I.3.5.3. Transferring data among multiple programs
I.3.5.4. Creating separate applications
I.3.6. Database Programming Languages
I.3.6.1. The dBASE programming language
I.3.6.2. Adding database access to traditional languages
I.3.6.3. Customizing database programs
I.3.7. Comparing Programming Languages
I.4. Programming Tools
I.4.1. Choosing a Compiler
I.4.1.1. Defining your needs for a compiler
I.4.1.2. Evaluating the technical features of a compiler
I.4.2. Finding an Interpreter
I.4.2.1. Operating system interpreters
I.4.2.2. Web page interpreters
I.4.3. Compiling to a Virtual Machine
I.4.4. Writing a Program with an Editor
I.4.4.1. Editors
I.4.5. Fixing a Program with a Debugger
I.4.5.1. Stepping line by line
I.4.5.2. Watching variables
I.4.6. Saving Time with Third-Party Components
I.4.7. Optimizing a Program with a Profiler
I.4.8. Creating a Help File
I.4.9. Installing a Program
I.4.10. Dissecting Programs with a Disassembler
I.5. Managing Large Projects with Software Engineering
I.5.1. Software Engineering Methods
I.5.1.1. Designing a program with the waterfall model
I.5.1.2. Evolving a program with extreme programming
I.5.2. Automating Software Engineering with CASE
I.5.2.1. Modeling a large project
I.5.2.2. Generating code automatically
I.5.2.3. Formatting source code automatically
I.5.2.4. Tracking revisions in code
I.5.3. The Pros and Cons of Software Engineering
II. Programming Basics
II.1. How Programs Work
II.1.1. Using Keywords as Building Blocks
II.1.2. Organizing a Program
II.1.3. Dividing a Program into Subprograms
II.1.4. Dividing a Program into Objects
II.1.5. Creating a User Interface
II.2. Variables, Data Types, and Constants
II.2.1. Declaring Variables
II.2.1.1. Creating a variable
II.2.2. Using Different Data Types
II.2.3. Storing Data in a Variable
II.2.4. Retrieving Data from a Variable
II.2.5. Using Constant Values
II.2.6. Defining the Scope of a Variable
II.2.6.1. Handling global variables with care
II.2.6.2. Restricting scope to a module
II.2.6.3. Isolating variables in a subprogram
II.2.6.4. Passing data among subprograms
II.3. Manipulating Data
II.3.1. Storing Data with the Assignment Operator
II.3.2. Using Math to Manipulate Numbers
II.3.2.1. Organizing equations with operator precedence
II.3.2.2. Using built-in math functions
II.3.3. Manipulating Strings
II.3.4. Finding Strings with Regular Expressions
II.3.4.1. Pattern matching with the single character (.) wildcard
II.3.4.2. Pattern matching for specific characters
II.3.4.3. Pattern matching with the multiple character (*) and (+) wildcards
II.3.4.4. Pattern matching with ranges
II.3.5. Using Comparison Operators
II.3.6. Using Boolean Operators
II.3.6.1. Using the Not operator
II.3.6.2. Using the And operator
II.3.6.3. Using the Or operator
II.3.6.4. Using the Xor operator
II.3.7. Converting Data Types
II.4. Making Decisions by Branching
II.4.1. Picking One Choice with the IF-THEN Statement
II.4.2. Picking Two Choices with the IF-THEN-ELSE Statement
II.4.3. Picking Three or More Choices with the IF-THEN-ELSEIF Statement
II.4.3.1. Checking a condition for each set of commands
II.4.3.2. Offering three or more choices
II.4.4. Playing with Multiple Boolean Operators
II.4.5. Making Multiple Choices with the SELECT CASE statement
II.4.5.1. The switch statement in C (and similar languages)
II.4.5.2. Matching multiple values in a SELECT CASE statement
II.4.5.3. Checking a range of values
II.4.5.4. Comparing values
II.4.5.5. Running at least one command with the ELSE statement
II.5. Repeating Commands by Looping
II.5.1. Looping a Fixed Number of Times with the FOR-NEXT Loop
II.5.1.1. Using a FOR-NEXT loop variable
II.5.1.2. Counting by a different range
II.5.1.3. Counting by different increments
II.5.1.4. Counting backward
II.5.2. Looping Zero or More Times with the WHILE Loop
II.5.3. Looping at Least Once with the DO Loop
II.5.4. Playing with Nested Loops
II.5.5. Prematurely Exiting from a Loop
II.5.6. Checking Your Loops
II.6. Breaking a Large Program into Subprograms
II.6.1. Creating and Using Subprograms
II.6.1.1. Creating a subprogram
II.6.1.2. "Calling" a subprogram
II.6.2. Passing Parameters
II.6.2.1. Passing parameters by reference
II.6.2.2. Storing values in a subprogram name
II.6.3. Repeating a Subprogram with Recursion
II.7. Breaking a Large Program into Objects
II.7.1. How Object-Oriented Programming Works
II.7.2. Encapsulation Isolates Data and Subprograms
II.7.2.1. Shielding data inside an object
II.7.2.2. Grouping subprograms inside of an object
II.7.2.3. Protecting code from other programmers
II.7.3. Sharing Code with Inheritance
II.7.4. Polymorphism: Modifying Code without Changing Its Name
II.7.5. Design Patterns
II.7.6. Object-Oriented Languages
II.7.6.1. Hybrid languages
II.7.6.2. Pure languages
II.7.6.3. Disadvantages of object-oriented programming
II.7.7. Real-Life Programming Examples
II.7.7.1. Defining an object with a class
II.7.7.2. Creating an object from a class
II.7.7.3. Running subprograms stored in an object
II.7.7.4. Inheriting an object
II.7.7.5. Using polymorphism to rewrite an inherited subprogram
II.8. Reading and Saving Files
II.8.1. Storing Data in Text Files
II.8.1.1. Creating a text file
II.8.1.2. Reading a text file
II.8.2. Storing Fixed Size Data in Random-Access Files
II.8.2.1. Writing data
II.8.2.2. Reading data
II.8.3. Storing Varying Size Data in Untyped Files
II.8.3.1. Writing data
II.8.3.2. Reading data
II.8.4. Using Database Files
II.8.4.1. Structure of a database
II.8.4.2. Connecting to a database
II.9. Documenting Your Program
II.9.1. Adding Comments to Source Code
II.9.1.1. Line comments
II.9.1.2. Block comments
II.9.1.3. Describing code and algorithms
II.9.1.4. Documentation
II.9.1.5. Debugging
II.9.2. Writing Software Documentation
II.9.2.1. Documentation types
II.9.2.2. Documentation tools
II.9.2.3. Help files
II.10. Principles of User Interface Design
II.10.1. The Evolution of User Interfaces
II.10.1.1. Command-line interface
II.10.1.2. Menus
II.10.1.3. Graphical user interface
II.10.2. Elements of a User Interface
II.10.2.1. Displaying commands to a user interface
II.10.2.2. Giving data to the user interface
II.10.2.3. Showing information back to the user
II.10.2.4. Organizing a user interface
II.10.3. Designing a User Interface
II.10.3.1. Know the user
II.10.3.2. Hide unusable options
II.10.3.3. Tolerate mistakes
II.10.3.4. Be consistent
II.10.3.5. Focus on the task
II.10.3.6. Make navigation easy
III. Data Structures
III.1. Structures and Arrays
III.1.1. Using Structures
III.1.1.1. Storing data
III.1.1.2. Retrieving data
III.1.2. Using an Array
III.1.2.1. Defining the size
III.1.2.2. Storing data
III.1.2.3. Retrieving data
III.1.3. Working with Resizable Arrays
III.1.3.1. BASIC
III.1.3.2. C++
III.1.4. Working with Multi-Dimensional Arrays
III.1.4.1. Creating a multi-dimensional array
III.1.4.2. Storing and retrieving data
III.1.5. Using Structures with Arrays
III.1.6. Drawbacks of Arrays
III.1.6.1. Sizing
III.1.6.2. Data types
III.1.6.3. Searching and sorting
III.1.6.4. Adding and deleting
III.2. Sets and Linked Lists
III.2.1. Using Sets
III.2.1.1. Adding (and deleting) data in a set
III.2.1.2. Checking for membership
III.2.1.3. Manipulating two sets
III.2.2. Using Linked Lists
III.2.2.1. Creating a linked list
III.2.2.2. Modifying a linked list
III.2.2.3. Creating a double linked list
III.2.3. Drawbacks of Sets and Linked Lists
III.2.3.1. Problems with pointers
III.2.3.2. Problems with accessing data
III.3. Collections and Dictionaries
III.3.1. Using a Collection
III.3.1.1. Adding data to a collection
III.3.1.2. Deleting data from a collection
III.3.1.3. Identifying data with keys
III.3.1.4. Searching and retrieving data
III.3.2. Using Dictionaries
III.3.2.1. Adding data to a dictionary
III.3.2.2. Searching and retrieving data from a dictionary
III.3.3. Understanding Hash Tables
III.3.3.1. Converting keys with a hash function
III.3.3.2. Hash function collisions
III.4. Stacks, Queues, and Deques
III.4.1. Using a Stack
III.4.1.1. Adding data to a stack
III.4.1.2. Removing data from a stack
III.4.1.3. Counting and searching a stack
III.4.2. Using Queues
III.4.2.1. Adding data to a queue
III.4.2.2. Removing data from a queue
III.4.2.3. Counting and searching a queue
III.4.3. Using Deques
III.5. Graphs and Trees
III.5.1. Understanding Graphs
III.5.1.1. Types of graphs
III.5.1.2. Uses for graphs
III.5.2. Creating Trees
III.5.2.1. Ordered trees
III.5.2.2. Binary trees
III.5.2.3. B-trees
III.5.3. Taking Action on Trees
III.5.3.1. Traversing a tree
III.5.3.2. Adding new data
III.5.3.3. Deleting data
III.5.3.4. Pruning and grafting sub-trees
IV. Algorithms
IV.1. Sorting Algorithms
IV.1.1. Using Bubble Sort
IV.1.2. Using Selection Sort
IV.1.3. Using Insertion Sort
IV.1.4. Using Shell Sort
IV.1.5. Using Heap Sort
IV.1.6. Using Merge Sort
IV.1.7. Using Quick Sort
IV.1.8. Comparing Sorting Algorithms
IV.2. Searching Algorithms
IV.2.1. Sequential Search
IV.2.1.1. Backward or forward searching
IV.2.1.2. Block searching
IV.2.1.3. Binary searching
IV.2.1.4. Interpolation searching
IV.2.2. Using Indexes
IV.2.2.1. Creating an index
IV.2.2.2. Clustered and unclustered indexes
IV.2.2.3. Problems with indexes
IV.2.3. Adversarial Search
IV.2.3.1. Depth versus time
IV.2.3.2. Alpha-beta pruning
IV.2.3.3. Looking up a library of good moves
IV.3. String Searching
IV.3.1. Sequential Text Search
IV.3.1.1. The Boyer-Moore algorithm
IV.3.1.2. The Rabin-Karp algorithm
IV.3.1.3. The Shift Or algorithm
IV.3.1.4. The finite automaton string search algorithm
IV.3.2. Searching with Regular Expressions
IV.3.2.1. Searching for single character patterns
IV.3.2.2. Searching for multiple character patterns
IV.3.2.3. Searching for alternate patterns
IV.3.3. Searching Phonetically
IV.4. Data Compression Algorithms
IV.4.1. Lossless Data Compression Algorithms
IV.4.1.1. Run-length encoding
IV.4.1.2. The Burrows-Wheeler transform algorithm
IV.4.1.3. Dictionary encoding
IV.4.2. Lossy Data Compression
IV.5. Encryption Algorithms
IV.5.1. The Basics of Encryption
IV.5.1.1. Stream ciphers
IV.5.1.2. Block ciphers
IV.5.2. Symmetric/Asymmetric Encryption Algorithms
IV.5.3. Cracking Encryption
IV.5.3.1. Brute force attack
IV.5.3.2. Dictionary attacks
IV.5.3.3. Plaintext and ciphertext attacks
V. Web Programming
V.1. HyperText Markup Language
V.1.1. The Structure of an HTML Document
V.1.1.1. Creating a title
V.1.1.2. Creating the body text
V.1.1.3. Aligning text
V.1.1.4. Emphasizing text
V.1.1.5. Adding color
V.1.1.6. Changing the font size
V.1.1.7. Adding comments
V.1.2. Adding Graphics
V.1.3. Defining the Background
V.1.4. Creating Hyperlinks
V.1.4.1. Defining an anchor point
V.1.4.2. Linking to an anchor point
V.1.5. Making Tables
V.1.5.1. Defining a table
V.1.5.2. Defining a table heading
V.1.5.3. Creating table rows and data
V.1.5.4. Displaying a table caption, header, and footer
V.2. CSS
V.2.1. The Structure of a Stylesheet
V.2.2. Creating Style Classes
V.2.3. Separating Styles in Files
V.2.4. Cascading Stylesheets
V.3. JavaScript
V.3.1. The Structure of a JavaScript Program
V.3.2. Creating Comments
V.3.3. Declaring Variables
V.3.4. Using Operators
V.3.4.1. Increment and decrement operators
V.3.5. Assignment operators
V.3.6. Branching Statements
V.3.7. Looping Statements
V.3.8. Creating Functions
V.3.9. Using Arrays
V.3.10. Designing User Interfaces
V.3.10.1. Creating dialog boxes
V.3.10.2. Creating windows
V.4. PHP
V.4.1. The Structure of a PHP Program
V.4.2. Creating Comments
V.4.3. Declaring Variables
V.4.4. Using Operators
V.4.4.1. Increment and decrement operators
V.4.4.2. Assignment operators
V.4.5. Branching Statements
V.4.6. Looping Statements
V.4.7. Creating Functions
V.4.8. using Arrys
V.4.9. Creating Objects
V.5. Ruby
V.5.1. The Structure of a Ruby Program
V.5.2. Creating Comments
V.5.3. Declaring Variables
V.5.4. Using Operators
V.5.5. Branching Statements
V.5.6. Looping Statements
V.5.7. Creating Functions
V.5.8. Using Data Structures
V.5.9. Creating Objects
VI. Programming Language Syntax
VI.1. C and C++
VI.1.1. The Structure of a C/C++ Program
VI.1.2. Creating Comments
VI.1.3. Declaring Variables
VI.1.3.1. Declaring string data types
VI.1.3.2. Declaring integer data types
VI.1.3.3. Declaring floating point data types
VI.1.3.4. Declaring Boolean values
VI.1.4. Using Operators
VI.1.4.1. Increment and decrement operators
VI.1.4.2. Assignment operators
VI.1.5. Branching Statements
VI.1.6. Looping Statements
VI.1.7. Creating Functions
VI.1.8. Data Structures
VI.1.8.1. Creating a structure
VI.1.8.2. Creating enumerated variables
VI.1.8.3. Creating an array
VI.1.9. Using Objects
VI.2. Java and C#
VI.2.1. The Structure of a Java/C# Program
VI.2.2. Creating Comments
VI.2.3. Declaring Variables
VI.2.3.1. Declaring string data types
VI.2.3.2. Declaring integer data types
VI.2.3.3. Declaring floating point data types
VI.2.3.4. Declaring Boolean variables
VI.2.4. Using Operators
VI.2.4.1. Increment and decrement operators
VI.2.4.2. Assignment operators
VI.2.5. Branching Statements
VI.2.6. Looping Statements
VI.2.7. Creating Functions
VI.2.8. Data Structures
VI.2.8.1. Creating a C# structure
VI.2.8.2. Creating an array
VI.2.8.3. Creating a Java linked list
VI.2.8.4. Creating C## data structures
VI.2.9. Using Objects
VI.3. Perl and Python
VI.3.1. The Structure of a Perl/Python Program
VI.3.2. Creating Comments
VI.3.3. Defining Variables
VI.3.4. Using Operators
VI.3.4.1. Increment and decrement operators
VI.3.4.2. Assignment operators
VI.3.5. Branching Statements
VI.3.6. Looping Statements
VI.3.7. Creating Functions
VI.3.8. Perl Data Structures
VI.3.8.1. Creating a Perl array
VI.3.8.2. Creating a Perl hash array
VI.3.9. Python Data Structures
VI.3.9.1. Creating a Python tuple
VI.3.9.2. Creating a Python list
VI.3.9.3. Creating a Python dictionary
VI.3.10. Using Objects
VI.4. Pascal and Delphi
VI.4.1. The Structure of a Pascal Program
VI.4.2. Creating Comments
VI.4.3. Declaring Variables
VI.4.3.1. Declaring string data types
VI.4.3.2. Declaring integer data types
VI.4.3.3. Declaring decimal data types
VI.4.3.4. Declaring Boolean values
VI.4.4. Declaring Constants
VI.4.5. Using Operators
VI.4.6. Branching Statements
VI.4.7. Looping Statements
VI.4.8. Creating Subprograms and Functions
VI.4.9. Data Structures
VI.4.9.1. Creating a record
VI.4.9.2. Creating an array
VI.4.9.3. Creating a set
VI.4.10. Creating Objects
VI.5. Visual Basic and REALbasic
VI.5.1. The Structure of a BASIC Program
VI.5.1.1. Using windows files
VI.5.1.2. Using module files
VI.5.1.3. Using class files
VI.5.2. Creating Comments
VI.5.3. Declaring Variables
VI.5.3.1. Declaring string data types
VI.5.3.2. Declaring integer data types
VI.5.3.3. Declaring decimal data types
VI.5.3.4. Declaring Boolean values
VI.5.3.5. Declaring generic values
VI.5.4. Declaring Constants
VI.5.5. Using Operators
VI.5.6. Branching Statements
VI.5.7. Looping Statements
VI.5.8. Creating Subprograms and Functions
VI.5.9. Data Structures
VI.5.9.1. Creating a structure
VI.5.9.2. Creating an array
VI.5.9.3. Creating a collection and a dictionary
VI.5.10. Creating Objects
VII. Applications
VII.1. Database Management
VII.1.1. The Basics of Databases
VII.1.1.1. Free-form databases
VII.1.1.2. Flat-file databases
VII.1.1.3. Relational databases
VII.1.2. Manipulating Data
VII.1.2.1. Writing database commands
VII.1.2.2. The SQL language
VII.1.2.3. Data integrity
VII.1.2.4. Data mining
VII.1.3. Database Programming
VII.2. Bioinformatics
VII.2.1. The Basics of Bioinformatics
VII.2.1.1. Representing molecules
VII.2.1.2. Manipulating molecules in a computer
VII.2.2. Searching Databases
VII.2.3. Bioinformatics Programming
VII.3. Computer Security
VII.3.1. Stopping Malware
VII.3.1.1. Viruses
VII.3.1.2. Worms
VII.3.1.3. Trojan horses
VII.3.1.4. Spyware
VII.3.2. Stopping Hackers
VII.3.2.1. Intrusion detection systems
VII.3.2.2. Rootkit detectors
VII.3.2.3. Forensics
VII.3.3. Secure Computing
VII.3.3.1. Patching as an afterthought
VII.3.3.2. Security in coding
VII.3.3.3. Security by design
VII.4. Artificial Intelligence
VII.4.1. Problem Solving
VII.4.1.1. Game-playing
VII.4.1.2. Expert systems
VII.4.1.3. Natural language processing
VII.4.1.4. Speech recognition
VII.4.1.5. Image recognition
VII.4.2. Machine Learning
VII.4.2.1. Bayesian probability
VII.4.2.2. Neural networks
VII.4.3. Applications in Artificial Intelligence
VII.5. The Future of Computer Programming
VII.5.1. Picking a Programming Language
VII.5.2. Picking an Operating System
VII.5.3. Cross-Platform Programming
VII.5.3.1. The portability of C
VII.5.3.2. Cross-platform languages
VII.5.3.3. Virtual machines
VII.5.3.4. Software as service
VII.5.3.5. Rich Internet applications (RIA)
VII.5.3.6. Robotics programming
VII.5.4. The Programming Language of the Future
VII.5.4.1. Low-level languages
VII.5.4.2. The next generation: C++, Objective-C, C#, and Java
VII.5.4.3. REALbasic and Visual Basic
VII.5.4.4. The scripting languages
VII.5.4.5. The best programming language
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
IV.5. Encryption Algorithms
Next
Next Chapter
V.1. HyperText Markup Language
Part V. Web Programming
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset