Table of Contents
preface xiii
acknowledgements xiv
introduction xvi
Who should read this book xviii
How this book is organized xix
Author online xx
PowerBuilder Developer's Library xxii
Chapter 1 Internet and intranet programming considerations 1
1.1 What is the Internet? What is an Intranet? 2
1.2 Server-side versus client-side programming 4
1.3 Overview of the Internet Toolkit 4
1.4 Requirements for the development workstation 5
1.5 Summary 7
Chapter 2 Web.PB architecture, Web servers, examples, and tutorial 9
2.1 Web program design 10
2.2 Web.PB component architecture 17
2.3 The PBWEB.INI files 19
2.4 About Web Servers 21
WebSite and WebSite Professional servers 22
Netscape Enterprise and FastTrack servers 23
Netscape Commerce and Communications servers 23
Microsoft Internet Information and Personal Web servers 23
Apache server 23
2.5 The Web.PB examples and tutorial 23
Steps to set up the PC for the examples 24
Browsing the Web.PB examples 28
Running the compiled Web.PB example application 29
2.6 What's in the Web.PB tutorial? 30
The first lesson 30
The second lesson 31
2.7 Summary 31
Chapter 3 Creating a simple Web.PB program I 33
3.1 Create the application server 34
Create a new PBL and application object 34
Create and populate a transport object 35
Last steps 35
3.2 Create a datawindow 36
3.3 Create the distributed function 37
Create the nonvisual object 37
Build the distributed function 38
3.4 Using the Web.PB wizard to create a test page 39
Start the Web.PB wizard 39
3.5 Edit the services file 44
3.6 Start the application server 46
3.7 Load the HTML file in the web browser 46
3.8 Test the function 47
3.9 Basic steps to create a Web.PB program 48
3.10 Sorting the table 49
3.11 Summary 52
Chapter 4 Creating a simple Web.PB program II 55
4.1 The anchor tag 56
4.2 Looking at the URL 56
Breaking down the URL 57
Absolute and relative URLs 58
Examples of resolving a URL 59
When to use relative URLs 60
4.3 Adding drill-down features 60
Creating a new datawindow 61
Code the function to return the list of orders 61
Embed links into the customer list 62
Test it out 63
4.4 Tying up the loose ends 65
Changing the table alignment 66
Add column sorts to the order list 66
Place navigation links in the HTML 67
Clean up the HTML and add titles 67
4.5 Test before you ship 68
4.6 Creating a run-time application server70
4.7 Summary 72
Chapter 5 Distributed PowerBuilder techniques I 73
5.1 How DPB works with Web.PB 73
5.2 Shared objects 82
Shared object functions 83
Creating an access log using a shared object 85
5.3 Summary 103
Chapter 6 Distributed PowerBuilder techniques II 105
6.1 Threadsafe database drivers 106
6.2 Remote control of the application server 106
6.3 Precautions 119
6.4 Summary 122
Chapter 7 Datawindows, HTML tables and style sheets 123
7.1 The relationship between datawindows and HTML tables 124
7.2 HTML tables 125
7.3 Datawindow to HTML example 126
7.4 HTMLTable object attributes and style sheets 128
Attributes of the <table> tag 128
Style sheets 131
7.5 Putting style sheets and HTML table attributes to work 134
7.6 The Web.PB class library HTML format services 140
Using the HTML format services 141
Examples of using HTML services 142
7.7 Extending the HTML format services 149
7.8 Summary 154
Chapter 8 Data entry basics 155
8.1 Data entry with Web.PB 156
HTML forms 156
GenerateHTMLForm() for creating HTML forms from datawindows 160
8.2 Using GenerateHTMLForm for table maintenance 163
8.3 Summary 177
Chapter 9 Advanced data entry and consistent look and feel 179
9.1 Creating your own forms with the Web.PB class library 180
Constructing the multiform page 181
Processing the multiform page 193
9.2 The template library 194
9.3 Getting to know HTML 202
9.4 Summary 203
Chapter 10 Session management I 205
10.1 Class library support for sessions 207
10.2 Adding a logon to simpleweb 231
10.3 Summary 231
Chapter 11 Session management II 233
11.1 Using Web.PB transactions 234
11.2 HTTP cookies and basic authentication 252
11.3 Porting the Web.PB database 255
11.4 Summary 255
Chapter 12 Debugging and performance 257
12.1 Debugging Web.PB programs 258
12.2 Transport object tracing 266
12.3 Using the shared log object for debugging and performance 269
12.4 Factors affecting performance 270
12.5 Performance testing 274
12.6 Summary 277
Chapter 13 Advanced topics 279
13.1 Running the DPB server as an NT service 280
13.2 Using HTML frames 285
13.3 JavaScript for input validation 287
13.4 The datawindow plug-in 293
13.5 Summary 297
Chapter 14 The window plug-ing and ActiveX 299
14.1 Architecture of the plug-in and ActiveX components 300
14.2 Configuring workstations for the plug-ins and ActiveX 305
14.3 Configuring the Web server 305
14.4 Running the sample 306
14.5 Creating the PB program 307
14.6 Building the program 307
14.7 Testing and debugging 308
14.8 A simple window plug-in/ActiveX program 308
14.9 Interacting with the window ActiveX 312
14.10 Using the secured versions of the plug-in and ActiveX 317
14.11 Summary 320
Chapter 15 Sockets programming with PowerBuilder 6 321
15.1 Sockets background 322
15.2 The sockets class library 323
15.3 A simple mail transfer client 325
15.4 A window to SMTP 326
15.5 The SMTP protocol definition 327
15.6 Running the example 329
15.7 Summary 331
Appendix A Other Internet-related PowerSoft products 333
A.1 Ready...Aim...Fire...! Missed! 334
Appendix B Resources 337
B.1 Web sites and newsgroups 338
Appendix C Troubleshooting 347
Appendix D Web references 351
index 357