Archive for October 18th, 2006
PHP Developer - October 18th, 2006
DevShed is continuing on with their look at using Builder objects (part 1, part 2) with the third and final part of the series -
Developing a Form Director Class.
In this article I’ll complete the builder pattern, since I’ll demonstrate how to define and use a form director class, in this way putting the final strokes on the example that you learned in the previous tutorial.
The tutorial goes back over a few of the concepts and code from the previous part of the series before getting into the form generation with these handy objects. They also show the FormBuilder class (creative name, eh?) that will generate the form’s elements as created previously. They wrap it all up with the only new functionality - the Builder object Director class, creating a simple contact form.
Continue Reading ·
PHP Developer - October 18th, 2006
PHPBuilder.com continues in their series of exceprt from the Sams Publishing book “PHP 5 in Practice” with this quick snippet showing how to create an interactive web application
by combining PHP and Ajax.
A full discussion of Ajax is not within the scope of this book and would be mostly a discussion of JavaScript, not PHP. However, the listings in this section demonstrate one quick example that shows how Ajax can call a PHP script, pass it data, and display the results back to the user.
Their simple example makes a “time service” that can be pulled from any remote script (in the domain, of course). The PHP for the backend is simple - just echoing out the current time, and the HTML/Javascript is simple too, making a basic XMLHttpRequest call to the backend script.
Continue Reading ·
PHP Developer - October 18th, 2006
The more PHP the better. Or, is it? Would it perhaps take some deeper PHP knowledge to develop real world web applications with it? Or maybe having a good sense about web application security is actually needed? Maybe!
So starts Leendert Brouwer’s latest post today - a look at creating secure web applications in PHP. He covers some of the more common pitfalls and seldom mentioned issues that could cause you and your script big headaches later on.
He breaks up the post into fourteen different sections that include:
- The Evil User
- XSS Attacks
- Dynamic File Inclusion Attacks
- Incorrect Session Usage
- Filesystem corruption
Of course, there’s code where it’s needed, and plenty of explaination and examples to make sure you know what’s going on. There’s also a “just to be sure” section at the end that shares a few other parting bits of wisdom - database permissions, the importance of backups, and a note to do just what your mom always told you to do - clean up your (development) mess when you’re through.
Continue Reading ·
Dev Shed - October 18th, 2006
Are you interested in expanding your knowledge of creational design patterns and learning how to work with director and builder objects in PHP 5 If your answer is yes then I think you should start reading this article right now Welcome to the concluding part of the series How to Use Builder Objects in PHP 5. This series leads you through the application of the builder pattern in PHP and shows you how to use it with copious hands-on examples….
Rackspace-Managed Servers, Fanatical Support™ Full-Scale Microsoft & Linux Solutions & 0% Network Downtime! Click here now!
Continue Reading ·
PHP Developer - October 18th, 2006
As mentioned by the Zend Developer Zone in this post, Aleksey Zapparov has posted a quick tutorial on how to deal with a missing action and controller in your Zend Framework application.
You can easily make them call indexController::noRouteAction() on unexistence controllers, but on unexistence actions they’ll throw you an exception. So there is a way to change this – modify sources.
His code basicly watches for the exceptions that would be thrown from a missing action and handles then inside a try/catch. If things fail, the user gets shuttled off to the Error404 controller that dumps out the contents of the controller class.
Continue Reading ·