万本电子书0元读

万本电子书0元读

顶部广告

Yii Project Blueprints电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Charles R. Portwood II

出  版  社:Packt Publishing

出版时间:2014-09-25

字       数:234.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This book is for intermediate-to-advanced level Yii developers who want to master the Yii framework and develop real-world applications. You should have experience of working with Yii, PHP 5, HTML, CSS, and JavaScript.
目录展开

Yii Project Blueprints

Table of Contents

Yii Project Blueprints

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. A Task-management Application

Describing the project

Tasks

Projects

Users

The database

The tasks table

The projects table

Users

Choosing a database technology

The tasks table

The projects table

The database overview

Initializing the project

Creating the database with migrations

Creating models with Gii

Enhancing the models

Updating the default validation rules

Defined relations

Removing tasks when a project is deleted

Retrieving the project metadata

Automatically setting the created and updated time

Creating the presentation layer

Managing projects

Creating the layout

Creating the project index action

Changing a project's completion state

Deleting projects

Creating and updating projects

Viewing tasks

Managing tasks

Preventing unauthorized access to our application

Requiring authentication with filters and access rules

Creating a controller for the authentication

Creating a login layout

Creating a login view

Identifying our users with the UserIdentity CUserIdentity class

Creating the login model

Finishing touches

Disabling Gii

Defining a default route

Adding extra routes

Summary

2. Discovering What's Nearby

Describing the project

Searching nearby locations

Showing locations

Storing locations

Importing locations

Designing the database

Locations

Initializing the project

Creating the configuration file

Retrieving the sample data

Creating the database

Creating the locations model

Importing the data feed

Google APIs

Enabling Google APIs

Generating an API key

Storing the API key

Creating the presentation layer

Interacting with the Google Maps JavaScript API

Searching nearby locations

Selecting a location

Showing locations on a map

Optimizing the performance with caching

Summary

3. Scheduled Reminders

Prerequisites

Describing the project

Users

Events

Reminders

The task runner

Initializing the project

Create a MySQL user and database

Creating a Yii configuration file

Creating a parameters configuration file

Adding Composer dependencies

Creating the database

The users migration

The reminders and events migration

Creating models

Model behaviors

The Users model

Bcrypt password hashing

The Reminders model

The Events model

Searching for events and displaying them

Custom routing for dates

Creating the controller for events

Creating the reminders controller

Creating the layout

Creating the main view

Creating the item view

Creating the event list view

Creating and saving events

Creating the controller to manage users

Creating users

Deleting users

Changing the user's password

Authenticating with Bcrypt

Requiring authentication

Sending e-mail reminders

Summary

4. Developing an Issue-tracking Application

Prerequisites

Describing the project

Users

Roles

Issues

Statuses

Updates

Receiving e-mails

Initializing the project

Managing users

Roles and authentication

Listing users

Deleting users

Creating and updating users

Viewing users and associated issues

Implementing the issue-management component

The Issues model

The Issues Update model

Showing issues that belong to the user

Searching for issues

Creating issues

Viewing and updating issues

E-mail views

Testing our application

Handling inbound e-mail parsing

Sending e-mails to SendGrid

Adjusting SendGrid Parse settings

Creating and updating issues over e-mail

Summary

5. Creating a Microblogging Platform

Prerequisites

Describing the project

Users

Followers

Likes

Shares

Initializing the project

Making a better Yii bootstrap file

Enabling users to manage their information

Upgrading our UserIdentity class

Defining user relations

Determining whether a user is following another user

Implementing a secure registration process

Handling forgotten passwords

Resetting a forgotten password

Enabling users to manage their details

Verifying a new e-mail address

Viewing a timeline of shares

Retrieving shares

Sharing new content

Resharing

Liking and unliking shares

Viewing shares

Searching for shares

Sharing on Twitter with HybridAuth

Setting up a Twitter application

Configuring HybridAuth

Implementing HybridAuth social sign-on and sharing

Summary

6. Building a Content Management System

Prerequisites

Describing the project

Users

Content

Categories

Search engine optimizations

Initializing the project

Exploring the skeleton project

Extending models from a common class

Creating a custom validator for slugs

View management with themes

Truly dynamic routing

Telling Yii to use our custom UrlManager

Displaying and managing content

Rendering the sitemap

Displaying a list view of content

Displaying content by ID

Adding comments to our CMS with Disqus

Searching for content

Managing content

Viewing and managing categories

Viewing entries in a category

Viewing an RSS feed for categories

Managing categories

Social authentication with HybridAuth

Validating remote identities

Remote registrations

Linking a social identity to an existing account

Authenticating with a social identity

Creating a Yii CWebUser object from a remote identity

Putting it all together

Exploring other HybridAuth providers

Summary

7. Creating a Management Module for the CMS

Prerequisites

What are modules?

Describing the project

Initializing the module

Routing with a module

Moving the management functionality into the module

Adding file upload capabilities

Deploying modules

Initializing the project

Creating the module

Registering the module with Yii

Adding custom routes to a module

Creating the controllers

Migrating the functionality to the module

Migrating content management

Migrating categories

Implementing user management

Uploading files

Creating the File class

Creating the FileUploader class

Creating the FileUpload class

Creating the controller for the file manager

Strategies for deploying our application

Deploying as the application

Deploying as a submodule

Deploying as a Composer dependency

Summary

8. Building an API for the CMS

Prerequisites

Describing the project

Configuring the module

Extending Yii to render JSON or XML in a RESTful way

Handling data input

Authenticating users to the API

Handling API exceptions

Handling data responses

Implementing actions

Initializing the project

Extending Yii to return data

Rendering data

Calling actions in a RESTful way

Authenticating users

Overloading CAccessControlFilter

Processing the incoming data

Handling errors

Exception handling

Custom error handling

Testing whether everything works

Authenticating users

Testing the authentication

Sending authenticated requests

Implementing CRUD actions

Deleting users

Retrieving users

Creating and updating users

Implementing other controller actions from the main application

Implementing categories and content API controllers

Documenting our API

Summary

Index

累计评论(0条) 1个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部