koshigoewiki/php/デザインパターン.txt · 最終更新: 2005/12/04 17:15 by koshigoebushou
突然ですが、きっとあなたも使っているデザインパターンシリーズ 何気なく書いていたあのクラスが無意識的にNullObjectパターンやHook Operationパターンを適用していることがここ最近多い気がしませんか? 僕の場合はS2Daoを通して見付けた(身に着けた)ものが多いんですが、今回はそのS2Daoより、簡単に書けるHook OperationパターンとNullObjectパターンをPHP5で書いてみます。 Hook Operationパターン 「Hook Operationパターン」にも書かれていますが、あるクラスの処理の前と後ろに、別の処理を実行したいことがあります。 AOPとか特別なことはせずに、あるクラスの前処理と後処理を呼び出します。 あるクラスの処理を「Process」クラスの「execute」処理とし、別の処理(前・後)は「Hook」インタフェースを実装するクラス
Submitted by Anonymous (not verified) on Wed, 2006-07-26 11:17. Hi, Yes there is a slew of php pattern libraries emerging. I like your attitude to smudging the edges of patterns, idioms, though I am not experienced enough to understand it. "Showing the shape of patterns" I like that (actually I need it). If I am researching how people use a particular pattern, then I will stop by your site. It s
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く