在 Laravel 中编写简洁的代码的策略
In this thread I’ll list tactics you can use to write cleaner code in Laravel. As you use them repeatedly, you’ll develop a sense for what’s good code and what’s bad code. I’ll also sprinkle some general Laravel code advice in between these tactics.
在本主题中,我将列出可用于在 Laravel 中编写更简洁代码的策略。 当您反复使用它们时,您将对什么是好的代码和什么是坏的代码产生一种感觉。 我还将在这些策略之间添加一些通用的 Laravel 代码建议。
It’s about the micro.
Using some “macro” philosophy for structuring your code, like hexagonal architecture or DDD won’t save you.
A clean codebase is the result of constant good decisions at the micro level.
这是关于 micro。
使用一些 micro
哲学来构建你的代码,比如使用六边形架构或 DDD 不会拯救你。
干净的代码库是微观层面不断做出正确决策的结果。
文章将在评论中持续更新,部分未翻译,有时间处理。
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: