Archive for March 28th, 2007

DevShed: Building Dynamic Web Pages with Polymorphism in PHP 5

DevShed continues their look at using polymorphism in an application with the latest part of the series - “Building Dynamic Web Pages with Polymorphism in PHP 5″.

In short, Polymorphism is a feature exposed by certain objects that belong to the same family, which eventually can behave differently, even when they’re using identical methods. Or more clearly, an object can be considered polymorphic when it’s capable of performing different actions by utilizing the same method.

This time they focus on web page development that uses this object-oriented practice. The create a WebPageElement that you can ID and class attributes on and use it to create HTML widgets and extend them to create Div and Link element.

Continue Reading · Add comment

Zend Developer Zone: Security Tips #17 & #18 (When to Secure & File Uploads)

The Zend Developer Zone continues their great series of security tips with two new posts - one talking about when to focus on security and the other about file uploads.

From the first, top 17:

Application security should not be a “when all else fails” situation. It’s not something you can “put in later”. As we’ve mentioned before, there is no single silver bullet to solve your application security issues. Security is something that should be rolling around in the back of your dead in the design phase, the coding phase, the testing phase, even after you’ve rolled your code into production.

And, from tip #18:

When you allow users to upload files, your system may be at risk. Always restrict the file types that you allow. Don’t rely on a blacklist approach. […] Be careful with file uploads and make sure you protect them with a whitelist policy instead. Make sure that the file that has been uploaded is of the type that you want to allow.

Continue Reading · Add comment

International PHP Magazine: Poll Question: Which is the Best Feature for PHPExcel Version 1.0.0?

The International PHP Magazine has posted the results of their latest poll conducted over the past week. They asked developers which of the given options was the best feature of the version 1 release of PHPExcel.

Options for this week’s poll included “Creating an in-memory spreadsheet representation”, “Adding Worksheets to Spreadsheet”, and “Setting Spreadsheet Meta Data”, but in the end, it was the “None” option that won out with almost thirty percent of the votes. Tied for second, each with 2.4% of the votes were the options “Creating an in-memory spreadsheet representation”, “Setting Spreadsheet Meta Data”, and “Adding Worksheets to Spreadsheet”.

If you’d like to get in on the action for this week’s poll, check out the question and answers for the week - which one of the options is your favorite CMS written in PHP. (Options include Drupal, Joomla, and the Dragonfly CMS).

Continue Reading · Add comment

Building Dynamic Web Pages with Polymorphism in PHP 5

If you re starting to delve deeper into object-oriented programming with PHP and also want to know how to include polymorphic objects into your own scripts this might be the right opportunity to learn more about this interesting topic. Welcome to the second part of the series that began with Using polymorphism with objects in PHP 5. In three articles this series provides you with a comprehensive guide on how to take advantage of polymorphism to build more efficient object-based PHP applications….

Search Site Optimized for Developers and IT Pros Fast and relevant. Find technical documents, podcasts, whitepapers, research and blog posts.

Continue Reading · Add comment

David Coallier’s Blog: PEAR is using jQuery et new features

David Coallier points out a new feature of the main PEAR website (http://pear.php.net) - integration of the jQuery framework to help with the administration of a recent addition to the site, user comments.

http://pear.php.net is now using jQuery for some sections of the administration area in order to view user notes/comments and that I will be starting implementing more sections over the site within the next few weeks (Of course this will all be done once we have split the code completely into templates, views, controllers, MDB2 move, etc)

He also makes some comments about the number of Javascript frameworks out there and a mention of the roadmap for the rest of the features they plan to add to the PEAR site.

Continue Reading · Add comment