Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-19-2008, 01:58 PM
Member
 
Join Date: Feb 2008
Posts: 46
Question Need Simple Model, View, Controller files .

Hai all,

I am doing one book management process using ZFwork. I dont understand the full looping of this Framework. Can anyone give me some idea on this to do this application.?
I just done the folder structure. Created Book Controllers with different functions(addAction, editAction, deleteAction, updateAction) like that.
I dont know whether i am doing this in a proper way or not.?

Can anyone tell me where i have to keep the models and whats the content of that model.?

Thanks in advance.
Mugesh.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 03:15 PM
Senior Member
 
Join Date: Jan 2008
Location: chicago
Posts: 101
Default

models are only used to represent tales in the database. You don't even necessarily need them. Each time a request is made to the web site, it loads the bootstrap file which in turn loads the Front Controller. Make sure you have IndexController.php defined and indexAction() defined inside that class for your default page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 06:37 AM
Member
 
Join Date: Feb 2008
Posts: 46
Default Re:Need Simple Model, View, Controller files .

Ok. thanks.

-Mugesh.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 06:46 AM
Member
 
Join Date: Feb 2008
Posts: 46
Question How to pass the values thru query string?

Hi,

My application url is: http://localhost/html/index.php/user/list
This is for listing the users. To do edit option, i need to pass the id=2 in the same url.
(http://localhost/html/index.php/user/list/id=2) LIKE THIS;
while doing like this, its not working. Then how can i pass these kind of information thru url?

-Mugesh.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 08:07 PM
Senior Member
 
Join Date: Jan 2008
Location: chicago
Posts: 101
Default

Make sure you have your bootstrapping set up correctly.

All URLs in the Zend Framework are defined like so:

PHP Code:
http://yourdomain.com/controller/action/key1/value1/key2/value2/key3/value3/ 
SO if you are using the UserController and have the listAction() function defined within UserController, you would write the url like so:

http://localhost/user/list/id/2

You shouldn't need to have to put 'html' in the URL. You should have the 'html' folder be the Document Root.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:28 AM.