Preface |
|
xiii | |
|
|
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) |
|
|
4 | (1) |
|
1.2.3 Division of Responsibility and Ease of Management |
|
|
4 | (1) |
|
1.2.4 Ease of Documentation |
|
|
4 | (1) |
|
|
5 | (1) |
|
1.2.6 Performance and Scalability |
|
|
5 | (1) |
|
1.3 Disadvantages of a Multi-Tier System |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
1.4 Questions and Exercises |
|
|
7 | (2) |
|
2 Principles of Object Orientation in PHP |
|
|
9 | (12) |
|
|
10 | (2) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
21 | (24) |
|
|
22 | (4) |
|
3.1.1 A Simple Page Request and Response |
|
|
22 | (2) |
|
3.1.2 A More Complex GET Request |
|
|
24 | (2) |
|
|
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) |
|
|
37 | (3) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
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) |
|
|
46 | (4) |
|
|
47 | (1) |
|
|
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) |
|
|
58 | (3) |
|
|
58 | (1) |
|
5.2.2 Populating the Table |
|
|
59 | (2) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
165 | (28) |
|
8.1 Inserting, Updating, and Deleting |
|
|
165 | (6) |
|
|
165 | (2) |
|
|
167 | (3) |
|
|
170 | (1) |
|
|
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) |
|
|
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) |
|
|
222 | (1) |
|
9.3.5 Editing Institutions |
|
|
223 | (2) |
|
|
225 | (1) |
|
9.3.7 Editing Transaction Types |
|
|
226 | (2) |
|
|
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) |
|
|
256 | (1) |
|
|
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 | |