Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

malte (1708)

malte
  (email not shown publicly)
http://joose-js.blogspot.com/

Working on Joose JavaScript meta system (Blog) [blogspot.com] and blok [appspot.com], a web based application for collaborative ui prototyping.

Journal of malte (1708)

Wednesday April 02, 2003
05:58 AM

Models

[ #11399 ]

Models are subclasses of ENGINE::MVC::Model. They may choose to reimplement the init() method that is called upon instance creation (on every request). A model has a controller. It has no idea about its views.

A model implements an interface. An unlimited number of views may make use of that or a subset of that interface. Models usually implement the Facade design pattern. You can see model as a _view_ on your business objects, whatever they may be.

Models and views form an nxm relationship. There may be n views displaying a single model, and there may be m models being displayed by 1 view. A typical gui application (website) usually has multiple views that share common background functionality, so you save a lot of work here.

This kind of total separation of presentation- and business logic makes it very easy to separate the two parts into independent work processes.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • But have you seen Apache::PageKit [pagekit.org], which purports to be a very similiar design? I haven't used it, but it seems to be based on an MVC approach.

    -Dom

    • Indeed, PageKit has a similar approach. PageKit has the extra advantage of being released. So, if you want to use an MVC system now you are much better off with PageKit.

      Software is not the point, though. At least my system wasn't terribly hard to implement. The development Process is much more important assuming that you can't sell your customer something that's already done.

      Don't mistake ENGINE::MVC with a kitchen sink. It won't program your website. It doesn't provide much functionality at all. All it