Simple Access Control
Friday, January 28, 2011

In my previous post, I looked at using a controller plugin as part of a more complex access control system based on an access control list. However, sometimes a simpler solution makes sense. For instance, in a recent project, I just needed to restrict access to the admin section of the site. The admin section was contained within the admin module. I therefore need to check only two things:

  1. Was the user trying to access something in the admin section?
  2. Was the user logged in as admin?

I still needed to add the mechanism for logging in, but there was no need for an access control list, and the implementation of the Access Control Plugin was much simpler. (more…)

Posted by James at 7:26 pm   0 comments

The Access Control Plugin
Wednesday, December 8, 2010

This post deals with the last piece of the access control/authentication jigsaw: the Access Control plugin. It shows how an application can makes use of the Zend Framework’s controller plugin mechanism to apply the access control list to a user request. (more…)

Posted by James at 8:28 pm   5 comments

The Login Controller
Thursday, October 28, 2010

Following on from my overview of authentication and access control, I intend to first look at the implementation of a Login controller. This will handle two basic request: /login and /login/logout. These correspond to a user’s attempt to login via the login form, and a logout request, typically via a page link. (more…)

Posted by James at 8:30 pm   2 comments

Implementing Authentication and Access Control using the Zend Framework
Saturday, October 23, 2010

One of the most common, but often complex to implement, features of websites is the facility for users to log in and out of the site, thus allowing them to view content and perform actions that would otherwise be denied to them. The Zend Framework does not provide a single all-in-one component, since the possible approaches are so diverse, but rather provides separate components for authentication (Zend_Auth) and access control (Zend_Acl), and a mechanism for incorporating them into the dispatch process (controller plugins). (more…)

Posted by James at 7:31 pm   2 comments

Adding an automatically-generated sitemap.xml to a Zend Framework site
Saturday, August 21, 2010

This article looks at how to dynamically create a Google sitemap.xml file for your Zend Framework site. It assumes that you are using Zend_Navigation to describe the basic layout of your site. It also assumes that the application is based on Zend_Application and uses Zend_Layout. (more…)

Posted by James at 6:08 pm   2 comments

Pagination using Zend_Paginator
Sunday, July 4, 2010

Any web application that retrieves large amounts of data for display is bound to have the need to split that data over several pages. Developing the code to do this from scratch is not trivial, so it is extremely useful that the Zend Framework has the Zend_Paginator module, which assists with this task. (more…)

Posted by James at 1:54 pm   2 comments

The Blogs Page: The feed/digest action handler
Friday, April 9, 2010

The feed controller digest action handler is used to render a list of the five most recent blog posts on the specified blog, as exposed by the blog’s RSS feed. (more…)

Posted by James at 7:18 am   0 comments

The Blogs Page: The index/blogs action handler
Friday, December 4, 2009

The blogs page is handled by the blogs action of the index controller. This fetches information about the blogs from a database table; it then passes this information to the view script. (more…)

Posted by James at 12:47 am   0 comments

The Blogs Page: Overview
Friday, November 27, 2009

The blogs page on the GM-RAM website is used to display details of the company-sponsored blogs, including a digest of the five most recent posts. Like the other pages on the site, it displays its content within a series of tabs. The first tab simply contains some general comments about the blogs; each blog then has its own tab. (more…)

Posted by James at 8:03 pm   0 comments

The Contact Page: The Action Handler
Monday, November 2, 2009

The visual implementation of the contact page is similar to that of the home page, as described in the post The Home Page. However, it also makes use of Zend_Form and Zend_Validate to render and process the contact form, and Zend_Layout, Zend_Filter and Zend_Mail to render and send the contact e-mail to the site admin. (more…)

Posted by James at 10:35 pm   0 comments
Next Page »