|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re^3: Implementing Model-View-Controllerby pileofrogs (Priest) |
| on Jan 04, 2006 at 20:23 UTC ( [id://521080]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Okay, then if I get this right, I might create an object, called User or Method::User which contains all the internal data for a user as well as methods for normal actions on that data, like get_age() or whatever. It also contains any persistence (db) or other features. That's the Model. I'm still fuzzy on what makes the View and Control. My best guess is that View is a bunch of formatting functions, and Control uses both the Method object and the View functions to give you web pages. Am I right? For example, I want a list of everyone who has blue hair. The control might be bluehair.pl, a user callable CGI. It would instantiate a bunch of User (or Method::User) objects and use User->has_blue_hair() to pick the ones that had blue hair. Then maybe it would use CGI.pm to present the View. Warmer? Still missing it? Thanks -Pileofrogs
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||