X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FApache%2FMVC%2FWorkflow.pod;h=14a69300069a9531c0f760419f2cba013d266abd;hb=fa685ce517bd35c12ed6681803d9d0d6b1793159;hp=09031c00da86c2b0da10c19f6c6d5eb519c09676;hpb=feefb416b3c1aafdea07aa47378d007ee760e9f9;p=maypole.git diff --git a/lib/Apache/MVC/Workflow.pod b/lib/Apache/MVC/Workflow.pod index 09031c0..14a6930 100644 --- a/lib/Apache/MVC/Workflow.pod +++ b/lib/Apache/MVC/Workflow.pod @@ -20,11 +20,11 @@ Apache::MVC::Workflow - Describes the progress of a request through Apache::MVC BeerDB::Beer $r->call_authenticate ->authenticate ------------+------------ $r->authenticate | - $r->find_objects - | $r->additional_data | $r->model_class->process($r) + | + $r->view_object->process($r) =head1 DESCRIPTION @@ -76,34 +76,44 @@ preferred format. Next, the C method works out if this is actually something that C should care about - whether the class exists in the application, whether it supports the given action, and so -on. This should return an Apache status code; C if the request -should proceed, C if it should be passed on to the default -handlers, or whatever other codes for permissions problems. +on. The action is "supported" if it exists in the model class (or its +ancestors) and is marked with the C<:Exported> attribute; this stops web +users from firing off random subroutines in your code. + +This should return an Apache status code; C if the request should +proceed, C if it should be passed on to the default handlers, +or whatever other codes for permissions problems. =head2 Are we allowed to do this? We then look for an appropriate C method to call; first -it will try Calling the C method of the model class, or, +it will try calling the C method of the model class, or, if that does not exist, the C method on itself. By default, this allows access to everyone for everything. Similarly, this should return an Apache status code. -=head2 Find the appropriate objects - -The C method is called to populate the C slot of -the request object with the appropriate objects from the model class. - -This takes the right number of arguments off the C slot by -examining the attributes of the method in question. Read more about this -in L. - =head2 Add any additional data to the request The open-ended C method allows any additional fiddling with the request object before it is despatched. -=head2 Ask model to take over +=head2 Ask model for widget set + +Asking the model class to C the current request allows it to do +any work it needs for the given command, and populate the C and +C