views:

53

answers:

5

I am trying to migrate to zend framework. Should each webpage be a Controller or an action.

What is the advantage of having multiple actions. Can they talk to each other? and whats the best use of Action helpers and View helpers.

Please guide me on how to start on the framework.. thanks

+1  A: 

You should check that page about MVC applications, It's not precisely related to Zend. But you seems to be asking what a MVC Design Pattern is.

mnml
+1  A: 

You got to create a controller for each of your site's pages. If any page interacts with db, you should also create model for that page. Also you should create view for each of your page.

If you have no idea about MVC, you can read this:

MVC

Sarfraz
+1  A: 

Those links are from Zend Framework manual.
Do not afraid and click - read the Introduction chapters - you will have all answers. ;-)

hsz
+1  A: 

First get a sound understand of MVC Framework: Understanding MVC Architecture from its Origin (part I) http://learnnewprogramming.com/blog/understanding-mvc-architecture/

Rebol Tutorial
+2  A: 

You can use a new controller for each page or define multiple actions on the same controller to render your pages. I choose to use defferent action from the same controller to display variuos pages. Using multiple action on the same controller allows you to put some code in che constructor of the controller that is executed for each action. For example i have a controller for all the pulic pages of a website and a new controller for those pages that are reserved to registered users. In the constructor for the controller dedicated to registered user i do the check for authentication.

wezzy