Functional PHP: The Art of Functional Composition

简介:
学习以你从未知道的方式使用PHP。函数式编程通过专注于纯函数的使用和组合来创建健壮,可扩展,可测试且易于推理的程序,从而在设计应用程序的方式上提供了根本的转变。在本书中,作者提供了一种实用的函数式编程方法,并展示了它与其他编程范例 (过程和面向对象) 的比较。这本书充满了展示功能概念和技术的示例,以及以您可能从未有过的方式使用PHP。
从PHP早期开始,PHP社区已经走了很长一段路,主要是作为一种程序性的命令式语言。现在,从PHP 5开始,您已经成为一名面向对象 (OO) 的开发人员。您可以利用抽象类和接口来正确实现多态性、继承和封装的指导原则。所有这些都在利用所有最酷的设计模式构建丰富的领域模型时发挥作用。了解了所有这些之后,您是否能够减少构建大型企业web应用程序的开发工作?当然。但是复杂性仍然是一个问题,并且经常出现错误吗?您的应用程序易于单元测试吗?你的代码有多可重用?
功能方法鼓励代码重用,大大简化测试,并产生简洁易懂的代码。本书将演示如何将PHP用作函数式语言。在本书中,您将学习各种函数技术来编写可维护和可读的代码。
英文简介:
Learn to use PHP in ways you never knew you could. Functional Programming offers a fundamental shift in the way you design your applications by focusing on the use and composition of pure functions to create programs that are robust, extensible, testable, and easy to reason about.
In this book, the author provides a practical approach to functional programming and show how it compares to other programming paradigms (procedural and object-oriented). This book is filled with examples that showcase functional concepts and techniques, plus using PHP in a ways you've probably never though it could.
The PHP community has come a long way since the early starts of PHP mainly as a procedural, imperative language. Now, since PHP 5 you've become a Object-Oriented (OO) developer. You take advantage of abstract classes and interfaces to properly implement the guiding principles of polymorphism, inheritance, and encapsulation. All of this comes into play when building rich domain models utilizing all of the coolest design patterns. Having learned all this, have you been able to reduce the development effort of building large enterprise web applications? Certainly. But is complexity still an issue and bugs frequent? Is your application easy to unit test? How reusable is your code?
A functional approach encourages code reuse, greatly simplifies testing, and results in code that is concise and easy to understand. This book will demonstrate how PHP can also be used as a functional language. In this book, you will learn various function techniques to write maintainable and readable code.
- 书名
- Functional PHP: The Art of Functional Composition
- 译名
- 函数式 PHP:函数组合的艺术
- 语言
- 英语
- 年份
- 2017
- 页数
- 410页
- 大小
- 1.72 MB
- 标签
- PHP
- 下载
Functional PHP: The Art of Functional Composition.pdf
- 密码
- 65536
最后更新:2025-04-12 23:54:37