Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to learn Zend Framework?

Tags:

php

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???

like image 343
winteck Avatar asked Oct 12 '11 21:10

winteck


People also ask

How do you use Zend?

Zend framework contains collection of PHP packages which can be used to develop web applications and services. Zend was started by Andi Gutmans and Zeev Suraski. This tutorial will give you a quick introduction to Zend Framework and make you comfortable with its various components.

Is Zend better than laravel?

Laravel has a steep learning curve to master the framework, whereas Zend has a hard learning curve and takes time to implement. Laravel has poor performance and speed compared to Zend, whereas Zend improves application performance and provides a good response for the server request.

How do I make a Zend project?

Open a terminal (in Windows, Start -> Run, and then use cmd). Navigate to a directory where you would like to start a project. Then, use the path to the appropriate script, and execute one of the following: % zf create project quickstart.

Is Zend Framework free?

If you are looking for a professional solution with monitoring and root-cause analysis, job queues, code tracing, caching, etc., you can download the 30-day trial, free edition of Zend Server.


1 Answers

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.

like image 98
Melsi Avatar answered Nov 07 '22 08:11

Melsi