From Kohana to ZendFramework in about 30 minutes

I am pleased to say that it took me only about 30 minutes to transfer a basic site writte on Kohana to the ZendFramework, both frameworks make it easy to switch between each other. For one thing you can use the ZendFramework Library in Kohana (although I haven’t done it myself people declare is rather easy)

The thing I like the most about the ZendFramework is their tool which comes as a part of their library download. I have mainly used the tool to create the controllers and actions and so far it has been a time saver and has helped me to see how the framework works in a few keystrokes.

After the first site was a success the next step will be to convert a site with a simple CMS built in Kohana to the ZendFramework, I have to admit that there were two things that held me back for a while into using the ZendFramework.

Speed

I read in different blogs how slow ZendFramework was compared to other frameworks such as Kohana, CI, CakePHP and even the new framework called Yii. The graphic below is one of my many findings:


(Source yiiframework.com)

But it is obvious that as the time goes by the framework is getting better and seems like it is getting faster as well.

Initial setup

When I tried the framework for the first time was about a year ago or so, it was brand new and people were still getting their heads around it as well as was very limited content in the subject so my first attempt to try it was a failure but months later I come back and wow, what a difference. Not only that but I stayed away from the full package and downloaded the minimal package and started just with the library and it was a breeze.

It is nice to have different packages to choose from and that they get better day by day. So far Zend has made it an easy transition and a nice new PHP development start.

YourPay some common errors and solutions

When working with YourPay service there some small issues you might run into and so I can remember in the future I am listing them here.

Fraud issue

If hit the server several times for testing you might be tempted to hit it with the same amount but remember that even though for you they are different hits, the store is receiving the same “client” hit so they will reject you request by marking it as a fraud.

Fraud Solution

Hit the server with different totals, even a minimum of 1 cent in difference between transactions is enough for you to get successful transactions with the store.

Store not able to process orders

One common issue is that when you hit the server from a page that is not registered with the application, YourPay will not recognize your store request and thus reject your request and it will break the whole experience.

Store not able to process orders solution

Always remember to change the location where YourPay is expecting your request, this could be easily forgotten when you are testing from different points on your servers or you are testing from Dev and then move everything to production.