Switch to the store?

Kohana 3.0 Beginner's Guide

More Information
  • Understand the HMVC architecture
  • Learn Routing and Requesting handling in Kohana
  • Create modules for extending your applications
  • Interact with the Database and ORM classes to provide an object- oriented way of manipulating data
  • Create helper classes to make your code fast to write and easy to use.
  • Troubleshoot and debug your Kohana application
  • Implement security and deployment best practices
  • Migrate from Kohana 2.x or CodeIgniter

Modern web development relies heavily on the ability to rapidly create applications that are reliable, maintainable, and scalable. The PHP-based Kohana framework has proven to be one of the best platforms for delivering professional quality applications using a stable framework that allows you to build great web properties while leveraging a rapid development architecture that is both powerful and intuitive.

Kohana 3 Beginner’s Guide is the first and only book in the market for learning about this popular and powerful open-source PHP framework. Written with the beginner in mind, this book walks you through installation and configuration, then uses a case study site to deliver real world solutions to common web development needs.

Beginning with the installation and configuration of the framework, you are guided through the steps necessary to get up and running, and are quickly introduced to the basics of Kohana.

Using a case study site as an example, the book illustrates core components of Kohana while showing elegant solutions to real world tasks developers face every day. From working with forms to databases, interacting with users to deploying applications in the wild, everything is covered in simple, easy to understand examples.

By the end of this book you will have mastered the core tasks needed to build great web applications using

  • The first and only book on the Kohana 3 PHP framework
  • Covers all major areas needed to begin developing web applications with Kohana
  • Covers complete development cycle from installation to deployment
  • Easy to follow instructions that help you build a working example application during the course of the book
Page Count 344
Course Length 10 hours 19 minutes
Date Of Publication 25 Aug 2011
System requirements
Case Study
Downloading and installing from the Web
Time for action – Downloading from web
Installing Kohana from GitHub
Time for action – downloading using Git
Testing the environment
Configuring Kohana for Development Environment
Time for action – Setting your Timezone
Time for action – setting base URL
Time for action – Setting Kohana::$environment
Time for action – Enabling the User Guide
Testing your configuration
What are controllers and views?
Updating our Welcome Controller
Time for action – Getting our controller action to use a view file
Passing data to the view
Time for action – Passing data via the factory method
Time for action – Passing data as view variables
Time for action – Passing data using the set() method
Time for action – Passing data using the bind( ) method
Time for action – Passing data using multiple methods
Using the Template Controller
Time for action – Extending Kohana's Template Controller
Time for action – Setting global view variables
Time for action – Binding global view variables
Creating new controllers
Time for action – Creating our first controller
Time for action – Expanding on our first controller
Creating a base controller
Time for action – Creating an abstract controller
Putting it all together
Time for action – Adding stylesheets to template
Time for action – Adding header and footer view files
Hierarchy is King in Kohana
Request flow in Kohana
Using the Request object
Time for action – Creating a profile page with messages
Time for action – Creating a request within a request
Routing in Kohana
Time for action – Making profiles dynamic using ID
Time for action – Creating a Custom Route
Time for action – Adding regex to a route
Time for action – Allowing additional segments in a route
Time for action – Using Subdirectories and Routes
Autoloading classes
Introducing helpers
Time for action – Creating configuration for Encryption
Time for action – Creating a login form using the Form helper class
Time for action – Creating a signup form for new users
Extending Helpers
Time for action – Extending the HTML helper method
Anatomy of a Module
Loading and configuring modules
Bundled modules
Time for action – Configuring your application to use a database
Time for action – Creating a database table and using the query builder
Time for action – Adding pagination to database results
Installing modules
Time for action – Installing a module from an archive
Time for action – Installing a module using git
Creating your own modules
Anatomy of a model
Using the Database module
Time for action – Refactoring Model_Message to allow dynamic search
Time for action – Adding the ability to insert messages in case study site
Time for action – Add ability to edit messages in case study site
Time for action – Add ability to delete messages from the case study site
Using the Database Module with sessions
Time for action – Adding session handling with the database adapter
Using the ORM module
Time for action – Updating Message Model to use ORM
Time for action – Adding validation to Message Model
Using the Auth module
Time for action – Adding users and Auth to case study site
Time for action – Adding the Auth functionality to the case study site
Time for action – Adding secure actions to the case study site
Debugging code with Kohana
Time for action – Adding error messages to signup form
Handling 404 redirects
Time for action – Adding a custom 404 page
Profiling our applications
Time for action – Adding profiling to the case study project
Securing our applications
Time for action – Securing against XSS risks
Preparing for production


Jason D. Straughan

Jason D. Straughan is currently a software engineer at LiveOak 360, Inc., a web development firm with a focus on social networking and custom web applications. He is also a founding partner in Straughan Photography (SanAntonioWeddingPhotography.com) and provides consultation and training to a select number of clients through his web consulting firm. You can follow his blog, and read more about Kohana and web-related topics at http://www.JDStraughan.com