Results 1 to 25 of 72
Thread: [MVC] Implementation issues
May 16, 2005, 15:05 #1
- Join Date
- Mar 2004
- 0 Post(s)
- 0 Thread(s)
[MVC] Implementation issues
I have a few fundamental questions regarding...pretty much everything that has to do with developing a successfull MVC application. Ok, lets start with probably the easiest one concerning Front Controller and Page Controller.
If you implement the Front Controller, you let your index.php be your single entrypoint to the application, and conversely, with the Page Controller you implement a Controller for every page, thus you'll get multiple entrypoints.
However, with the Page Controller you don't have to be concered with the Action Mapping since it will be hardcoded(?) in the controllers. This is not the case with the Front Controller, and my question is, how should I implement the Action Mapping for the Front Controller? (I may have misunderstood the whole concept of Action Mapping, but isn't its purpose to restrict the FrontController from executing an arbitrary action by altering the appropriate $_GET variable manually? For example, if the client is at your index page, he shouldn't be able to execute the...say ListMostActiveUsersOnTheForum Action just by manipulating the URL from index.php to index.php?action=ListMostActiveUsersOnTheForum), right?)
How can a ActionChain / Composite View pattern help me when I want to generate a complex page? I'm mainly interested in code examples regarding this issue.
What is the best way to transfer data from the Model to the View? Or should I let the View fetch the data it needs?
Hmm, that's about it...for now