より詳細なCQRSに関する資料はこちら https://little-hands.hatenablog.com/entry/2019/12/02/cqrs 参考資料:http://little-hands.hatenablog.com/entry/jjug2017fall 社内新規プロダクトでDDD, CQRSの思想をベースとしたアーキテクチャを構築し、コマンド(更新系処理)ではSpring Data JPA(Hibernate)を、クエリ(参照系処理)ではjOOQを採用しました。 結果としてそれぞれのORMの良いところを生かした組み合わせのアーキテクチャが構築できたので、その経緯と得られた知見についてお話ししたいと思います。 以下のようなトピックを考えています。 ・CQRSの定義とメリットデメリット ・DDD,CQRSを検討するにあたってのORMの選定ポイント ・構築したアーキテクチャ
結構人気なPHPのDIコンテナhttps://github.com/auraphp/Aura.Diコンテナをシリアライズできるっぽい?A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.サービスロケータとして使用するなと言ってる向いてねーぜ!用意されるゲッターメソッド(get(), newInstance())を使用するとコンテナがロックされる後から編集不可になる遅れて何か変更を加えるならlazy*()使え以下、ドキュメントから読み解いた機能コンストラクタインジェクションとセッターインジェクションをサポート継承クラスの場合、親クラス
The Dependency Injection Container in Symfony2 allows components to be injected with their dependencies, and is often used as a Service Locator, which when combined with the DI-container pattern is considered to be an anti-pattern by many. In this article, Toptal engineer Vasilii Lapin shows us how you can build a simple Symfony2 application using the DI-container, but without implementing the Ser
Aura v2 added auto resolution in-order to help lazy people writing configuration manually. Even though it was introduced to help, it introduced a few issues. So auto resolution will be disabled in the future. Some of the complains/suggestions are how to easily write the di configuration. So introducing you FOA.DiConfig Installation
Yesterday’s post in this unexpected series on Dependency Injection vs Service Locator generated a lot of excellent and productive feedback in Twitter, on the PHP-FIG mailing list, and in the comments. In that post, I opined that there was a significant difference between how Service Locator containers and Dependency Injection containers are implemented. This came from my sense that because they ha
DI の自由度は諸刃の剣 近ごろ、「実プロジェクトでDIコンテナ(注1)を導入している」という話をちらほら耳にするようになりました。それと同時に、「DIコンテナを使ったプロジェクトが大変なことになっている」という話も耳にするようになりました。DIの魅力を十分に享受して低コスト、高品質を実現しているプロジェクトがある一方で「DIを導入してみたのはいいのだけれど、DIの設定ファイルが大きくなりすぎて管理しきれない」「DIを使っているのに、テスタビリティが全然向上していない」など苦労しているプロジェクトもあるようです。この差はいったいどこから来るのでしょうか。 DIは、EJBなどと比べると比較的取っ付きやすい技術ではありますが、ほかの技術同様、誤った使い方では十分に力を発揮できません。DIコンテナは非常に単純明快な技術ではありますが、そのシンプルさ故に自由度が高くさまざまな使い方ができます。その
今日はPHP界隈で大人気のDependency Injectionと、それに関連する用語について整理しておこうと思います。 以下のような状況があるのではないか?と思ったからです。 多くのPHPユーザがDependency Injection(DI)をよくわかっていない、あるいは正確に説明できません。 そして、デザインパターンである「DIパターン」とDIをサポートするツールである「DIコンテナ」を混同しています。 また、「DIパターン」と「サービスロケータパターン」をうまく区別できていません。 Dependency Injectionとは何か? Dependency Injectionとは「Dependency」を「Injection」するというデザインパターンです。 日本語では何故か「依存性の注入」と訳されており、これが混乱の元ではないかと思います。 日本語で「依存性」と言うと、「依存性は
During my tenure as a seasoned, and tenderized, PHP developer I have used many design patterns: adapters, factories, data mappers, facades, etc. The most recent one that I have been working with is Dependency Injection. Inversion of Control is not a new idea, at least not in the programming world, but in the PHP world it seems to have taken us by storm in recent years. Every framework will often h
Other questions about DI Dependency Injection breaks Encapsulation Comments on Disco with Design Patterns: A Fresh Look at Dependency Injection Criticisms by so-called "experts" A simplified definition Conclusion References Amendment History Comments Introduction Way back in 2004 I made the following observation: There are two ways in which an idea, principle or rule can be implemented - indiscrim
はじめに BEAR.Sundayを使った開発では、普段PHPを使って行う開発では意識することがあまりない、「コンパイルタイム*1」と「ランタイム」という概念*2を意識して開発することが必要となる場合があります。 DIとAOP DIもAOPもオブジェクトの接続に着目した技術です。 DIはオブジェクトの構成、AOPはオブジェクトの相互作用、それぞれ2つの視点からオブジェクトを接続します。 今回はDIとAOP、それぞれの動作を「コンパイルタイム」と「ランタイム」という2つの視点*2に分けて考えてみます。 DIで注入して良い値と悪い値 これはTwitterの認証を行うために、ZendOAuth\Consumerを利用するDIの例です。 <?php namespace My\App\Resource\Page\Auth; use BEAR\Resource\ResourceObject; use R
追記 2014-12-12 AOPも実装した0.2.0をリリースしました。 cf. PHPで簡単に華麗にDIとAOPをキメる http://c4se.hatenablog.com/entry/2014/12/11/013136 わたしがn-1人目です! (nは1以上の自然数) Simple Ray.Di style DI (Dependency Injector) extending Pimple. cf. Ranyuen/Di https://github.com/Ranyuen/Di 既存のDI framwork PHPでDI (Dependency Injection, 依存性の注入) framworkは沢山あります。Javaだとなんですか? EJBとSpring Framworkと…? Phalconを使ふてゐるのならPhalconのDIを使っとけばいいと思ひます。しかし (逆説の
Use fixed Y axis Benchmark 1 : Auto resolution of object and dependencies (Aliasing Interfaces to Concretes). Orno injected a null parameter to build Foo object (used default parameter) : Benchmark\Stubs\Foo( 'bar' => Benchmark\Stubs\Bar( 'baz' => Benchmark\Stubs\Baz( 'bam' => NULL ) ) ) Zend injected a null parameter to build Foo object (used default parameter) : Benchmark\Stubs\Foo( 'bar' => NUL
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く