Blog

Reduce duplicated code in Zend_Controller_Action

In most of the Zend Framework projects that i worked on, i had some common actions such as, listAction, newAction, and editAction. Each of these actions have similar structure and code lines. The differences are in the name of the model or the form or the messages on a successful submission and errors.

Custom Flash Messenger for Zend Framework

FlashMessenger is an action helper in Zend Framework used to pass messages for the users on the next request. Thats all good, but what about presenting the messages for the users? how to store different type of messages, System, Error, or Success messages?

Query weekly meetings in MySql

In one of my current projects, I wanted to create a view box that shows a list of regular meetings in the current week. The meeting table was: id title description startdate enddate 1 Meeting 1 ….. 17/10/2009 19/10/2024 2 Meeting 2 ….. 18/10/2009 18/11/2009 3 Meeting 3 ….. 14/10/2009 18/11/2010

PHP string functions to Class

Would it be better if all PHP string functions are methods of a String class? Would that make working with strings an easy job? and make the code easier to read and maintain? Here is my experiment on wrapping some of the built in functions into a class.

Image view helper for Zend Framework

Image view helper to generate an image tag Arguments to pass are: Uniqe name for the image tag. Will be the id attribute. Path to the image file. Tag Attributes. (alt tag is required and it will generate the title tag with the same value) Optional string parameter. Currently if you enter thumnail it will…

Hello world!

Hello world 🙂 This is my first post on my first blog. I am hoping my new journey will be a great one, learning new things and sharing my knowledge with everyone on the net who is interested. I am going to share my thoughts in PHP, Javascript, HTML, CSS and maybe others. Also, I will…