How a noob tryin to learn Zend Framework
“Helpers” in Zend Framework — What are these creatures?
February 18, 2012Posted by on
So, when I was getting familiar with Zend Framework I’ve encountered with the concept of “Helpers”. Now I know that understand ZF without the knowledge of what these “Helpers” are is impossible.
Because I was noob (and still I am), I was surprised to see that we can speak about “Action_Helpers” and “View_Helpers”, too.
So first I wanted to understand whats the difference between these two basic types of Helpers. I found a very nice and short comparsion on stackowerflow about this. I copy-paste the main idea behind these Helpers:
“An ActionHelper is for reusable functionality needed in the actions of your Controllers, while a ViewHelper is for reusable functionality in your View Templates…”
Now I understood the theory or “motivation” behind the concepts of _Helpers. Of course the job just half way done. In order to understand fully what a Helper is doing one needs to know how create/use them exactly in action..
So I found the following VERY clear short tuts:
- Lysender’s short tutorial about Action_Helpers.
- akrabat’s also short and also great tutorial about View_Helpers.
Both are very nice tutorials. Highly recommended who wants to understand the basics of _Helpers.