简体   繁体   中英

how to learn Zend Framework?

I have been fighting with zend framework for quite some time now. The issue is not PHP itself but these myriad of classes and the relationships between them. for example: i started reading this :http://framework.zend.com/manual/en/learning.layout.usage.html Well everything is fine until the author mentioned the following: To initialize Zend_Layout, add the following to your configuration file

 resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
    resources.layout.layout = "layout"

Now the question is why doing it this way?. I feel like i am just copying an pasting without any real explanation. Then he started using :

  $this->layout()->content

I am like wow!!! wait a minute where is this layout() method located and i kept chasing these methods and classes until i get dizzy and give up.

I have a feeling that i am approaching it (the zend framework ) the wrong way. can anybody give me an idea on the best way to approach Zend framework? Again it is not really about the PHP, it is more about the relationship between the objects.

I feel that i am delving into a spaghetti of classes PLEASE HELP???

My opinion is that the learning curve for a framework is steeper than normal php, especially for zend. If you have the time and will I suggest that you start with a very small mvc, you'd better go with a tutorial for a really small mvc that you can built on your own.

This should be easy to do, experiment with it a little bit, (even extend it more) and get used to the mvc philosophy and I am sure when you will go back to zend things will be very much easier.

=====================edited================================

I like this one very much, get it here . Understanding the theory is one thing and reaching the point when you say "I know what is needed for this small mvc to be great.." is an other thing. As for zend you could proceed mostly as a new needs appear, so you don't get tired, knowledge never ends and we have a life to live too!

Going straight into the classes code now, will make it difficult. There is a lot of documentation for Zend, you benefit from it as it takes you step by step.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM