You are not logged in.
Pages: 1
Hello, how are you?
I have studied Zend and Doctrine and would like to clarify a doubt with you if possible.
With the priority always get the idea of not repeating code. In my projects I see that every controller has the basic CRUD.
What you have as an ideal to display a list of captured data from the database?
I've created two classes that make this process but I am still not satisfied.
And what is his method of project development in working with zend module to avoid repeating code and leave a cleaner, faster programming?
Offline
hey Rafael,
I think there's some great tricks for cutting down repetition in PHP by using reflection.
for example, you can call methods like this:
$obj = new "My_Prefix_".$objName();
$obj->$property = $someValue;
often times in frameworks like Zend and Doctrine, you're writing a lot of mapping / wrapping code. dynamic property assignment and object creation can really help you in those instances.
I'll be putting a video together about this soon!
Hope that helps,
-
Jon
Offline
Pages: 1