From dbaa73455bdbb63e09581e807d0ae87ec92dd087 Mon Sep 17 00:00:00 2001 From: David Baird Date: Tue, 8 Nov 2005 11:31:23 +0000 Subject: [PATCH] Modified Manual/Inheritance.pod in response to Kieren's email to the list. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@419 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole/Manual/Inheritance.pod | 39 +++++++++++++++++++++--------- wishlist.txt | 6 +++-- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/lib/Maypole/Manual/Inheritance.pod b/lib/Maypole/Manual/Inheritance.pod index 6c6c6b7..bff339d 100644 --- a/lib/Maypole/Manual/Inheritance.pod +++ b/lib/Maypole/Manual/Inheritance.pod @@ -30,11 +30,11 @@ application. =back -=head1 A standard Maypole application +=head1 Structure of a standard Maypole application -A minimal Maypole application (such as the Beer database) consists of a -custom driver class (BeerDB.pm), a set of auto-generated model classes, and a -view class: +A minimal Maypole application (such as the Beer database example from the +L synopsis) consists of a custom driver class (BeerDB.pm), a set of +auto-generated model classes, and a view class: THE DRIVER @@ -92,9 +92,10 @@ itself in the hierarchy, but this was unnecessary). =head2 Who builds the model? -First, remember we are talking about the standard, unmodified Maypole here. -It is possible, and common, to override some or all of this stage and build a -customised model. +First, remember we are talking about the standard, unmodified Maypole here. It +is possible, and common, to override some or all of this stage and build a +customised model. See below - An advanced Maypole application - for one +approach. Also, see L C method. The standard model is built in 3 stages. @@ -110,10 +111,12 @@ Next, C B L onto the C<@ISA> array of each of these classes. Finally, the relationships among these tables are set up. Either do this -manually, perhaps with the help of L, or use -L. In the latter case, you need to set up the -relationships configuration before calling C. - +manually, using the standard L syntax for configuring table +relationships, or try L (which you can use via +L). If you use the plugin, you need to set up the +relationships configuration before calling C. Be aware that some people +like the convenience of L, others dislike the +abstraction. YMMV. =head1 An advanced Maypole application @@ -270,6 +273,20 @@ calls on the underlying model. Whatever label you prefer to use, this approach provides for clear separation of concerns between the underlying model and the web/user interface, and that's what it's all about. + +=head1 Advanced applications - building the model by hand ** TODO + +- using Maypole::Model::CDBI::Plain or Maypole::FormBuilder::Model::Plain +- setup_model() and load_model_subclass() +- cutting out all those separate paths to CDBI - they're confusing + + +=head1 Method inheritance ** TODO + +More description of Perl's left-to-right, depth-first method lookup, and where +it's particularly important in Maypole. + + =head1 AUTHOR diff --git a/wishlist.txt b/wishlist.txt index 21cdea9..8a73797 100644 --- a/wishlist.txt +++ b/wishlist.txt @@ -11,6 +11,8 @@ Move template test out of process() and into handler_guts() - maybe Fix bug 14570 - returning error codes breaks CGI::Maypole Write Maypole::Manual::Exceptions +Fix Mp::P::USC + 2.12 ==== Maypole::instance() @@ -24,7 +26,7 @@ in HTTP::Response object add email handling - like Rails - via model plugins -add validation layer, or just an API +add validation layer(s), or just an API -killer apps: SVN model; mitiki; Pet Shop; +killer apps: SVN model; mitiki; Pet Shop; -- 2.39.5