Table of Contents

Introduction xxi Acknowledgments xxvi

PowerBuilder Developer's Library xxvii

Part I Distributed computing architecture and technology 1

1 Introduction to distributed computing 3

1.1 What is distributed computing? 4
1.2 Business challenges and distributed computing 6
1.3 Business application architectures 7 1.4 Distributed computing and the enterprise 17
1.5 The Powersoft strategy 18
1.6 Summary 20

2 Transitioning the corporation to distributed computing 21

2.1 Choosing what to distribute 22
2.2 Planning the first project 23
2.3 Keys to success 23
2.4 The distributed application environment 24
2.5 Distributed computing is not a silver bullet 25
2.6 Challenges of programming in a distributed environment 25
2.7 Deciding when to distribute an application 26
2.8 Summary 26

Part II Distributed PowerBuilder 27

3 Distributed PowerBuilder overview 29

3.1 DPB overview 30
3.2 Why use DPB? 30
3.3 When to use DPB 31
3.4 Where to get DPB 31
3.5 DPB support 32 3.6 DPB concepts 333.7 Creating proxies 50
3.8 Accessing a remote object 52
3.9 Destroying the object instance 53
3.10 Location transparency 54 3.11 The Hello World DPB application 56 3.12 Summary 66

4 Writing DPB applications 67

4.1 The DPB server environment 68
4.2 How DPB works 73 4.3 ConnectionBegin and ConnectionEnd 74
4.4 Getting information on connections 75 4.5 Error handling 80 4.6 Debugging 82
4.7 The trace facility 86 4.8 Compiling and deploying the application 92
4.9 Summary 93

5 Developing remote objects 95

5.1 The custom class user object 96 5.2 Getting our terms straight 100
5.3 Instantiating an object 100 5.4 Destroying objects 105 5.5 Objects, attributes, and methods 107 5.6 Calling methods 110 5.7 Restrictions on passing arguments to remote objects 116
5.8 Restrictions on return values for remote objects 117
5.9 Passing arguments to methods 117 5.10 Summary 120

6 Database techniques 123

6.1 Database connectivity 124
6.2 Pooling database connections 127
6.3 Retrieving data 129 6.4 Data retrieval using the client/server model 136
6.5 Data retrieval using DPB 140 6.6 Getting data from the middle tier 146 6.7 Using the object notation on a DataWindow or DataStore 157
6.8 DataWindow children 158
6.9 Summary 163

7 Database updates 165

7.1 Handling data updates 166 7.2 DataWindow synchronization 179 7.3 Summary 190

8 Advanced concepts 191

8.1 Server push 192 8.2 Asynchronous method calls and server push 201 8.3 Shared objects 206 8.4 Multithreaded applications 217
8.5 Passing object references: dealing with complexity and deadlocks 218
8.6 Summary 220

9 DPB communications support 221

9.1 The local driver 222 9.2 Named pipes 224 9.3 WinSock 226 9.4 Summary 240

10 Building an application server 241

10.1 Expanding the server functionality 242 10.2 Setting up PowerBuilder 244
10.3 Building a custom transport object 245 10.4 Building a custom connection object 252 10.5 Building a transport manager 259 10.6 Building a DPB manager 272 10.7 Putting it all together 283 10.8 Summary 288

Part III PowerBuilder and the Internet 289

11 PowerBuilder and the Internet 291

11.1 Internet and Web primer 293 11.2 PowerBuilder Internet capabilities 303 11.3 Plug-ins guidelines 320 11.4 Summary 321

12 Web.PB 323

12.1 Web.PB overview 324 12.2 How Web.PB works 327 12.3 Setting up Web.PB 333 12.4 Developing a Web.PB application 336 12.5 Building Web-enabled remote objects 345 12.6 Putting together the Web.PB application 354 12.7 Maintaining state in a Web application 365
12.8 Running a Web.PB application 366
12.9 Debugging the Web.PB application 366
12.10 Summary 366

Part IV PowerBuilder and the future 367

13 Beyond DPB 369

13.1 Component generators 370
13.2 Distributed solutions using PowerBuilder and COM 374 13.3 Jaguar CTS 380 13.4 Summary 390

14 The future of PowerBuilder 391

14.1 The future technologies 393 14.2 Summary 399

Appendix A Application partitioning and distributed computing 401

A.1 What is application partitioning? 402
A.2 Object-oriented design overview 402
A.3 Guidelines to designing distributable components 403
A.4 Application partitioning, a layered approach 404 A.5 Why use application partitioning? 406 A.6 Application partitioning and application architecture 408 A.7 Guidelines to distributing components 413

Appendix B Enabling technology and middleware 415

B.1 What is middleware ? 416
B.2 Middleware layers 417
B.3 Network stacks 420
B.4 Inter-process communication middleware 420
B.5 Choosing middleware 421 B.6 Distributed standards 432 B.7 Object-based IPC 434 B.8 Distributing PowerBuilder applications 444 B.9 Summary 445

Appendix C Standard data types 447

Appendix D DPB objects and functions reference 449

D.1 DPB objects & functions 450

Appendix E Where to find additional information 461

E.1 Web sites and news groups 462 E.2 Magazines and books 466

Index 469