Yii2 By Example
暫譯: Yii2 實例解析

Fabrizio Caldarelli

  • 出版商: Packt Publishing
  • 出版日期: 2015-09-30
  • 售價: $2,010
  • 貴賓價: 9.5$1,910
  • 語言: 英文
  • 頁數: 290
  • 裝訂: Paperback
  • ISBN: 1785287419
  • ISBN-13: 9781785287411
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Develop complete web applications from scratch through practical examples and tips for beginners and more advanced users

About This Book

  • Improve your programming experience and become a full stack developer
  • Master real-life web applications, and create and manage four different projects
  • Step-by-step guidance to develop real-world web applications smoothly

Who This Book Is For

This book is for anyone who wants to discover and explore Yii Framework. Basic programming experience with PHP and object oriented programming is assumed.

What You Will Learn

  • Understand basic concepts, along with the installation and customization of Yii
  • Discover models, controllers, and views―concepts applied in a web context―and how they are employed in Yii
  • Use ActiveRecord to manipulate a database
  • Add access control to your web application through authentication and authorization
  • Install and customize an advanced template for multiple applications in the same project
  • Create a RESTful Web Service to allow remote access to data
  • Develop a console application to launch a command in the console as an automated task (cron job)
  • Make code reusable through widgets and components and localize text messages to make a multilanguage web app

In Detail

Yii is a high-performance PHP framework best for developing Web 2.0 applications. It provides fast, secure, and professional features to create robust projects, however, this rapid development requires the ability to organize common tasks together to build a complete application. It's all too easy to get confused; this is where this book comes in.

This book contains a series of practical project examples for developers starting from scratch. Each section contains the most relevant theories for every topic as you walk through developing each project, focusing on key aspects that commonly confuse users.

The book starts with all the framework's basic concepts, such as controllers and views, to introduce you to Yii and creating your first application, a simple news reader. You will be learn to configure URL rules to make a pretty URL, essential for search engine optimization. Next, you will walk through Model and ActiveRecord, key concepts in database interaction.

The second application you will develop is a reservation system that allows you to manage rooms, customers, and reservations. For this, you will use database connection through SQL and ActiveRecord. More complex than the first one, this application will introduce you to the advanced template of Yii 2, splitting the app into two parts: a frontend for all visitors and a backend for the admin. Finally, you will move on to the last two applications: one that allows connections from remote clients, through RESTful components of Yii 2, and another that creates and organizes automatic tasks using the console application structure of Yii 2.

Style and approach

This is a step-by-step guide with each topic introduced in the context of real-world applications, highlighting common cases where users may encounter difficulties.

商品描述(中文翻譯)

從零開始透過實用範例和技巧開發完整的網頁應用程式,適合初學者和進階使用者

本書介紹


  • 提升您的程式設計經驗,成為全端開發者

  • 掌握實際的網頁應用程式,並創建和管理四個不同的專案

  • 逐步指導,順利開發真實世界的網頁應用程式

本書適合誰

本書適合任何想要探索和了解 Yii Framework 的人。假設讀者具備基本的 PHP 程式設計經驗和物件導向程式設計知識。

您將學到什麼


  • 理解基本概念,以及 Yii 的安裝和自訂

  • 探索模型、控制器和視圖——在網頁上下文中應用的概念——以及它們在 Yii 中的使用方式

  • 使用 ActiveRecord 操作資料庫

  • 透過身份驗證和授權為您的網頁應用程式添加存取控制

  • 為同一專案中的多個應用程式安裝和自訂進階模板

  • 創建 RESTful 網路服務以允許遠端存取資料

  • 開發控制台應用程式,以自動化任務(cron job)在控制台中執行命令

  • 透過小工具和元件使程式碼可重用,並本地化文字訊息以製作多語言網頁應用程式

詳細內容

Yii 是一個高效能的 PHP 框架,最適合開發 Web 2.0 應用程式。它提供快速、安全和專業的功能來創建穩健的專案,然而,這種快速開發需要能夠將常見任務組織在一起以構建完整的應用程式。這很容易讓人感到困惑;這就是本書的用武之地。

本書包含一系列針對從零開始的開發者的實用專案範例。每個部分都包含與每個主題最相關的理論,幫助您在開發每個專案時,專注於常常讓使用者困惑的關鍵方面。

本書從框架的基本概念開始,例如控制器和視圖,介紹 Yii 並創建您的第一個應用程式,一個簡單的新聞閱讀器。您將學會配置 URL 規則以製作美觀的 URL,這對於搜尋引擎優化至關重要。接下來,您將深入了解模型和 ActiveRecord,這是資料庫互動中的關鍵概念。

您將開發的第二個應用程式是一個預約系統,允許您管理房間、客戶和預約。為此,您將通過 SQL 和 ActiveRecord 使用資料庫連接。這個應用程式比第一個更複雜,將介紹 Yii 2 的進階模板,將應用程式分為兩個部分:供所有訪客使用的前端和供管理員使用的後端。最後,您將進入最後兩個應用程式:一個允許來自遠端客戶的連接,通過 Yii 2 的 RESTful 元件,另一個使用 Yii 2 的控制台應用程式結構創建和組織自動任務。

風格與方法

這是一本逐步指導的書籍,每個主題都在真實世界應用程式的背景下介紹,突顯使用者可能遇到困難的常見情況。