Free PDF Chapter: PHP5 CMS Framework Development

October 16, 2008
Posted in PHP Books


The people at Packt Publishing just sent me a free sample chapter (in PDF format) of their latest PHP book (PHP5 CMS Framework Development) for me to pass on to you guys.

I haven’t had a chance to read the book, so I can’t comment on it. If any of you have, please feel free to post a comment.

The PDF:

PHP5 CMS Framework Development – Chapter 6 Access Control.

PHP5 CMS Framework Development

This book guides you through the design and implementation decisions necessary to create a working architecture for a PHP5-based content management system. Each of the major areas and decision points are reviewed and discussed. Code examples, which take advantage of PHP5’s object oriented nature, are provided and explained. They serve as a means of illustrating the detailed development issues created by a CMS. In areas where the code is too voluminous to be reproduced in detail, the design principles are explained along with some critical pieces of code. A basic knowledge of PHP is assumed.

All of the code samples are taken from a frozen version of the Aliro development project, and you can visit a site running on that version at Apart from being a demonstration of the code in action, the site provides access to the whole of the code both through a class browser, built using Doxygen and a code repository, powered by Subversion.

What This Book Covers

Chapter 1: This chapter introduces the reasons why CMS frameworks have become such a widely used platform for websites and defines the critical features. The technical environment is considered, in particular the benefits of using PHP5 for a CMS. Some general questions about MVC, XHTML generation, and security are reviewed.

Chapter 2: This chapter takes us from a general overview of the CMS framework into the specifics of user management. Every CMS-based site needs to make distinctions between different types of user, if only between administrators and visitors. Often the requirements are much more complex. The framework can provide a sound platform on which more elaborate mechanisms can be built

Chapter 3: This chapter explores class and code loading strategies to decrease bloat and increase security. Focus is placed on extensible approaches that can support additions to the system.

Chapter 4: This chapter addresses and dispels the mystique of session management. Very often continuity is needed, whether it is to support user login, or to allow the operation of something like a shopping cart. The standard way to handle this is with sessions, and we look at ways to provide a robust and secure basis for session handling.

Chapter 5: This chapter provides a basis for effective data handling in the applications that use our CMS framework. The heart of a CMS is its database, and although PHP can connect to databases, we look at services that can be built to make access easier. Likewise, a standard abstract class for data objects corresponding to database rows can considerably aid the development of the rest of the CMS.

Chapter 6: This chapter shows an outline of a highly flexible role-based access control system. The culmination of much research and experimentation into access control mechanisms is the role-based access control system. We look at an implementation specifically designed for the CMS environment.

Chapter 7: This chapter focusses on defining a uniform architecture to support functionality that is actually visible to the user. One of the reasons for building a CMS is to use the same code repeatedly. But it will often be desirable to add another application to the framework, and for this we need to look at standardized mechanisms for installing and managing extensions.

Chapter 8: This chapter helps us gain efficiency by building specialized handlers. A powerful way to make a CMS more efficient is to use a cache. This can be done in various ways, and we look at the most profitable and at efficient code for their implementation.

Chapter 9: This chapter shows how the CMS framework can provide all the basic mechanisms for menu handling. While the styling of the menu, or equivalent navigational device, is outside the core of a CMS framework, we can look at standard mechanisms for handling the raw data that drives menus. If this is done well, building attractive displays will be much easier.

Chapter 10: In more and more cases, software needs to cater for use of different languages and other local standards. The CMS is no exception, and here we explore a powerful mechanism for language and locale hand

Chapter 11: How best to create the final XHTML is an area rife with controversy. In this chapter, we will look at the strengths and weaknesses of approaches such as templating and widgets, along with the code needed to create them.

Chapter 12: This chapter describes the basic principles of a generalized configuration system. There are a number of small but important services that are well provided by a CMS framework. We look at mail, file system management, XML handling, and several others.

Chapter 13: This chapter reviews the handling of the inevitable errors that go with software systems. Error handling is an area where a good CMS framework can be very helpful to applications by trapping and logging errors, making it relatively easy to present user friendly messages and avoid giving away information that would compromise security.

Chapter 14: The actual content that is organized by a CMS may be extremely varied. In this chapter, we look at the most popular areas with a brief review of the implementation issues for each. Less significant areas are discussed in outline. A simple text handling application is described in some detail to illustrate the principles involved, and ways in which it could be made more sophisticated are discussed.

Appendix A: This appendix describes how to create the setup files that are used by the install.


Stefan Mischook


Comments are closed.

To Top