万本电子书0元读

万本电子书0元读

顶部广告

Phalcon Cookbook电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:David Schissler

出  版  社:Packt Publishing

出版时间:2016-11-01

字       数:256.0万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Master Phalcon by implementing hands-on recipes using industry best practices with the Web and CLI interfaces About This Book Create quick prototypes with the Phalcon Developer Tools Learn to use the powerful and uniquely efficient Phalcon ORM Reuse codes in real projects Who This Book Is For If you are a beginner-to-intermediate Phalcon developer who wants to level up or an advanced user who is seeking some new techniques and insight, then this book is perfect for you. This book will be relevant to you over a long period of time due to the mixed nature of this book in providing both abstract comprehension as well as specific examples meant to be usable in your projects. You will be able to experiment with each new aspect of integration in prebuilt recipes meant to best illustrate each specific feature. This will save you lots of time getting up to speed before attempting to integrate into a real application. What You Will Learn Install the Phalcon extension from both premade packages and source code Create a normal and micro application structure Understand the dispatcher event cycle and create custom plugins Get hands-on using the Phalcon Query Language and ORM Create flexible views with the Volt template system Leverage Phalcon to prevent common security vulnerabilities Optimize an application with focused solutions Profile and debug an application to get increased reliability In Detail Phalcon is a high-performance PHP framework delivered as a PHP extension. This provides new opportunities for speed and application design, which until recently have been unrealized in the PHP ecosystem. Packed with simple learning exercises, technology prototypes, and real-world usable code, this book will guide you from the beginner and setup stage all the way to advanced usage. You will learn how to avoid niche pitfalls, how to use the command-line developer tools, how to integrate with new web standards, as well as how to set up and customize the MVC application structure. You will see how Phalcon can be used to quickly set up a single file web application as well as a complex multi-module application suitable for long-term projects. Some of the recipes focus on abstract concepts that are vital to get a deep comprehension of Phalcon and others are designed as a vehicle to deliver real-world usable classes and code snippets to solve advanced problems. You’ll start out with basic setup and application structure and then move onto the Phalcon MVC and routing implementation, the power of the ORM and Phalcon Query Language, and Phalcon’s own Volt templating system. Finally, you will move on to caching, security, and optimization. Style and approach An easy-to-start guide that provides
目录展开

Phalcon Cookbook

Table of Contents

Phalcon Cookbook

Credits

About the Authors

About the Reviewer

www.PacktPub.com

eBooks, discount offers, and more

Why Subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Sections

Getting ready

How to do it…

How it works…

There’s more…

See also

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Getting Used to Phalcon

Introduction

Getting your IDE to work nicely with Phalcon

Getting ready

How to do it…

Ways to enable Phalcon API autocompletion in major IDEs

PhpStorm

NetBeans

Ways to enable Volt syntax highlighting in major IDEs

Netbeans

PhpStorm

Syntax highlighting for Sublime Text or TextMate

Installation via Package Control

Manual installation

How it works…

Creating the application directory structure

Getting ready

How to do it…

How it works…

Setting up your request entry point

Getting ready

How to do it…

How it works…

Easily loading code on demand

Getting ready

How to do it…

How it works…

There's more…

Setting up your request entry point

Getting ready

How to do it…

How it works…

There's more…

Understanding the request life cycle

Getting ready

How to do it…

How it works...

There's more…

See also

2. Structuring Your Projects

Introduction

Choosing the best place for an implementation

Getting ready

How to do it…

How it works…

Automation of routine tasks

Getting ready

How to do it…

How it works…

There's more…

Creating the application structure by using code generation tools

Getting ready

How to do it…

How it works…

There's more…

Get more power by adding a middleware between Phalcon and your application

Getting ready

How to do it…

Logging critical errors

Changing the description and keywords meta tags depending on your route

Receiving site status reports

Caching pages to reduce processing

Redirecting the user to the login screen if access to the resource is protected

How it works…

There's more…

3. Processing Requests

Introduction

Understanding the default routing strategy for controllers

Getting ready

How to do it…

Handling a request along multiple controllers

Getting ready

How to do it…

How it works…

Using flexible key-value action parameter pairs

Getting ready

How to do it…

How it works…

Restricting controllers by managing end user privileges

Getting ready

How to do it…

How it works…

Making unsuccessful requests fail softly

Getting ready

How to do it…

How it works…

Creating a server-sent message server

Getting ready

How to do it…

How it works…

Creating a Ratchet Websocket server

Getting ready

How to do it…

How it works…

4. Dealing with Data

Introduction

Preparation

Applying your own naming conventions to models

Getting ready

How to do it…

How it works…

Defining relationships between models

Getting ready

How to do it…

How it works…

Using the query builder for complex yet fluent model querying

Getting ready

How to do it…

How it works…

Being aware of PHQL capabilities

Getting ready

How to do it…

How it works…

Fetching models from raw SQL queries

Getting ready

How to do it…

How it works…

Getting the most out of your RDBMS of choice

Getting ready

How to do it…

How it works…

Using models as information repositories

Getting ready

How to do it…

How it works…

Storing models across multiple databases

Getting ready

How to do it…

How it works…

5. Presenting Your Application

Introduction

HTML fragments for AJAX-based applications

Getting ready

How to do it…

How it works…

There's more…

See also

Splitting your layout structure

Getting ready

How to do it…

How it works…

Volt and dynamic view implementations

Getting ready…

How to do it…

How it works…

Presenting models nicely

Getting ready

How to do it…

How it works…

There's more…

See also

Reusing view snippets

Getting ready

How to do it…

How it works…

Creating your own Volt keywords and methods

Getting ready

How to do it…

How it works…

There's more…

6. Making Use of Advanced Features

Introduction

Registering dependencies in an effective way

Getting ready

How to do it…

How it works…

There's more…

See also

Using the DI container on different scopes

Getting ready

How to do it…

How it works…

There's more…

See also

Unleashing the real power of event driven programming

Getting ready

How to do it…

How it works…

There's more…

Centralizing validations for rock solid business rules

Getting ready

How to do it…

How it works…

There's more…

Complex routing with regular expressions

Getting ready

How to do it…

How it works…

There's more…

Using in-memory session handlers

Getting ready

How to do it…

How it works…

There's more…

Handy persistence for controllers and components

Getting ready

How to do it…

How it works…

There's more…

Transactional controller actions ensuring consistent operations

Getting ready

How to do it…

How it works…

There's more…

Auditing complex user actions with simplicity

Getting ready

How to do it…

How it works…

There's more…

7. Debugging and Profiling

Introduction

Improved exception reporting

Getting ready

How to do it…

How it works…

Logging server messages to the browser console

Getting ready

How to do it…

How it works…

Creating a route test suite

Getting ready

How to do it…

How it works…

Handling abnormal terminations

Getting ready

How to do it…

How it works…

Detecting slow queries

Getting ready

How to do it…

How it works…

8. Fine Tuning and Optimizing

Introduction

Handling a database timeout

Getting ready

How to do it…

How it works…

Precompiling Volt templates for increased performance and security

Getting ready

How to do it…

How it works…

Optimizing PHQL queries

Getting ready

How to do it…

How it works…

Caching model metadata and query results for faster performance

Getting ready

How to do it…

How it works…

9. High Performance Applications with Phalcon

Introduction

Introduction to asynchronous work by using Beanstalk

Getting ready

How to do it…

How it works…

There's more…

Implementing a three-level cache to increase performance

Getting ready

How to do it…

How it works…

There's more…

Cache view fragments or full pages in Phalcon

Getting ready

How to do it…

How it works…

There's more…

Implementing your own cache adapters

Getting ready

How to do it…

How it works…

There's more…

Cache data to reduce access to database systems

Getting ready

How to do it…

How it works…

There's more…

Creating a PHP extension using Zephir

Getting ready

How to do it…

How it works…

There's more…

Extending Phalcon using Zephir

Getting ready

How to do it…

How it works…

There's more…

See also

10. Securing Your Applications

Introduction

Securing data with encryption

Getting ready…

How to do it…

How it works…

Securing passwords with hashing

Getting ready

How to do it…

How it works…

Preventing Cross-site scripting (XSS) attacks

Getting ready…

How to do it…

How it works…

Preventing Cross-Site Request Forgery (CSRF) attacks

Getting ready…

How to do it…

How it works…

Implementing alternative access control lists

Getting ready…

How to do it…

How it works…

Using OAuth for account authorization

Getting ready…

How to do it…

How it works…

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部