12:32am PT, Tuesday May 13
Example Zend Framework Blog Application Tutorial - Part 6: Introduction to Zend_Form and Authentication with Zend_Auth - Pdraic Brady

Posted on Monday 5 May 2008

In the previous entry, we created a new Administration Module to hold blog management functionality, added a Module specific layout for it, and discussed the upcoming need to ensure this is only accessible by authorised Authors. In this entry I’ll unravel some of Zend_Form’s mysteries in adding a login form, before using Zend_Auth to implement authentication for authors.
Previously: Part 5: Creating Models with Zend_Db and adding an Administration Module
Authentication in the Zend Framework is the domain of the Zend_Auth component, and it is really easy to use. Zend_Auth is really an abstract API to a number of components working in concert, and without the usual micromanagement of database interaction, sessions, cookies and user data persistence, it makes my life a lot simpler. Of course authentication demands a login form, and so I’ll first visit using Zend_Form. Zend_Form is an interesting component because it’s one of the worst to get started with. The manual, as it does for all components, does not impose a best practice to setting up forms. Mix that with the number of form organisations possible (class based, config based, view template based) and it can be very confusing.Step 1: Adding a Login Action and ViewBefore we actually perform authentication, we need a login form. I’ve decided to attach all Author account actions to an Author Controller. Add a new file called AuthorController.php in /application/controllers/ containing the following:
Nothing major here, except for a mysterious reference to a view variable, $loginForm!Step 2: Creating a Login form with Zend_FormZend_Form is one of the most recent additions to the Zend Framework with the release of 1.5. It’s not surprising it took so long since a decent Form library is not a trivial component to get through development.
The object oriented approach to developing forms takes a bit of getting used to but it works wonders for simple forms that don’t need a heavy design hand. I suppose from my own perspective it was design over functionality that first struck me as problematic when I started using Zend_Form but I think I’m over that learning curve, so let’s see how this look at a simple two field login form goes

(more…)

Popularity: unranked [?]

Tags: , , , , , , , , ,
Alex Loft @ 2:05 pm
The Bakery: Latest Articles, Tutorials and Components

Posted on Saturday 3 May 2008

The Bakery (the CakePHP programmer’s resource) has a few new articles, tutorials and components that have been posted lately. Here’s the list:

Preview and alter the SQL generated from Model::find()
After 3 years, looking back and moving ahead
Encrypted Cookie Component
Open Flash Chart Helper: draw charts the Cake way
Maintaining an Application-independant Code Library
Rolling you own Gallery2 component
DarkAuth v1.3 - an alternative Auth
Easy AJAX Pagination Using JQuery

Be sure to check out the rest of The Bakery for more great CakePHP-related content.

Popularity: unranked [?]

Tags: , , , ,
Alex Loft @ 11:05 am
WebDevRadio.com: Episode 49: Brian Moon at the MySQL User Conference

Posted on Saturday 3 May 2008

Michael Kimsal has release the last podcast of his MySQL Conference series of interviews with other attendees. In this episode, he interviews Brian Moon of the Phorum project (employed at DealNews.com).

Brian was kind enough to review both of his presentations which go in to great detail about the scaling issues he’s faced both with DealNews.com and the Phorum forum software project (which recently turned 10 years old!) […] Thanks to Brian for going over things in such detail!

You can download this latest episode from the WebDevRadio site as well as check out Brian’s slides from his MySQL conference presentation.

(more…)

Popularity: unranked [?]

Tags: , , , ,
Alex Loft @ 5:05 am