-
Notifications
You must be signed in to change notification settings - Fork 666
Developer Guide: ThinkUp's Model View Controller Implementation
finn edited this page Nov 1, 2010
·
7 revisions
ThinkUp does not use an MVC framework, but it does employ the Model-View-Controller design pattern.
-
Model – ThinkUp’s model objects live in
/thinkup/webapp/_lib/model/. Model object filenames start with the prefixclass.. For example, thePostobject is located in theclass.Post.phpfile.
-
View – ThinkUp’s views are Smarty templates, files with the
.tplextension, located in the/thinkup/webapp/_lib/view/directory. As a general rule, HTML markup should never appear in a PHP file; only in a template file.
-
Controller – ThinkUp’s controllers live in
/thinkup/webapp/_lib/controller/. Each controller should extend eitherThinkUpControllerorThinkUpAuthController. ExtendThinkUpAuthControlleronly if the user should be logged in to perform the action. The PHP pages which the user requests in the browser only instantiate the appropriate controller, and echo the results of itsgo()method.