Catamooseのinterview

http://jjnapiorkowski.vox.com/library/post/catamoose.html
moosecatalystについての、いいinterviewですね。折角なので要点だけまとめておきます。

要点は、以下の5点くらい。

  • Moose
  • NEXT to C3
  • applicationとcontextの分離
  • Moose RoleをPluginに
  • Bread::Boardを拡張のwiringに

特にMoose RoleをPluginにという点とBread::BoardでPlugin(Component含む)郡のwiringにという2点が興味深いなと思いました。

Moose Roleについて

Moose Roles are a good fit for plugins, and will hopefully clarify some of the problems we used to have with people creating Catalyst plugins when that functionality was better off created as a base controller or model.

わかることは、

  • MooseのRoleをPluginとして使うのが適切だ
  • ControllerやModelとして作ったものがよいものについても、MooseのRoleになる可能性があるということ(世間一般でPluginといわれているものではないですが、見え方としてはPluginになるっていうことでしょう)

Bread::Boardについて

Matt Trout clarified the possible use of Bread::Board in a future version of Catalyst: “Bread::Board is going to replace the custom code in setup_components, it's -not- a replacement for the plugin system. Although we may extend Bread::Board to compose class+N roles classes for extensions, sort of like a more large-scale MooseX::Object::Pluggable.”

large-scale MooseX::Object::Pluggableというのは的確な表現だなぁと。複雑なオブジェクトの依存関係を解決してwiringしてやる役割をBread::Boardでもたしてやるって話なわけで、DIコンテナの現実的なユースケースだろうなぁと。

# どこまでがcatamooseの最初のリリースで入るんでしょうね。Moose RoleをPluginにってとこまで入ってくれるといいなぁ。