共感で繋がるSNS

人気

あめ

あめ

Laravel MVC

ControllerにServiceを
ひとつひとつの責務をわけて

ModelにRepositoryを
Eloquent切り離し
Repositoryにinterfaceとbind()で
Mockeryを扱いやすく

データ移動にDTOを
入口出口をDTOにして境界を

ここまできたら
TinkerとPHPUnitも イメージがつきやすい
GRAVITY
GRAVITY1
あめ

あめ

DTOでレイヤー間のデータを型にはめて
ListDTOでDTOで表現する幅を広げる

RepositoryはInterface必須
bind()して 切り替えれるように
Eloquentと切り離すように

ServiceはRepositoryIntrfaceで依存性の注入
ビジネスロジックをまとめる
やりたい事ときっちりわけてまとめる

責務をわけて
GRAVITY
GRAVITY9
カツヒト

カツヒト

Web系フレームワークなら、やっぱりLaravelが一番好き。パイプラインでクロージャやクラスを渡せる上に、順番を明示できるから凄く理解しやすい

Eloquentをパイプラインで繋げつつ、途中でif噛ませてあげれば複雑なデータ取得処理もある程度一つの関数に集約できるから、よっぽど酷いプログラマーが組まない限り読みやすいコードになるのが凄く良い
ITエンジニアの星ITエンジニアの星
GRAVITY2
GRAVITY3
しろくろ

しろくろ

It’s always been a bit of a mystery to me that there are two different personalities co-existing in my brain, just like Jekyll and Hyde. I don’t mean it in a clinical sense. Just by simply switching language to English, the other self shows up and dissects the world in a completely different way. He is more frank, aggressive, a bit sarcastic and most impressively, seems more thoughtful than I usually am.

One day, I had to convey some real important things to my wife. I looked for true words that would perfectly fit the situation. I didn’t know why I reached that conclusion but I chose to let this guy take over the expression of my deep feelings.
He was eloquent enough to make himself understood as always. But at the same time, it was really weird I suddenly started switching my language, just to make myself understood.

Why did I let him take the wheel?

I’ve come to believe in one hypothesis: there was a lack of a beautiful vocabulary of love. Throughout my entire childhood, I never saw or heard my parents expressing their love to each other. So, perhaps my dictionary just have missed those pages.
I lacked not only the proper words for my true feelings, but also the opportunities to strengthen the immunity needed to expose them to the rainstorms.
Probably this guy was crafted as a compensation for that loss, unconsciously protecting my nervous everyday self from brutal rejection.

So that explains his f***ing spicy flavor? Huh, fair enough.

But another mystery is unfolding right now. Since starting Gravity, surrounded by the goodness of beautiful people, my everyday self is gradually gaining the ability to express my real feelings. Yo, I never imagined that would happen to me.

Hallelujah, I’m definitely embracing the discovery of my new self.
英語で日記の星英語で日記の星
GRAVITY2
GRAVITY8

関連検索ワード

おすすめのクリエーター