PHP Objects, Patterns and Practice (3rd edition)
CHAPTER 12 ■ ENTERPRISE PATTERNS If this is the first run (or if the cache files have been deleted—a crude but effective way of ...
CHAPTER 12 ■ ENTERPRISE PATTERNS A logical strategy is more flexible, but also more labor intensive, in terms of both setup and ...
CHAPTER 12 ■ ENTERPRISE PATTERNS You may wonder why this code takes it on trust that the Command class it locates does not requi ...
CHAPTER 12 ■ ENTERPRISE PATTERNS The Request object is also a useful repository for data that needs to be communicated to the vi ...
CHAPTER 12 ■ ENTERPRISE PATTERNS As you can see, most of this class is taken up with mechanisms for setting and acquiring proper ...
CHAPTER 12 ■ ENTERPRISE PATTERNS As you can see, the feedback message set in by the default command has found its way into the ...
CHAPTER 12 ■ ENTERPRISE PATTERNS Having said that, once you have successfully deployed a Front Controller in one project, you wi ...
CHAPTER 12 ■ ENTERPRISE PATTERNS This level of hard-coding is fine, as long as the commands will always be used in the same way. ...
CHAPTER 12 ■ ENTERPRISE PATTERNS } $this->invokeView( $app_c->getView( $request ) ); } function invokeView( $target ) { in ...
CHAPTER 12 ■ ENTERPRISE PATTERNS quickadd addvenue AddSpace addspace ListVenues ... This simplified XML fragment show ...
CHAPTER 12 ■ ENTERPRISE PATTERNS addvenue AddSpace So here, the addvenue view is associated with the AddVenue command (as set ...
CHAPTER 12 ■ ENTERPRISE PATTERNS //... class ControllerMap { private $viewMap = array(); private $forwardMap = array(); private ...
CHAPTER 12 ■ ENTERPRISE PATTERNS Recall this fragment: addvenue AddSpace Here is the call the parse code will make to add th ...
CHAPTER 12 ■ ENTERPRISE PATTERNS $req->setProperty( 'cmd', $forward ); } return $forward; } private function getResource( Req ...
CHAPTER 12 ■ ENTERPRISE PATTERNS // we now have a command name in $cmd // turn it into a Command object $cmd_obj = $this->res ...
CHAPTER 12 ■ ENTERPRISE PATTERNS The strategies an application controller might use to acquire views and commands can vary consi ...
CHAPTER 12 ■ ENTERPRISE PATTERNS ); private $status = 0; final function __construct() { } function execute( \woo\controller\Requ ...
CHAPTER 12 ■ ENTERPRISE PATTERNS Some of this code will make more sense in the next chapter. For now here's a stub Venue object ...
CHAPTER 12 ■ ENTERPRISE PATTERNS Page Controller Much as I like the Front Controller pattern, it is not always the right approac ...
CHAPTER 12 ■ ENTERPRISE PATTERNS <?php print $venue->getName(); ?> <?php } ?> This document has two elements to ...
«
9
10
11
12
13
14
15
16
17
18
»
Free download pdf