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
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.4k
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
1.9k
ThinkPHP #2: Безопасность веб приложений
thinkphp_com_ua
1
3.5k
Other Decks in Programming
See All in Programming
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
300
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
5.4k
Design Foundational Data Engineering Observability
sucitw
3
210
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
460
はじめてのMaterial3 Expressive
ym223
2
930
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
180
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
320
Platformに“ちょうどいい”責務ってどこ? 関心の熱さにあわせて考える、責務分担のプラクティス
estie
1
240
iOSからFlutterへ20代エンジニアの転身とWidget Preview実践
nappannda
0
100
個人開発で徳島大学生60%以上の心を掴んだアプリ、そして手放した話
akidon0000
1
170
アセットのコンパイルについて
ojun9
0
130
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.2k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
820
Practical Orchestrator
shlominoach
190
11k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Designing Experiences People Love
moore
142
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
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
Спасибо за внимание