Welcome to Abdul Malik Ikhsan's Blog

Zend Framework 2 : Using Zend\Cache and HydratingResultSet to Save Database Resultset into Cache

Posted in Teknologi, Tutorial PHP, Zend Framework 2 by samsonasik on September 27, 2012

Re-load data from the database every web was accessed is not good for your server ‘health’. Zend Framework has a component named Hydrator. The Hydrator is a simple component to provide mechanisms both for hydrating objects, as well as extracting data sets from them.
To save database ResultSet into cache, You need to use Zend\Db\ResultSet\HydratingResultSet which can extract the resultSet into associative array. In this post, i will show you how to cache your database resultset into filesystem.

Continue Reading

Zend Framework 2 : Create Custom Error Page

Posted in Teknologi, Tutorial PHP, Zend Framework 2 by samsonasik on September 19, 2012

In production Application Environment, we should handle error page that user will be viewed. In Zend Framework 2, we can create our custom error page which show the user that the page is error, but not show them the exception.

Continue Reading

Zend Framework 2 : ViewFeedStrategy : Generating Feeds

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on September 18, 2012

Beside DefaultRenderingStrategy, ViewPhpRendererStrategy, and ViewJsonStrategy, Zend Framework 2 has ViewFeedStrategy that can be used in rendering generated feeds. It use FeedModel to utilize the strategy.

Continue Reading

Zend Framework 2 : Using Captcha Image in Zend\Form

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on September 12, 2012

Zend Framework provide a component named Zend\Captcha\Image that can be integrated with Zend\Form. It’s very fast to create a captcha image, and put to our form application. I will give an example to you how to work with it.

Continue Reading

Zend Framework 2 : Step by Step Create Console Application

Posted in Tutorial PHP, Zend Framework 2 by samsonasik on September 5, 2012

Sometimes, console is more interactive than GUI, and quicker to be executed. Console Application often need by cron job or generator for your datawarehouse that summarize your transactional data. It’s very easy in Zend Framework 2.
Just define console route, register controller invokables, set help for command line ( if necessary ), and run it.

Continue Reading