タグ

mvcに関するlabochoのブックマーク (3)

  • MVCは死んだ。MOVEするときがきた - きしだのHatena


    Conrad IrwinMVC is dead, it's time to MOVE on. MVC is dead, it's time to MOVE on. CC-BY-3.0 13:58 MVCMOVE使 -  MVCMOVE MVCUI  MVC
    MVCは死んだ。MOVEするときがきた - きしだのHatena
  • Buckblog: Skinny Controller, Fat Model

    18 October 2006 — The "Fat Controller" anti-pattern is shown and dissected, and the reader is taken through the process of refactoring it into a more readable, maintainable, and testable solution — 5-minute read When first getting started with Rails, it is tempting to shove lots of logic in the view. I’ll admit that I was guilty of writing more than one template like the following during my Rails

    labocho
    labocho 2010/05/03
    データの整形なども含めたロジックの大部分をmodelに。controllerはone-line action、viewはmostly HTMLで。
  • CakePHP コントローラに処理を書かずにモデルにメソッドを追加しよう! | Sun Limited Mt.

    CakePHP だけではなくフレームワーク全般に当てはまることだと思います。 Fat models and how they change how you use the Model class – cakebaker 私もフレームワークを使い始めた当初はそうだったのですが、モデルに最初からあるメソッドだけを使用してコントローラでなんでもかんでもやってしまっていました。 そうではなく、もっとモデルにオリジナルのメソッドを追加して、コントローラではそれを使用した方がコントローラもすっきりして後から見たときにも何をしているか分かりやすいと思います。 例えばブログの最新エントリ10を find する場合コントローラに $this->Post->findAll(array('Post.is_published' => true), null, array('Post.published DESC'

  • 1