CodeIgniter for Rapid PHP Application Development


There is a newer version of this book available - CodeIgniter 1.7 Professional Development
CodeIgniter for Rapid PHP Application Development
eBook: $20.99
Formats: PDF, PacktLib, ePub and Mobi formats
$11.55
save 45%!
Print + free eBook + free PacktLib access to the book: $55.98    Print cover: $34.99
$46.54
save 17%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Clear, structured tutorial on working with CodeIgniter
  • Careful explanation of the basic concepts of CodeIgniter and its MVC architecture
  • Using CodeIgniter with databases, HTML forms, files, images, sessions, and email
  • Building a dynamic website quickly and easily using CodeIgniter's prepared code

Book Details

Language : English
Paperback : 260 pages [ 235mm x 191mm ]
Release Date : July 2007
ISBN : 1847191746
ISBN 13 : 9781847191748
Author(s) : David Upton
Topics and Technologies : All Books, Web Development, Open Source, PHP


Table of Contents

Preface
Chapter 1: Introduction to CodeIgniter
Chapter 2: Two Minutes' Work: Setting up a CodeIgniter Site
Chapter 3: Navigating Your Site
Chapter 4: Using CI to Simplify Databases
Chapter 5: Simplifying HTML Pages and Forms
Chapter 6: Simplifying Sessions and Security
Chapter 7: CodeIgniter and Objects
Chapter 8: Using CI to Test Code
Chapter 9: Using CI to Communicate
Chapter 10: How CI Helps to Provide Dynamic Information
Chapter 11: Using CI to Handle Files and Images
Chapter 12: Production Versions, Updates, and Big Decisions
Chapter 13: Instant CRUD—or Putting it All Together
Chapter 14: The Verdict on CI
Chapter 15: Resources and Extensions
Index
  • 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
    • License
    • Summary
  • 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
      • Controller
      • View
    • 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
    • Summary
  • 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
    • Summary
    • 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
    • Summary
  • 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'
    • Summary
  • 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
    • Summary
  • 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
      • Debugging
      • Issues with XML-RPC?
  • Talking to Humans for a Change: the Email Class
  • Summary
  • Chapter 12: Production Versions, Updates, and Big Decisions
    • Connections: Check the Config Files
      • URLs
      • Databases
      • 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
    • Summary
  • 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
      • Showall
        • Reading the Data
        • Delete and Trydelete
      • Insert
      • Insert2
      • The Test Suite
    • Summary
  • 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
      • Completeness
      • Ease of Use
    • Summary
  • Chapter 15: Resources and Extensions
    • CI's User Forums
    • Video Tutorials
      • Available Plug-ins and Libraries
      • AJAX/Javascript
      • Authentication
      • External Sites
      • Comparisons: Which Charting Library to Use?
      • CRUD: the Final Frontier
    • Resources for Other Programmes, e.g. Xampplite, MySQL, PHP
    • Summary

David Upton

David Upton is a director of a specialized management consultancy company, based in London but working around the world. His clients include some of the world’s largest companies. He is increasingly interested in web-enabling his work, and seeking to turn ideas into robust professional applications by the simplest and easiest route. He has so far written applications for two major companies in the UK. His other interests include simulation, on which he writes a weblog which takes up far too much of his time, and thinking.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 10 submitted: last submission 11 Nov 2013

Errata type: Code | Page number: 9

The very last line on this page is incorrect:
echo anchor(start/hello/fred, Say hello to Fred);
it should read:
echo anchor('start/hello/fred', 'Say hello to Fred');

 

Errata type: Typo | Page number: 28

Under the MVC - Just Another Acronym? heading, second bullet point for Views, second line.
"Although they are normally HMTL views" should say "Although they are normally HTML views."

 

Errata type: Code | Page number: 32

In the section "Working with Views," the author says that the controller calls the "welcome_view" view.
it actually calls the "welcome_message" view.

 

Errata type: Typo | Page number: 42

Last para, URL should be http://127.0.0.1/index.php/start/hello/fred and the following sentence should be revised, as "it is looking for the hello function we wrote in the start controller."

 

Errata type: Typo | Page number: 44

Last 'real' text line should probably be:
but the callmodel function would exiSt only to call a function in the model.
Now it says exit in stead of exist.

 

Errata type: Code | Page number: 46

The code snippet after the first paragraph is missing a dollar sign to indicate that 'this' is a variable.
I.e., instead of
this->load->helper('url');
it should read:
$this->load->helper('url');

 

Errata type: Typo | Page number: 48

second line below the big code block: exAplanation ? ;)

 

Errata type: Code | Page number: 48

The second line below the big code block has the words "exAplanation" listed incorrectly
it should be "explaination"

 

Errata type: Code | Page number: 57

code line:
$this->db->select('url','name','clientid','people.surname AS client');
should be:
$this->db->select ('url,name,clientid,people.surname AS client');

 

Errata type: Typo | Page number: 129

First paragraph, last sentence. Shouldn't it be the other way around. The first array contains files that have been added.

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

CodeIgniter for Rapid PHP Application Development +    Expert Cube Development with Microsoft SQL Server 2008 Analysis Services =
50% Off
the second eBook
Price for both: $33.00

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Setting up the CI package on your web server
  • Understanding the Model-View-Controller (MVC) pattern for organizing a dynamic website
  • Understanding the structure of a CI site
  • Designing better views and controllers
  • Object-oriented aspects of CI
  • Integrating databases such as MySQL and simplifying your database access
  • Making your site more robust and professional by using CI's built-in classes
  • Creating and validating HTML forms with CI form helpers
  • Handling files, images, and sessions with CI
  • Sending email from CI
  • Using CI for testing your code with error handling, unit testing, benchmarking, and profiling
  • Getting an XML-RPC server and client working
  • Generating Create, Update, Delete, and Read (C.R.U.D) entries on each database table

In Detail

CodeIgniter (CI) is a powerful open-source PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. CodeIgniter is an MVC framework, similar in some ways to the Rails framework for Ruby, and is designed to enable, not overwhelm.

This book explains how to work with CodeIgniter in a clear logical way. It is not a detailed guide to the syntax of CodeIgniter, but makes an ideal complement to the existing online CodeIgniter user guide, helping you grasp the bigger picture and bringing together many ideas to get your application development started as smoothly as possible.

Improve your PHP coding productivity with this guide to the powerful and popular CodeIgniter framework.

Approach

This book steps you through the main features of CodeIgniter in a systematic way, explaining them clearly with illustrative code examples.

Who this book is for

This book is for developers who are new to CodeIgniter. Basic skills in PHP and MySQL are required, but only rudimentary object-oriented knowledge is required. 

If you're looking for a better way to develop PHP applications, or want to find out more about the CodeIgniter framework as a viable option for one of your own projects, this book will help you.

Buy CodeIgniter for Rapid PHP Application Development

 

 

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software