using MVC framework in php(please help needed)?

  • Thread starter Thread starter Saka
  • Start date Start date
S

Saka

Guest
i know the idea of MVC. please check whether it is right or wong
M- for data that is all code related with database(insertion,deletion,update,retrieve) should remain in MODEL.php file or MODEL class

V- view that is all user interface related function remains in one VIEW class or VIEW.php file

C-control that is all business related functions like accounting(if related with business)should remain in CONTROL.php or CONTROL class

am i correct so far if not please feel free to give correction.

now my problem knowing this all i am confused coding with MVC framework as i think whether my idea is correct or not.

please provide me a complete example of MVC (code of MVC). so it would be helpful for me.
 
To quote Wikipedia,

MVC is often seen in web applications, where the view is the actual HTML or XHTML page, and the controller is the code that gathers dynamic data and generates the content within the HTML or XHTML. Finally, the model is represented by the actual content, which is often stored in a database or in XML nodes, and the business rules that transform that content based on user actions.

There are many different ways of organising this, and it really depends on the application so giving code would be quite meaningless unless I know more about your application
 
Back
Top