1. Trang chủ
  2. » Công Nghệ Thông Tin

Apress practical web 2 0 applications with PHP

592 1,3K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 592
Dung lượng 6,69 MB

Nội dung

Tài liệu về học lập trình web bằng ngôn ngữ PHP cho tất cả mọi người.

this print for content only—size & color not accurate spine = 1.1163" 592 page count Books for professionals By professionals ® Practical Web 2.0 Applications with PHP Dear Reader, Many programming books on the market today focus specifically on a particu- lar methodology or software package, and although you will gain a solid under- standing of the subject matter from these books, you won’t always know how to apply what you’ve learned in a real-world situation. This book is designed to show you how to bring together many different ideas and features by start- ing with a clean slate and gradually building the code base so it evolves into a complete web application. The premise of the application we build in this book is that it is a “Web 2.0” application. What this means is that (among other things) our application gen- erates accessible and standards-compliant code while making heavy of use of Ajax. We achieve this by using the Smarty ™ Template Engine and Cascading Style Sheets, as well as the Prototype JavaScript library. Additionally, we create a fun and intuitive interface by applying simple visual effects on various pages using the Script.aculo.us JavaScript library. To help with the development of the extensive PHP code in this book, we use the Zend Framework. This is an open source PHP 5 library that contains many different components that you can easily use in any of your day-to-day development. We use many of the Zend Framework components in this book, such as database abstraction (with a focus on MySQL ® and PostgreSQL), logging, authentication, and search. The “Web 2.0” application that we build in this book is a collaborative blogging tool. It will allow users to register and create a personal blog. When creating blog posts, users will be able upload images, apply tags, and assign locations (using Google Maps). We will also look at how to use microformats when displaying user blog posts. Quentin Zervaas US $44.99 Shelve in PHP User level: Intermediate–Advanced Zervaas Web 2.0 Applications with PHP The eXperT’s Voice ® in WeB DeVelopmenT Practical Web 2.0 Applications with PHP cyan maGenTa yelloW Black panTone 123 c Quentin Zervaas Companion eBook Available www.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN-13: 978-1-59059-906-8 ISBN-10: 1-59059-906-3 9 781590 599068 5 4 4 9 9 Develop a complete PHP web application from start to finish RELATED TITLES Practical [...]... developing the web application, we will be using both custom-written code as well as various third-party libraries (such as Prototype for JavaScript development, Smarty for template management in PHP and , the Zend Framework for several other features) 1 906 3Ch01CMP2 2 10 / 20 /07 1:47 PM Page 2 CHAPTER 1 ■ APPLICATION PLANNING AND DESIGN What Is Web 2. 0? So exactly what defines a web site as being Web 2. 0 ? There... fresh version of PHP Note that these commands only include the minimum options required for compatibility with the code in this book # tar -zxf php- 5 .2. 3.tar.gz # cd php- 5 .2. 3 # /configure with- apxs2 \ with- gd with- curl \ with- mysql with- pdo-mysql \ with- jpeg-dir with- png-dir \ with- freetype-dir with- zlib # make # make install Once these commands have successfully executed, PHP should be compiled... setup used for all code in this book I have used a somewhat typical LAMP setup (Linux/Apache/MySQL /PHP) , broken down as follows: • Operating system: Linux • Web server: Apache 2. 2 • Database server: MySQL 5 • Server-side scripting language: PHP 5 .2. 3 9 906 3Ch02CMP4 10 11/4 /07 12: 23 PM Page 10 CHAPTER 2 ■ SETTING UP THE APPLICATION FRAMEWORK Operating System The code in this book has been developed... commands: # # # # # # # # # # mkdir /var/www/phpweb 20 cd /var/www/phpweb 20 mkdir data mkdir data/logs mkdir data/uploaded-files mkdir data/tmp mkdir htdocs mkdir include mkdir include/Controllers mkdir templates When you view the directory listing, you should see the following: # ls data/ htdocs/ include/ templates/ 13 906 3Ch02CMP4 14 11/4 /07 12: 23 PM Page 14 CHAPTER 2 ■ SETTING UP THE APPLICATION FRAMEWORK... 22 1 Creating the DatabaseObject_BlogPost Class 22 1 Creating the Profile_BlogPost Class 22 3 Creating a Controller for Managing Blog Posts 22 3 Extending the Application Permissions 22 3 The BlogmanagerController Actions 22 5 Linking to Blog Manager 22 6 Creating... 547 906 3CH00CMP3 11/19 /07 8:39 PM Page xv About the Author ■QUENTIN ZERVAAS is a web developer based in Adelaide, South Australia, where he has been self-employed since 20 03 After receiving his bachelor’s degree in computer science from the University of Adelaide in 20 01 , Quentin worked for several web development firms before branching out on his own, developing a wide range of custom web applications. .. Sheet 20 1 Styling the Application Web Forms 20 4 Loading Prototype and Scriptaculous 20 7 Implementing Client-Side Form Validation 20 8 Adding JSON Support to CustomControllerAction 20 9 Modifying the Form Processor 20 9 Modifying the Registration Controller... /usr/local/lib /php 11 906 3Ch02CMP4 12 11/4 /07 12: 23 PM Page 12 CHAPTER 2 ■ SETTING UP THE APPLICATION FRAMEWORK ■ Note Please ensure that your version of PHP is built with the GD library enabled, as we will use it in this book for generating CAPTCHA images (Chapter 4) and for resizing uploaded images (Chapter 11) When you run the make install command, the Apache httpd.conf file will be modified to load the PHP. .. Web Design Techniques (friends of ED, 20 07 ), was an instant success In late 20 05 , Jeffrey also became a PHP 4 Zend Certified Engineer; he updated the certification to PHP 5 in September 20 06 to become one of the first PHP 5 Zend Certified Engineers Jeffrey also maintains a blog at http://jeffreysambells.com where he discusses his thoughts about everything from web development to photography He currently... the technical reviewer for Beginning Ajax with PHP: From Novice to Professional (Apress, 20 06 ), he decided to undertake writing this book xv 906 3CH00CMP3 11/19 /07 8:39 PM Page xvi About the Technical Reviewer ■ JEFFREY SAMBELLS is a graphic designer and self-taught web application developer best known for his unique ability to merge the visual world of graphics with the mental realm of code After obtaining . TITLES Practical

Ngày đăng: 24/01/2014, 14:07

TỪ KHÓA LIÊN QUAN