Node.js for PHP Developers: Porting PHP to Node.js (Paperback)
暫譯: PHP 開發者的 Node.js:將 PHP 移植到 Node.js (平裝本)

Daniel Howard

買這商品的人也買了...

相關主題

商品描述

If you’re an experienced PHP developer, you already have a head start on learning how to write Node.js code. In this book, author Daniel Howard demonstrates the remarkable similarities between the two languages, and shows you how to port your entire PHP web application to Node.js. By comparing specific PHP features with their Node counterparts, you’ll also discover how to refactor and improve existing PHP 4 or PHP 5 source code.

At the end, you’ll have two fully functional codebases to provide to your users. You can update both of them simultaneously, using this book as a reference to important aspects of PHP and Node.js.

  • Use a simple Node.js framework to convert individual PHP pages to Node.js files
  • Refactor blocking PHP source code to non-blocking Node.js source code that uses callbacks
  • Convert PHP syntax, variables, and types to Node.js
  • Use a step-by-step technique for implementing PHP classes and class inheritance in Node.js
  • Convert PHP file handling APIs into their Node.js equivalents
  • Compare approaches for using a MySQL database in Node.js and PHP
  • Convert PHP code for JSON or XML APIs into Node.js code for npm packages

商品描述(中文翻譯)

如果您是一位經驗豐富的 PHP 開發者,您已經在學習如何編寫 Node.js 代碼方面有了先機。在這本書中,作者 Daniel Howard 展示了這兩種語言之間的顯著相似性,並向您展示如何將整個 PHP 網頁應用程式移植到 Node.js。通過比較特定的 PHP 特性與其 Node 對應項,您還將發現如何重構和改進現有的 PHP 4 或 PHP 5 原始碼。

最後,您將擁有兩個完全功能的代碼庫可供用戶使用。您可以同時更新這兩個代碼庫,並使用本書作為 PHP 和 Node.js 重要方面的參考。

- 使用簡單的 Node.js 框架將單個 PHP 頁面轉換為 Node.js 檔案
- 將阻塞的 PHP 原始碼重構為使用回調的非阻塞 Node.js 原始碼
- 將 PHP 語法、變數和類型轉換為 Node.js
- 使用逐步技術在 Node.js 中實現 PHP 類和類繼承
- 將 PHP 檔案處理 API 轉換為其 Node.js 對應項
- 比較在 Node.js 和 PHP 中使用 MySQL 數據庫的方法
- 將用於 JSON 或 XML API 的 PHP 代碼轉換為 npm 套件的 Node.js 代碼