没有合适的资源?快使用搜索试试~ 我知道了~
首页2013年最近Zend Framework2图书Web Development with Zend Framework 2
2013年最新Zend Framework2图书,这是目前仅有的几本专门介绍Zend Framework 2的技术书,不可多得啊!由于技术架构的原因,Zend Framework 1和2不兼容,所以以前的书都报销了....
资源详情
资源评论
资源推荐
Web Development with Zend Framework 2
Concepts, Techniques and Practical Solutions
Michael Romer
This book is for sale at http://leanpub.com/zendframework2-en
This version was published on 2013-03-10
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.
©2012 - 2013 Michael Romer
Contents
About the book 1
Early Access Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The book’s online community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Important notice for Amazon customers . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction 2
For whom is this book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
You & I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Structure of this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Repetitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
How you can best work with this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Found a bug? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Conventions used in this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Zend Framework 2 - An overview 6
How Framework is being developed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Module system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Event system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
MVC implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Additional components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Design Patterns: Interface, Factory, Manager, etc. . . . . . . . . . . . . . . . . . . . . . . 13
Hello, Zend Framework 2! 16
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ZendSkeletonApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Composer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
A first sign of life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Directory structure of a Zend Framework 2 application . . . . . . . . . . . . . . . . . . . 20
The index.php file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
CONTENTS
Preparing one’s own module 28
Preparing the “Hello World” module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Autoloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
One time Request and back again 40
ServiceManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Writing a service of one’s own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
ModuleManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
ViewManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
EventManager 66
Registering a listener . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Registering several listeners at the same time . . . . . . . . . . . . . . . . . . . . . . . . . 67
Removing a registered listener . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Trigger an event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
SharedEventManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using events in one’s own classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Modules 82
The “Application” module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Module-dependent behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Installing a third-party module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Configuring a third-party module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Controller 92
Concept & mode of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Controller plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Writing one’s own controller plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
CONTENTS
Views 100
Concept & mode of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Writing a view helper of one’s own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Model 105
Entities, repositories & value objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Business services & factories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Business events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Routing 109
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Definition of routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Matching test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Generation of a URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Standard routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Creative routing: A/B tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Dependency injection 121
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Zend\Di for object graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Zend\Di for configuration management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Persistence with Zend\Db 137
Connecting to databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Generating and running SQL-Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Working with tables and entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Organisation of database queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Zend\DB alternative: Doctrine 2 ORM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Validators 158
Standard validators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Writing your own validators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
剩余273页未读,继续阅读
jonzj
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2023年中国辣条食品行业创新及消费需求洞察报告.pptx
- 2023年半导体行业20强品牌.pptx
- 2023年全球电力行业评论.pptx
- 2023年全球网络安全现状-劳动力资源和网络运营的全球发展新态势.pptx
- 毕业设计-基于单片机的液体密度检测系统设计.doc
- 家用清扫机器人设计.doc
- 基于VB+数据库SQL的教师信息管理系统设计与实现 计算机专业设计范文模板参考资料.pdf
- 官塘驿林场林防火(资源监管)“空天地人”四位一体监测系统方案.doc
- 基于专利语义表征的技术预见方法及其应用.docx
- 浅谈电子商务的现状及发展趋势学习总结.doc
- 基于单片机的智能仓库温湿度控制系统 (2).pdf
- 基于SSM框架知识产权管理系统 (2).pdf
- 9年终工作总结新年计划PPT模板.pptx
- Hytera海能达CH04L01 说明书.pdf
- 数据中心运维操作标准及流程.pdf
- 报告模板 -成本分析与报告培训之三.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2