PHP Reactive Programming

Martin Sikora

  • 出版商: Packt Publishing
  • 出版日期: 2017-03-29
  • 售價: $1,860
  • 貴賓價: 9.5$1,767
  • 語言: 英文
  • 頁數: 364
  • 裝訂: Paperback
  • ISBN: 1786462877
  • ISBN-13: 9781786462879
  • 相關分類: PHP
  • 下單後立即進貨 (約3~4週)

商品描述

Key Features

  • Develop an interesting multiplayer browser game written in RxJS and re-implement it using RxPHP
  • Enhance existing reactive applications by building a CLI tool combining Symfony Console
  • Implement Gearman and Rabbit MQ for asynchronous communication

Book Description

Reactive Programming helps us write code that is concise, clear, and readable. Combining the power of reactive programming and PHP, one of the most widely used languages, will enable you to create web applications more pragmatically.

PHP Reactive Programming will teach you the benefits of reactive programming via real-world examples with a hands-on approach. You will create multiple projects showing RxPHP in action alone and in combination with other libraries.

The book starts with a brief introduction to reactive programming , clearly explaining the importance of building reactive applications. You will use the RxPHP library, built a reddit CLI using it, and also re-implement the Symfony3 Event Dispatcher with RxPHP. You will learn how to test your RxPHP code by writing unit tests. Moving on to more interesting aspects, you will implement a web socket backend by developing a browser game. You will learn to implement quite complex reactive systems while avoiding pitfalls such as circular dependencies by moving the RxJS logic from the frontend to the backend. The book will then focus on writing extendable RxPHP code by developing a code testing tool and also cover Using RxPHP on both the server and client side of the application. With a concluding chapter on reactive programming practices in other languages, this book will serve as a complete guide for you to start writing reactive applications in PHP.

What you will learn

  • How to work with the RxPHP library and see what it offers via many examples
  • Use the RxPHP library in combination with Symfony Console
  • The different approaches to using Symfony3's Event Dispatcher component
  • Test your reactive PHP code using PHPUnit
  • Analyze PHP source code and apply a custom set of rules by building a CLI tool

商品描述(中文翻譯)

主要特點


  • 使用 RxJS 開發有趣的多人瀏覽器遊戲,並使用 RxPHP 重新實現

  • 通過構建結合 Symfony Console 的 CLI 工具,增強現有的反應式應用程式

  • 實現 Gearman 和 Rabbit MQ 進行異步通信

書籍描述

反應式編程幫助我們編寫簡潔、清晰和易讀的代碼。結合反應式編程和 PHP,這門廣泛使用的語言,將使您能夠更實用地創建 Web 應用程式。

《PHP 反應式編程》將通過實際示例和實踐方法教您反應式編程的好處。您將創建多個項目,展示 RxPHP 單獨和與其他庫結合的應用。

本書首先簡要介紹了反應式編程,清楚解釋了構建反應式應用程式的重要性。您將使用 RxPHP 库,構建 reddit 的 CLI,並使用 RxPHP 重新實現 Symfony3 的事件調度器。您將學習如何通過編寫單元測試來測試 RxPHP 代碼。接下來,您將實現一個 Web Socket 後端,開發一個瀏覽器遊戲,學習實現相當複雜的反應式系統,同時避免循環依賴問題,將 RxJS 邏輯從前端移至後端。本書還將重點介紹如何通過開發代碼測試工具來編寫可擴展的 RxPHP 代碼,並涵蓋在應用程式的服務器端和客戶端上使用 RxPHP。最後一章介紹了其他語言中的反應式編程實踐,本書將成為您開始使用 PHP 編寫反應式應用程式的完整指南。

您將學到什麼


  • 如何使用 RxPHP 库,並通過多個示例了解其提供的功能

  • 結合 Symfony Console 使用 RxPHP 库

  • 使用不同方法使用 Symfony3 的事件調度器組件

  • 使用 PHPUnit 測試您的反應式 PHP 代碼

  • 通過構建 CLI 工具分析 PHP 源代碼並應用自定義規則