Muutke küpsiste eelistusi

Multi-Tier Application Programming with PHP: Practical Guide for Architects and Programmers [Pehme köide]

  • Formaat: Paperback / softback, 278 pages, kõrgus x laius: 235x191 mm, kaal: 630 g
  • Sari: The Practical Guides
  • Ilmumisaeg: 25-Jun-2004
  • Kirjastus: Morgan Kaufmann Publishers In
  • ISBN-10: 0127323503
  • ISBN-13: 9780127323503
Teised raamatud teemal:
  • Formaat: Paperback / softback, 278 pages, kõrgus x laius: 235x191 mm, kaal: 630 g
  • Sari: The Practical Guides
  • Ilmumisaeg: 25-Jun-2004
  • Kirjastus: Morgan Kaufmann Publishers In
  • ISBN-10: 0127323503
  • ISBN-13: 9780127323503
Teised raamatud teemal:
While many architects use PHP for projects, they are often not aware of the power of PHP in creating enterprise-level applications. This book covers the latest version of PHP – version 5 -- and focuses on its capabilities within a multi-tier application framework. It contains numerous coding samples and commentaries on them. A chapter discusses object orientation in PHP as it applies to the multi-tier architecture and other chapters discuss HTTP and SOAP, the two communication protocols most useful in tying together multiple layers. There is also coverage of database design and query construction as well as information about tricks you can use in generating user interfaces.

·Covers PHP as it relates to developing software in a multi-tier environment—a crucial aspect of developing robust software with low cost and ease of use as design goals.

·Makes extensive use of Simple Object Access Protocol (SOAP) and Web Services as implemented in PHP and NuSOAP.

·Shows precisely how to make use of the InnoDB table type newly available in MySQL. InnoDB supports true referential integrity and row-level locking.

·An application example (a multi-currency bookkeeping application) runs throughout the book, showing various PHP capabilities as well as the database interaction.

·An accompanying web site includes the source code for all of the examples and the sample download.

Muu info

A fresh look at PHP as it applies to multi-tier application design, giving developers an alternative to more expensive and less manageable solutions.
Preface xiii
1 Introduction
1(8)
1.1 Defining Multi-Tier Software Design
1(1)
1.2 Advantages of a Multi-Tier System
2(4)
1.2.1 Software Modularity
3(1)
1.2.2 Reliability
4(1)
1.2.3 Division of Responsibility and Ease of Management
4(1)
1.2.4 Ease of Documentation
4(1)
1.2.5 Security
5(1)
1.2.6 Performance and Scalability
5(1)
1.3 Disadvantages of a Multi-Tier System
6(1)
1.3.1 Execution Speed
6(1)
1.3.2 Network Latency
6(1)
1.3.3 Security
7(1)
1.4 Questions and Exercises
7(2)
2 Principles of Object Orientation in PHP
9(12)
2.1 Creating Classes
10(2)
2.1.1 Declaring a Class
10(1)
2.1.2 Adding a Constructor
10(1)
2.1.3 Adding Methods and Properties (a.k.a. Functions and Variables)
11(1)
2.2 Using a Class
12(1)
2.2.1 Instantiating a Class
12(1)
2.2.2 Accessing Variables in a Class Instance
12(1)
2.2.3 Accessing Methods in a Class Instance
12(1)
2.3 More Advanced Aspects of PHP Object Orientation
13(6)
2.3.1 Getting a Class to Refer to Itself
13(1)
2.3.2 Inheritance
14(1)
2.3.3 Public, Private, and Protected Members
15(2)
2.3.4 Overriding Class Methods
17(2)
2.4 Questions and Exercises
19(2)
3 HTTP in PHP
21(24)
3.1 Understanding HTTP
22(4)
3.1.1 A Simple Page Request and Response
22(2)
3.1.2 A More Complex GET Request
24(2)
3.1.3 A POST Request
26(1)
3.2 Working with HTTP in PHP
26(11)
3.2.1 Accessing GET Variables
26(1)
3.2.2 Accessing POST Variables
27(2)
3.2.3 Accessing Various HTML Form Elements
29(8)
3.3 Cookies
37(3)
3.3.1 Setting Cookies
38(1)
3.3.2 Retrieving Cookies
39(1)
3.3.3 Deleting Cookies
40(1)
3.4 Sessions
40(3)
3.4.1 Preparing the PHP Server for Session Tracking
41(1)
3.4.2 Establishing a Session
41(1)
3.4.3 Setting a Session Variable
42(1)
3.4.4 Retrieving a Session Variable
42(1)
3.5 Questions and Exercises
43(2)
4 Simple Object Access Protocol Under PHP
45(10)
4.1 Understanding SOAP
46(4)
4.1.1 A SOAP Request
47(1)
4.1.2 A SOAP Response
48(2)
4.2 Implementing SOAP in PHP
50(3)
4.2.1 A Simple Application of NuSOAP
50(2)
4.2.2 A More Complex Application of NuSOAP
52(1)
4.3 Questions and Exercises
53(2)
5 Designing and Implementing a Multi-Tier Application in PHP
55(18)
5.1 Examining the Problem
55(3)
5.1.1 Sketching Out the Layers
56(1)
5.1.2 Communication Between the Layers
57(1)
5.2 The Database Layer
58(3)
5.2.1 Creating the Table
58(1)
5.2.2 Populating the Table
59(2)
5.3 The Accessor Layer
61(5)
5.3.1 Isolating the Database Details
61(1)
5.3.2 Getting City Names from the Database
62(2)
5.3.3 Getting Latitudes and Longitudes from the Database
64(2)
5.4 The Business Logic Layer
66(2)
5.5 The Presentation Layer
68(4)
5.6 Questions and Exercises
72(1)
6 The Persistence Layer
73(22)
6.1 Choosing a Persistent Storage Mechanism
73(3)
6.1.1 Choosing a Database Server
74(1)
6.1.2 Selecting Development Tools
75(1)
6.2 Designing the Database
76(1)
6.2.1 General Database Design Principles
76(1)
6.2.2 Specific Design Requirements
76(1)
6.3 Understanding Table Relationships and Normalization
77(3)
6.3.1 First Normal Form
78(2)
6.3.2 Further Normal Forms
80(1)
6.4 Deciding on a Table Schema
80(3)
6.4.1 Initial Table Specifications
81(2)
6.4.2 Further Table Specifications
83(1)
6.5 Translating the Schema into SQL
83(9)
6.5.1 Creating the ACCT_account Table
85(1)
6.5.2 Creating the ACCT_trans_type Table
85(1)
6.5.3 Creating the ACCT_acct-type Table
86(1)
6.5.4 Creating the ACCT_currency Table
86(1)
6.5.5 Creating the ACCT_payee Table
87(1)
6.5.6 Creating the ACCT_institution Table
87(1)
6.5.7 Creating the ACCT_bank_account Table
88(1)
6.5.8 Creating the ACCT_register Table
89(3)
6.6 Populating the Tables
92(1)
6.7 Questions and Exercises
93(2)
7 The Accessor Layer
95(70)
7.1 Extracting Data From the Database
95(38)
7.1.1 Using SELECT Queries
96(10)
7.1.2 SELECT Queries for Currawong Accounting
106(27)
7.2 Adding Data to the Database
133(12)
7.2.1 Using INSERT Queries
133(2)
7.2.2 INSERT Queries for Currawong Accounting
135(10)
7.3 Modifying Data in the Database
145(10)
7.3.1 Using UPDATE Queries
146(1)
7.3.2 UPDATE Queries for Currawong Accounting
147(8)
7.4 Deleting Data from the Database
155(8)
7.4.1 Delete Queries in General
155(2)
7.4.2 DELETE Queries in Currawong Accounting
157(6)
7.5 Questions and Exercises
163(2)
8 Business Logic
165(28)
8.1 Inserting, Updating, and Deleting
165(6)
8.1.1 Inserting a Row
165(2)
8.1.2 Updating a Row
167(3)
8.1.3 Deleting a Row
170(1)
8.2 Reporting
171(21)
8.2.1 Generating an Accounts Summary
171(4)
8.2.2 Graphing the Balance of a Single Account over Time
175(7)
8.2.3 Graphing the Balance of a Single Account over Time, with a Moving Average
182(5)
8.2.4 Graphing the Balance of Multiple Accounts over Time
187(5)
8.3 Questions and Exercises
192(1)
9 The Presentation Layer
193(62)
9.1 Frameworks and Resources
193(9)
9.1.1 An HTML Display Framework
194(3)
9.1.2 Generating List Boxes
197(5)
9.2 Viewing and Adding-Everything but Transactions
202(13)
9.2.1 Viewing and Adding Accounting Categories
203(5)
9.2.2 Viewing and Adding Bank Accounts
208(1)
9.2.3 Viewing and Adding Bank Account Types
209(1)
9.2.4 Viewing and Adding Currencies
210(1)
9.2.5 Viewing and Adding Institutions
211(2)
9.2.6 Viewing and Adding Payees
213(1)
9.2.7 Viewing and Adding Transaction Types
214(1)
9.3 Editing-Everything but Transactions
215(13)
9.3.1 Editing Accounting Categories
217(2)
9.3.2 Editing Bank Accounts
219(2)
9.3.3 Editing Bank Account Types
221(1)
9.3.4 Editing Currencies
222(1)
9.3.5 Editing Institutions
223(2)
9.3.6 Editing Payees
225(1)
9.3.7 Editing Transaction Types
226(2)
9.4 Transactions
228(25)
9.4.1 Special HTML Framework
228(1)
9.4.2 Specifying which Transactions to Display
229(2)
9.4.3 Viewing Transactions
231(7)
9.4.4 Editing Transactions
238(6)
9.4.5 Deleting Transactions
244(6)
9.4.6 Adding Transactions
250(3)
9.5 Questions and Exercises
253(2)
10 The Elsewhere Layer 255(12)
10.1 Means of Grabbing Online Information
255(1)
10.1.1 Screen Scrapes
256(1)
10.1.2 Web Services
257(1)
10.2 Choosing a Web Service
257(1)
10.3 Making Use of the Web Service
258(1)
10.3.1 Describing the Web Service
258(1)
10.3.2 Referring to the Web Service
261(3)
10.4 Questions and Exercises
264(3)
Afterword 267(2)
Index 269
David Wall owns a consulting company that specializes in software development and data visualization, particularly as related to voice over IP and other telephony applications. He designs and deploys Cisco Systems telephony solutions, and teaches engineers about them as well. He specializes in JavaScript on the client side, PHP on the server, and MySQL at the back end. He has written several trade books including The 10 Secrets for Web Success and Graphics Programming with JFC.