Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ThinkPHP #7: Bluz - наш код как музыка
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
thinkphp_com_ua
July 25, 2013
Programming
0
2.2k
ThinkPHP #7: Bluz - наш код как музыка
thinkphp_com_ua
July 25, 2013
Tweet
Share
More Decks by thinkphp_com_ua
See All by thinkphp_com_ua
ThinkPHP #7: Оптимизация верстки для High-Density дисплеев
thinkphp_com_ua
0
2.3k
ThinkPHP #7: Адаптация веб-сайта под различные дисплеи
thinkphp_com_ua
0
2.4k
ThinkPHP #6: Usability кода
thinkphp_com_ua
0
1.5k
ThinkPHP #6: Нелёгкий труд интервьюера
thinkphp_com_ua
2
1.5k
ThinkPHP #6: Адаптивный дизайн - время пришло!
thinkphp_com_ua
0
1.5k
ThinkPHP #3: Highload не кусается
thinkphp_com_ua
1
2k
ThinkPHP #3: Оптимизация быстродействия Веб-сайта
thinkphp_com_ua
1
1.9k
ThinkPHP #3: Дизайн пользовательских интерфейсов для разработчиков
thinkphp_com_ua
1
2k
ThinkPHP #2: Безопасность веб приложений
thinkphp_com_ua
1
3.5k
Other Decks in Programming
See All in Programming
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
300
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
180
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
330
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
180
Nuxt Server Components
wattanx
0
120
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
180
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
飯MCP
yusukebe
0
340
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
110
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
420
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
140
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
300
Ethics towards AI in product and experience design
skipperchong
2
240
Tell your own story through comics
letsgokoyo
1
870
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Claude Code のすすめ
schroneko
67
220k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
480
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
91
Statistics for Hackers
jakevdp
799
230k
Technical Leadership for Architectural Decision Making
baasie
3
300
Transcript
BLUZ Наш код как музыка http://j.mp/bluzphp
Music? O RLY?
Why? • Почему не "as is"? • Почему не ZF2/Symfony2?
• Почему не Yii? • Почему не Kohana/CodeIgniter? • Почему не Silex/Slim? • Почему не Falcon?
Usability кода • Стандарты кодирования • Отсутствие избыточности • Читаемость
кода • Предсказуемость кода
Usability кода. Profit! • Изучаю проект за час • Нахожу
баги по скриншоту • Копирую и работает
PHP 5.4+ • PSR-0 • PSR-1 • PSR-2 • PSR-3
• namespaces • closures • traits • goto
sth • composer • jQuery • RequireJS (for AMD) •
Twitter Bootstrap • GitHub - https://github.com/bluzphp • Travis CI
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 {} /models/Users/Table.php /models/Users/Row.php
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); }; /modules/users/controllers/profile.php
M View C <h2><?=$user->login?></h2> <a href="<?=$this->url("users", "profile", ["id"=>$user->id])?>" class="ajax">view</a> <h2>admin</h2>
<a href="/profile/1" class="ajax">view</a> /modules/users/views/profile.php
Packages • RESTFul CRUD • Grid • DBQuery Builder •
Mailer ~~ PHPMailer • Translate ~~ gettext
Declarative Front End Dev <a class="ajax" href="/get">...</a> <a class="confirm" href="/delete"
data-id="42" data-confirm="Are you sure?">...</a> <a class="ajax confirm" href="/delete" data- id="42">...</a>
Performance (rps)
Performance (bytes)
Generation P • Модули готовые к изменениям • Модули готовые
к использованию • Skeleton готовый к использованию
Source https://github.com/bluzphp
Спасибо за внимание