Exploring Zend_Controller class of Zend Framework

Posted by Dmytro Shteflyuk on under PHP

Zend Framework team works with gusto on the Zend Framework, great framework for building powerful web-applications in PHP. But too many peoples are confused with its seeming complexity. In this post I will try to explain architecture of most useful part (in my opinion) of Zend Framework – Zend_Controller.

Read the rest of entry »

Correct Last-Modified header processing

Posted by Dmytro Shteflyuk on under PHP

This is quick post about Last-Modified header. Please imagine following situation: you have image stored in your database and you need to send it to the browser on some request. But image extraction from database takes some time, and if there are more than one image you Web-server’s productivity will decrease dramatically. Is this case you need to implement caching functionality in your application. All images can be changed therefor you need to have ability to check image modified date (for example, this date can be stored in same database).

Read the rest of entry »

Creating browser-friendly RSS feeds

Posted by Dmytro Shteflyuk on under Development

RSS-feeds become the most popular content format in the web todays. There are tons of RSS-readers, aggregators, desktop and online tools for viewing feeds in the world. But what about Web-browsers? Every day I make same mistake: I click “RSS-feed” link and my browser displays XML-source of the feed. Why I can’t examine feed directly in my browser?

In this article I’ll try to create feed which will be displayed pretty well both in browser and RSS-reader. I’ll use XSLT 1.0 technology to do it (because my Firefox does not support XSLT 1.1).

Read the rest of entry »

Zend Framework: Thoughts about Zend_Config

Posted by Dmytro Shteflyuk on under PHP

In Zend Framework’s mailing list discussion about Zend_Config class is in full swing. I have my own ideas about this class and I will try to explain their here. I need something that can load and save configuration into different storages (for example, XML, database or plain text like INI-files), it’s necessary to have ability to change every parameter of storage (for example, file name, database tables or even database structure), it will be able if I can extend storage system with my own storage strategies.

Read the rest of entry »