> Francesco Pasqualini wrote:
> 
> an interesting feature of JSP is the possibility to use the MVC design pattern 
>(INPUT/OUTPUT/LOGIC separation)
> This is obtained  with the "forward" instruction.
> How the MVC design pattern can be implemented in the mod_perl (and specifically 
>Apache::ASP) architecture ?
> 

I don't know about MVC design patterns, but Apache;:ASP has 
these features which may help, of which $Server->Transfer()
is probably your closest match to the forward instruction:

$Server->Transfer($file)
  Transfer control to another script for execution
  with current script context including current $Session
  $Application, etc.

my $data_ref = $Response->TrapInclude($file, @args)
  print/$Response->Write() output of script does not go 
  straight to client browser, instead returns output
  in a scalar reference that you may post process as 
  you like

$Response->Include($file, @args)
  Like <!--#include file=$file-->, but @args are available
  in script in @_

$Server->Execute() is an alias for $Response->Include()

Script_OnStart, Script_OnEnd, Script_OnFlush events
  Various events called, if defined in your global.asa,
  during the life of the script execution.  Script_OnStart
  can be used to set globals available to scripts, 
  or manage things such as site wide authentication control

  Script_OnFlush is useful for post processing data
  going to the client browser in a global way.
  
XMLSubs
  Ability to create XML tags which are handled by 
  perl code execution.  The nice thing is that embedded
  tags pass their output as an argument to parent 
  XMLSubs, for example:

  <my:form action=basename($0)>
    <my:input type="button" />
  </my:form>

  The my::input sub would execute then return its HTML
  to the my::form sub in a calling structure like:
  
  &my::form(\%args, $html = &my::input(\%other_args));

-- Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Reply via email to