How can I use MVC ideas without using classes?
Posted
by jpjp
on Stack Overflow
See other posts from Stack Overflow
or by jpjp
Published on 2010-05-22T03:17:27Z
Indexed on
2010/05/22
3:20 UTC
Read the original article
Hit count: 244
As of right now, I am still shaky on classes, so I don't want to use any classes for my site. I'm still practicing with classes.
But how can I implement the MVC idea without classes?
Would this work for a MVC?
index.php (the view) index_controller.php index_model.php
Is this right for what a MVC should be?
View: show html, css, forms Controller: get $_POST from forms and any data from the user, get info from db Model: do all the functions, insert/delete in db, etc
Basically separate the HTML/css for the view, all the data collecting for the controller, and the logic for the model. And just connect them all using require_once.
© Stack Overflow or respective owner