Начать новую тему Ответить на тему
Статистика раздачи
Размер: 13.22 МБ | | Скачали: 0
Сидеров: 0  [0 байт/сек]    Личеров: 0  [0 байт/сек]
Пред. тема | След. тема 

Автор
Сообщение

Ответить с цитатой 

PHP5 CMS Framework development + Code

Год: 2008
Автор: Martin Brampton
Издательство: Packt Publishing Ltd.
ISBN: 978-1-847193-57-5
Язык: Английский
Формат: PDF
Качество: Изначально компьютерное (eBook)
Количество страниц: 343

Описание: This book guides you through the design and implementation decisions necessary to create a working architecture for a PHP5-based content management system. Each of the major areas and decision points are reviewed and iscussed. Code examples, which take advantage of PHP5's object oriented nature, are provided and explained. They serve as a means of illustrating the detailed development issues created by a CMS. In areas where the code is too voluminous to be reproduced in detail, the design principles are explained along with some critical pieces of code. A basic knowledge of PHP is assumed.
All of the code samples are taken from a frozen version of the Aliro development project, and you can visit a site running on that version at http://packt.aliro.org. Apart from being a demonstration of the code in action, the site provides access to the whole of the code both through a class browser, built using Doxygen and a code repository, powered by Subversion.
Table of Contents
Preface 1
Chapter 1: CMS Architecture 7
The Idea of a CMS 7
Critical CMS Features 9
Desirable CMS Features 11
System Management 12
Technology for CMS Building 14
Leveraging PHP5 14
Some PHP Policies 15
Classes and Objects 17
Objects, Patterns, and Refactoring 18
The Object-Relational Compromise 19
Basics of Combining PHP and XHTML 20
Model, View, and Controller 21
The CMS Environment 23
Hosting the CMS 23
Basic Browser Matters 24
Security of a CMS 25
Some CMS Terminology 27
Summary 28
Chapter 2: Administrators, Users, and Guests 29
The Problem 29
Discussion and Considerations 30
Who Needs Users? 30
Secure Authentication 31
Secure Storage of Passwords 32
Blocking SQL Injection 33
Login 34
Table of Contents
[ ii ]
Managing User Data 34
User Self Service 35
Customizing for Users 36
Extended User Information 37
Framework Solution 38
The User Database Table 38
Indexes on Users 40
Keeping User Tables in Step 41
Achieving Login 42
Administering Users 46
Generating Passwords 49
Replacing a User View 51
Extending a User View 54
Summary 56
Chapter 3: Organizing Code 57
The Problem 57
Discussion and Considerations 58
Security 58
Methods of Code Inclusion 59
Practicality in Coding 60
Framework Solution 60
Autoloading 60
The Smart Class Mapper 62
Digression on the Singleton Pattern 64
Finding a Path to the Class 65
Populating the Dynamic Class Map 67
Saving Map Elements 68
Summary 68
Chapter 4: Sessions and Users 69
The Problem 69
Discussion and Considerations 70
Why Sessions? 70
How Sessions Work 70
Avoiding Session Vulnerabilities 72
Search Engine Bots 74
Session Data and Scalability 74
Framework Solution 75
Building a Session Handler 75
Creating a Session 78
Finding the IP Address 79
Validating a Session 80
[ iii ]
Remembering Users 82
Completing Session Handling 83
Session Data 84
Session Data and Bots 85
Retrieving Session Data 86
Keeping Session Data Tidy 87
Summary 88
Chapter 5: Database and Data Objects 89
The Problem 89
Discussion and Considerations 89
Database Dependency 91
Ease of Development 92
Keeping up with Change 93
Database Security 94
Pragmatic Error Handling 96
Framework Solution 97
Class Structure 98
Connecting to a Database 99
Handling Databases Easily 100
Prefixing Table Names in SQL 101
Making the Database Work 101
Getting Hold of Data 102
Higher Level Data Access 105
Assisted Update and Insert 106
What Happened? 107
Database Extended Services 107
Getting Data about Data 107
Easier Data about Data 109
Aiding Maintenance 110
Data Objects 111
Rudimentary Data Object Methods 112
Data Object Input and Output 113
Setting Data in Data Objects 114
Sequencing Database Rows 116
Database Maintenance Utility 117
Summary 118
Chapter 6: Access Control 119
The Problem 119
Discussion and Considerations 119
Adding Hierarchy 121
Adding Constraints 121
Avoiding Unnecessary Restrictions 121
Some Special Roles 122
Implementation Efficiency 123
Where are the Real Difficulties? 124
Framework Solution 125
Database for RBAC 125
Administering RBAC 127
The General RBAC Cache 133
Asking RBAC Questions 135
Summary 138
Chapter 7: Handling Extensions 139
The Problem 139
Discussion and Considerations 140
An Extension Ecosystem 140
Templates in the Ecosystem 141
Modules in the Ecosystem 141
Components in the Ecosystem 142
Component Templates 142
Modules Everywhere 143
More on Extensions 144
Templates 144
Modules 145
Components 146
Plug ins 148
Extension Parameters 150
Framework Solution 151
Packaging Extensions 151
Module Interface and Structure 152
The Logic of Module Activation 154
Component Interface and Structure 156
A Standardized Component Structure 156
Plug in Interface and Structure 160
Invoking Plug ins 161
Installing and Managing Extensions 163
Structuring Installer Tasks 164
Putting Extension Files in Place 165
Extensions and the Database 165
Knowing About Extension Classes 166
Summary 166
Chapter 8: Caches and Handlers 167
The Problem 167
Discussion and Considerations 167
Building Information Handlers 168
The Singleton Cache 169
The Disk Cache 170
Scalability and Database Cache 170
The XHTML Cache 171
Other Caches 172
Framework Solution 172
Abstract Cache Class 173
Singleton Object Cache Manager 174
Creating the Base Class Cached Singleton 175
Generalized Cache 178
Summary 182
Chapter 9: Menus 183
The Problem 183
Discussion and Considerations 184
Page Management by URI 185
Menu Database Requirements 186
Menu Management 187
Menu Construction 188
Menu Presentation 189
Framework Solution 189
Building the Menu Handler 192
Interfacing to Components 195
The Menu Creator 196
An Example of a Menu Module 198
Summary 200
Chapter 10: Languages 201
The Problem 201
Discussion and Considerations 201
Character Sets 202
UTF-8 and XHTML 203
Specifying Languages 204
Handling Multiple Languages in Code 205
Languages in CMS Extensions 206
Handling Languages in Data 207
Framework Solution 208
The gettext Implementation 208
File Formats for gettext 208
Functions for gettext 210
The PHPgettext Classes 211
The Language Class 212
Administrator Language Application 214
Handling Extensions 217
Managing Extension Translations 217
Installing Translations with CMS Extensions 218
Handling Multilingual Data 219
Summary 220
Chapter 11: Presentation Services 221
The Problem 221
Discussion and Considerations 222
Differing Points of View 222
Model View Controller 224
XHTML, CSS, and Themes 225
PHP for XHTML Creation 226
Widgets and XHTML 227
Page Control and Navigation 228
WYSIWYG Editors 229
XHTML Cleaning 229
The Administrator Interface 230
Framework Solution 230
Using "heredoc" to Define XHTML 231
Using Templating Engines 238
Some Widgets 241
Building Page Control 244
Supporting Editors 245
Cleaning Up XHTML 245
Administrator Database Management 246
Summary 248
Chapter 12: Other Services 249
The Problem 249
Discussion and Considerations 250
Parsing XML 250
Configuration Handling 251
WYSIWYG Editing 251
File and Directory Handling 252
Sending Mail 252
Parameter Objects 252
Administrator Ready-Made Functionality 253
Framework Solution 253
Reading XML Files Easily 254
Storing Configuration Data 257
Incorporating a WYSIWYG Editor 258
Dealing with Files and Directories 261
Compound Parameter Objects 263
Administrator Ready-Made Table Handlers 266
Summary 269
Chapter 13: Error Handling 271
The Problem 271
Discussion 272
PHP Error Handling 272
Database Errors 273
Application Errors 273
Framework Solution 274
Handling Database Errors 276
Page 404 Errors 277
Summary 280
Chapter 14: Real Content 281
The Problem 281
Discussion and Considerations 282
Articles, Blogs, Magazines, and FAQ 282
Comments and Reviews 283
Forums 285
Galleries, Repositories, and Streaming 285
E-commerce and Payments 286
Forms 287
Calendars 288
Integrators 289
RSS Readers 289
Other Categories 290
Framework Solution 291
A Simple Text Application 291
The Database Table for Simple Text 291
A Text Data Object 292
Administering Text Items—Controller 293
Administering Text Items—Viewer 299
Showing Text to Visitors 305
Menu Building 308
Simple Developments of Text Items 310
Building Advanced Text Systems 311
Summary 312
Appendix A: Packaging 313
Packaging Extensions 313
The XML Setup File 313
Parameters 320
Parameter Types 322
Index 323
Правила, инструкции, FAQ!!!
Торрент   Скачать торрент Магнет ссылка
Скачать торрент
[ Размер 72.92 КБ / Просмотров 31 ]

Статус
Проверен 
 
Размер  13.22 МБ
Приватный: Нет (DHT включён)
.torrent скачан  0
Как залить торрент? | Как скачать Torrent? | Ошибка в торренте? Качайте магнет  


     Отправить личное сообщение
   
Страница 1 из 1
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему


Сейчас эту тему просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Перейти:  
Ресурс не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!