Meet Yaf… What?
At Venditan, we like to keep up with the latest technology to assist us to build fantastic websites for our clients. In January of last year, the stable 2.2.9 release Yaf (Yet Another Framework) was released and we just had to have a play. Yaf is the first PHP MVC framework to be written in C and built as a PHP extension. The framework was written by laruence, who is also a PHP development team member leading APC development. It is considered the fastest and lowest resource consuming PHP framework around at the moment, and has been well tested in production applications in a number of large organisations.
As of now, we have three websites in production that are implemented using Yaf, and the performance is incredible, not that this is unexpected since it’s written in C. The benchmarks completed on Yaf are also overwhelming, with one result showing that Yaf is able to make 5331 requests per second, opposed to 634 requests per second for Zend, and 2300 requests per second for CodeIgniter.
Caught your attention? I hope so, but where to start? Yaf is a PECL extension and as such is easy to install. The documentation available is fairly limited, with the most detailed documentation written in Chinese which proves a little difficult to understand using Google Translate. We were fortunate enough to find some example PHP applications on Github which we were able to review to help us write our first sample application. I found the following flowchart helped me understand Yaf better and allowed me to see Yaf’s support for Bootstrap and its plug-in mechanism.
Over the past year, we have written a Yaf application that uses our VenditanSDK to communicate with the Venditan eCommerce API. We have extended on the Yaf Route Interface, allowing us to manage the routing based on responses from the API. Adding to the router stack within the Bootstrap is very simple and documented well within the PHP Docs.
In future posts we will look at the benchmarks in greater detail and how we overcame issues such as multiple template sets, but I hope this quick look at Yaf has inspired you to take a closer look.
All Most Recent Posts
5 Key Things to Consider when Re-launching your eCommerce Website
Visit a Category
Transfer to Venditan Commerce today and we’ll invest £10,000 into the project with you.CONTACT US TO FIND OUT MORE
A single integrated solution
“We were constantly selling something online that hours earlier we had sold on the shop floor and frequently frustrating customers who wanted to redeem gift vouchers online that they had bought in-store, or vice-versa.
We knew we needed to end the previous approach of using different systems to run different parts of our business. The Venditan Commerce solution gives us great visibility across our entire stock, in real-time, no matter where we want to sell it.”
Shankara Smith, Founder