CodeIgniter for Rapid PHP Application Development

CodeIgniter for Rapid PHP Application Development
Click Here To Download Book
Pages 257
Views 3870
Size 2.2 MB
Download 124
Table Of Contents

Chapter 1: Introduction to CodeIgniter
What can CodeIgniter Do for You?
Save Time
Make Your Site More Robust
Keep Your Links Up-To-Date Automatically
Save Database Crashes: ‘prep’ Your Data Entry Forms
Make Your Code Bolder
Send Email Attachments without Hassles
Save Bandwidth by Zipping Files That Users Need to Download
Yes, But…What is CodeIgniter? What are Frameworks?
And Who is That Man?
The ‘Open Source’ Business Model
What CI Doesn’t Do
Chapter 2: Two Minutes’ Work: Setting up a CodeIgniter Site
Installing CodeIgniter
Exploring the File Structure
The Configuration File
Does it Work?
Chapter 3: Navigating Your Site
MVC—Just Another Acronym?
The Structure of a CI Site: Controllers and Views
The Welcome Controller
Working with Views
The Default Controller
CodeIgniter Syntax Rules
Types of Files or Classes on a CI Site
What are All Those Folders For?
Designing a Better View
Designing a Better Controller
Getting Parameters to a Function
Passing Data to a View
How CI Classes Pass Information and Control to Each Other
Calling Views
Calling Functions Directly
Interacting with Controllers
It’s Just Like an Egg-Cup
An Example of a CI Helper: the URL Helper
A Simple Library Example: Creating a Menu
Chapter 4: Using CI to Simplify Databases
Configuration Settings
Designing the Database for Our Site
Active Record
Advantages of Using the Active Record Class
Saving Time
Automatic Functionality
Read Queries
Displaying Query Results
Create and Update Queries
Delete Queries
Mixing Active Record and ‘Classic’ Styles
Chapter Appendix: MYSQL Query to Set Up ‘websites’ Database
Chapter 5: Simplifying HTML Pages and Forms
Writing a View
Long and Short PHP Syntax
Nesting Views
Practical Issues of Site Architecture
CI’s Form Helper: Entering Data
Form Helper Advantage One: Clarity
Form Helper Advantage Two: Automation
My ‘Display’ Model
CI’s Validation Class: Checking Data Easily
Set Up Validation
Set Up the Controller
Set Up the Forms
Chapter 6: Simplifying Sessions and Security
Starting to Design a Practical Site with CI
Moving Around the Site
Security/Sessions: Using Another CI Library Class
Turning Sessions into Security
Chapter 7: CodeIgniter and Objects
Object-Oriented Programming
Working of the CI ‘Super-Object’
Copying by Reference
Adding Your own Code to the CI ‘Super-Object’
Problems with the CI ‘Super-Object’
Chapter 8: Using CI to Test Code
Why Test, and What For?
CI’s Error Handling Class
CI’s Unit Test Class
When to Use Unit Tests
Example of a Unit Test
CI’s Benchmarking Class
CI’s Profiler Class
Testing with Mock Databases
Control and Timing
Chapter 9: Using CI to Communicate
Using the FTP Class to Test Remote Files
Machines Talking to Machines Again—XML-RPC
Getting the XML-RPC Server and Client in Touch with Each Other
Formatting XML-RPC Exchanges
Issues with XML-RPC?
Talking to Humans for a Change: the Email Class
Chapter 10: How CI Helps to Provide Dynamic Information
The Date Helper: Converting and Localizing Dates
Working with Text: the Text Helper and Inflector Helper
Going International: the Language Class
Making HTML Tables the Easy Way: the Table Class
Caching Pages
Chapter 11: Using CI to Handle Files and Images
The File Helper
The Download Helper
The File Upload Class
CI’s Image Class
Easy File Compression with the CI Zip Class
Chapter 12: Production Versions, Updates, and Big Decisions
Connections: Check the Config Files
Other config Files
Look Out for PHP 4/5 and Operating System Differences
Diagnostic Tools
Coping with Changes in New CI Versions
How to Load Models, and What to Call Them
How to Initialize Your Own ‘library’ Classes
So Should I Update If a New CI Version Comes Out?
How to Add On to CI’s Basic Classes
Chapter 13: Instant CRUD—or Putting it All Together
The CRUD Model: Design Philosophy
The Standard Controller Format
The Database Tables
The Heart of the Model: the Array
Function by Function: the CRUD Model
Reading the Data
Delete and Trydelete
The Test Suite
Chapter 14: The Verdict on CI
Some Code: the ‘do_test’ Model
A Balance Sheet
Where CI Helped: Structure
Where CI Helped: Simplicity
Where CI Helped: Extra Functionality
Problems with CI
Ease of Use
Chapter 15: Resources and Extensions
CI’s User Forums
Video Tutorials
Available Plug-ins and Libraries
External Sites
Comparisons: Which Charting Library to Use?
CRUD: the Final Frontier
Resources for Other Programmes, e.g. Xampplite, MySQL, PHP