原文作者:Taylor Otwell
网上偶得此书,是 Laravel 的作者写的。 Laravel 是近年来优秀的 PHP 框架,国内外都有很多支持者。该框架应用了大量 PHP5 尤其是 5.3 以后的新特性,使得后端的开发进一步的简便而灵活。具体可以看这里 http://www.laravel.com 作者写的这本书详细介绍了Laravel框架涉及的各种软件理念和工具,如依赖注入、控制反转容器、面向接口编程等。 我读来收获颇丰,所以希望翻译成中文以飨读者。
Laravel – 从百草园到三味书屋
From Apprentice To Artisan 目录
- Dependency Injection 依赖注入
- The IoC Container 控制反转容器
- Interface As Contract 接口约定
- Service Provider 服务提供者
- Application Structure 应用结构
- Applied Architecture: Decoupling Handles 实用做法:解耦处理函数
- Extending The Framework 扩展框架
- Single Responsibility Principle 单一职责原则
- Open Closed Principle 开放封闭原则
- Liskov Substitution Principle 里氏替换原则
- Interface Segregation Principle 接口隔离原则
- Dependency Inversion Principle 依赖反转原则
Author’s Note 作者自序
Since creating the Laravel framework, I have received numerous request for a book containing guidance on building well-architected, complex applications. As each application is unique, such a book requires that the counsel remains general, yet practical and easily applicable to a variety of projects.
自从编写了 Laravel 框架之后,我收到了大量让我写书的请求。想让我出一本关于如何建造具有良好架构的复杂应用的指南。由于每一个应用程序都是独特的,这就需要此书讲述的是通用且实用的理论,同时易于在各种项目中实施。
So, we will begin by covering the foundational elements of dependency injection, then take an in-depth look at service providers and application structure, as well as an overview of the SOLID design principles. A strong knowledge of these topics will give you a firm foundation for all of your Laravel projects.
因此我们将从基础要素之一的依赖注入开始讲起,接着是深入了解服务提供者和应用程序结构, 以及“坚实”设计原则。这些主题的中心思想会给你的 Laravel 项目奠定坚实的理论基础。
If you have any further questions about advanced architecture on Laravel, or wish to see something added to the book, please e-mail me. I plan to expand the book further based on community feedback, so your ideas matter!
如果你对 Laravel 上的高级架构有更进一步的问题的话,或者想在本书看到更多没讲到的东西,请给我发电子邮件。我打算基于社区的反馈来进一步扩展本书,所以你的意见很重要!
Finally, thank you so much for being a part of the Laravel community. You have all helped make PHP development more enjoyable and exciting for thousands of people around the world. Code happy!
最后,十分感谢 Laravel 社区的每一个人。你们为世界上成千上万的 PHP 开发者做出了巨大的贡献,使得 PHP 开发变得更好玩更令人激动。祝编码快乐!
Taylor Otwell