Appendix C. Tips and tricks

 

The appendix covers

  • Using modules with Zend Framework’s MVC components
  • Understanding the effects of the case sensitivity of controller classes and action functions
  • Zend Framework URL routing components
  • Understanding your application using Zend_Debug, Zend_Log, and Zend_Db_Profiler

This is the where we think about the more advanced uses of some key Zend Framework components. Within the MVC components, we’ll look at how modules can be used to further separate your code and also investigate how the dispatcher handles actions and controllers with uppercase letters. We’ll also look at how the static and regex routing classes can provide more flexible and efficient URLs.

As a web application grows, logging the processes taking place becomes important. Zend_Log provides the features required to let your application tell you what’s going on. We’ll also look at the benefits of Zend_Debug for when you need a quick and dirty check while debugging your code.

Finally, we’ll look at Zend_Db_Profiler, which will show you exactly which SQL statements are run and how long each one takes. This is very useful when trying to make your page load as quickly as possible.

Let’s dive in and look at modules in the MVC system.

C.1 MVC Tips and Tricks

Within this section, we’ll look at features of the MVC system that we’ve not addressed within the rest of the book either because they’re more advanced or less likely to be used in most projects.

C.1.1 Modules

C.2 Diagnostics with Zend_Log and Zend_Debug

C.3 Zend_Db_Profiler

C.4 Summary