model view controller - Which MVC Diagram is Correct? (Web app) -
which mvc diagram correct? each have different arrows...
diagram 1
diagram 2
http://blog.stannard.net.au/blog/media/simple-mvc-framework/mvc.gif
diagram 3
diagram 4
http://java.sun.com/blueprints/patterns/images/mvc-structure-generic.gif
diagram 5
they are.
mvc vague pattern.
my view on mvc :
controller
object has collection of models , has methods viewing , editing models. talks models , returns instances of views models applied on them.
view
has definition of model attached , set of functionality display specific model.
model
encapsulates data. has methods returning state , changing state.
//controller import views class controller private models //view import model class view //model class model
a model doesn't need know view / controller. view needs know definition of model. controller needs own models , needs know definitions of views.
you can couple them more tightly, optional.
Comments
Post a Comment