Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bluz - наш код как музыка.

fwdays
October 21, 2013

Bluz - наш код как музыка.

fwdays

October 21, 2013
Tweet

More Decks by fwdays

Other Decks in Programming

Transcript

  1. Why? •  Почему не "as is"? •  Почему не ZF2/Symfony2?

    •  Почему не Yii? •  Почему не Kohana/CodeIgniter? •  Почему не Silex/Slim/etc? •  Почему не Phalcon?
  2. Usability кода. Profit! •  Изучаю проект за час •  Нахожу

    баги по скриншоту •  Копирую и работает
  3. PHP 5.4+ •  PSR-0 •  PSR-1 •  PSR-2 •  PSR-3

    •  namespaces •  closures •  traits •  goto
  4. Ещё… •  Composer •  RequireJS (for AMD) •  jQuery • 

    Twitter Bootstrap •  GitHub - https://github.com/bluzphp •  Travis CI •  support redactorjs •  support backbone
  5. Model V C <?php namespace Application\Users; class Table extends \Bluz\Db\Table

    { protected $table = 'users'; protected $primary = array('id'); } /** * @property integer $id * @property string $login */ class Row extends \Bluz\Db\Row { }
  6. M V Controller <?php return /** * @privilege View-Profile *

    @cache 5 minutes * @route /profile/{$id}/ * @param integer $id * @return \closure */ function ($id) use ($view) { $view->user = Users\Table::findRow($id); };
  7. Help! •  RESTFul Controller •  CRUD Controller •  Grid компонент

    •  DBQuery Builder •  Mailer ~~ PHPMailer •  Translate ~~ gettext
  8. Write less do more <a class="ajax" href="/get">...</a> <a class="confirm" href="/block"

    data-id="42" data-confirm="Are you sure?">...</a> <a class="ajax confirm" href="/block" data-id="42">...</a> <form action="/login" class="ajax" > <input type="text" name="login"/> <input type="password" name="password"/> <button type="submit"> </form>