More Ebooks:

Corel Draw 9

Core Servlets and JavaServer Pages (JSP)

Core JSTL - Mastering the JSP Standard Tag Library

Core J2EE patterns

Content Syndication with RSS

Content Delivery Networks - Web Switching for Security, Availability and Speed

Configuring Symantec AntiVirus Corporate Edition

Configuring IPv6 for Cisco IOS

Configuring Exchange 2000 Server

Configuring Citrix XP

find on eBook ToC:

C++ Builder 6 Developers Guide with CDR (Wordware Delphi Developer's Library)

C++ Builder 6 Developers Guide with CDR (Wordware Delphi Developer

Satya Sai Kolachina, Wordware Publishing, Inc.

ISBN:1556229607, Edition: , 2002-12-25

Price: $49.95

Table of Contents

Introduction ~ xiii

Part I Windows and Database Development

Chapter 1 Introduction to C++Builder 6 ~ 3

Introduction ~ 3
C++Builder 6 Overview ~ 3
The MainWindow and Toolbars ~ 3
Component Palette ~ 4
Object Inspector ~ 5
Object TreeView ~ 7
To-Do List ~ 7
Alignment Palette ~ 8
New Features ~ 9
Technology Additions ~ 9
WebSnap and Enhancements to Internet Development ~ 9
BizSnap ~ 11
Enhancements ~ 11
Enhancement to DataSnap ~ 11
New Database Support ~ 11
STLPort Standard Template Library ~ 11
New Components andWizards ~ 12
Working with Projects ~ 13
What Constitutes a C++Builder 6 Project? ~ 13
Setting Project Options ~ 14
Borland Packages and Components ~ 15
Installing Third-Party Vendor Components ~ 16
Types of Projects That C++Builder 6 Supports ~ 17
Building User Interfaces ~ 18
Your FirstWindows Application ~ 19
Summary ~ 22

Chapter 2 C++ Advanced Concepts ~ 23

Introduction ~ 23
Language Overview ~ 24
C++ Features That are Often Ignored ~ 26
Templates ~ 26
What are Templates? ~ 26
When to Use Templates ~ 26
Namespaces ~ 29
Casting in C++ ~ 32
dynamic_cast ~ 32
static_cast ~ 34
const_cast ~ 34
reinterpret_cast ~ 35
Exception Handling ~ 35
AWord about Pointers ~ 37
References ~ 40
Virtual Methods ~ 42
C++ Language and C++Builder ~ 45
Overview ~ 45
Keyword Extensions ~ 47
__classid ~ 47
__closure ~ 47
__property ~ 49
__published ~ 50
__declspec ~ 50
__interface ~ 52
Object Construction Sequence in C++Builder ~ 53
Summary ~ 56

Chapter 3 The VCL Explored ~ 57

Brief Introduction to VCL Architecture ~ 57
VCL Objects ~ 60
AnsiString ~ 62
What is TObject? ~ 63
Persistence of Objects-TPersistent Class ~ 65
Basic VCL Component-TComponent Class ~ 65
Non-Visual Components ~ 66
Visual Components-TControl and TWinControl Classes and Their Descendants ~ 66
The Application-Global TApplication Instance ~ 67
Properties, Methods, and Events of TApplication ~ 69
Other Global Variables-TScreen, TMouse, and TClipboard Instances ~ 73
Getting the RTTI ~ 79
Is a Specific Property Published for the Object? ~ 79
What is the Property Type? ~ 79
Is a Specific Property in an Object of a Specific Type? ~ 80
What is the Type of a Specific Property in an Object? ~ 80
Is the Property Stored in the DFM File? ~ 80
Getting and Setting Property Values for an Object ~ 80
A Closer Look at Forms ~ 82
Creating Forms in a DLL ~ 84
What are a Form’s Characteristics? ~ 90
Frames in the VCL ~ 92
Using Frames in a Project ~ 93
The Value List Editor ~ 95
Summary ~ 97

Chapter 4 Advanced VCL Features ~ 99

Introduction ~ 99
Actions and ActionLists ~ 99
Action Clients ~ 100
Action Objects and TAction Class ~ 101
Types of Action Objects ~ 101
Action Targets ~ 101
ActionList Object ~ 102
Using the Standard Action Objects ~ 102
How Does the Application Find the Action Target for an Action Object? ~ 105
Using the Custom Action Objects ~ 105
How Does VCL Identify the Appropriate Action Handler for an Action? ~ 107
Visual Components That Render Action Objects ~ 110
Windows Common Dialogs ~ 118
Windows Drag and Drop ~ 120
Properties and Methods of the Source Object ~ 120
BeginDrag() Method ~ 120
OnMouseDown() Event ~ 121
Event Handlers for the Drop Target ~ 121
Custom Drag Objects ~ 122
Drag and Drop Across Modules in an Application ~ 128
Date/Time Management ~ 133
TDateTime Class ~ 133
What is DOS File Timestamp? ~ 137
Win32 Core Date-Time Management ~ 138
Formatting Date-Time Strings ~ 139
Constants Defined in SYSUTILS ~ 140
Directory and File Management ~ 141
Working with Directories ~ 141
Working with Files ~ 144
Functions ThatWork with File Existence and Search ~ 144
WIN32_FIND_DATA Structure ~ 145
File Attributes ~ 146
Setting the Advanced Attributes ~ 147
Filename Manipulation Functions ~ 149
File Content Management ~ 151
Summary ~ 152

Chapter 5 Simple Database Development ~ 153

Introduction to Database Development ~ 153
Two-tier, Three-tier, and Multi-tier Applications ~ 154
VCL Architecture for Database Development ~ 156
Database Connection Components ~ 157
Database Connection Frameworks Supported in VCL ~ 157
How Do You Connect to a Database? ~ 160
What is TDataSet? ~ 161
Dataset States ~ 163
Synchronous and Asynchronous Modes ~ 164
Properties, Methods, and Events ~ 165
Data-aware Controls and DataSource ~ 169
Data Module-The Non-visual Container ~ 170
Borland Database Engine (BDE) Framework ~ 170
BDE Components ~ 170
Setting Up a BDE Alias for InterBase SQL Links Driver . 171
Setting Up a BDE Alias for MS Access ODBC Driver ~ 173
Sample Application Using BDE Framework ~ 175
Creating BDE Components Programmatically ~ 181
ActiveX Data Objects (ADO) Framework-dbGo ~ 183
Microsoft ADO Components ~ 183
Simplified Borland ADO Components ~ 183
How DoWe Make a Database Connection? ~ 183
Obtaining Metadata from the Database ~ 186
What Dataset Objects are Available in the ADO Framework? ~ 189
The TADOCommand Component ~ 192
Sample Application Using ADO Components ~ 193
Summary ~ 198

Chapter 6 Advanced Database Development ~ 199

Introduction ~ 199
Data Access Components ~ 200
What is TClientDataSet? ~ 200
TClientDataSet as an In-memory Table ~ 201
Creating a ClientDataSet on a Form ~ 201
Programmatically Creating a ClientDataSet ~ 203
TDataSetProvider in Advanced Database Development ~ 207
The TDataSetProvider-TClientDataSet Duo ~ 208
Properties, Methods, and Events of TClientDataSet ~ 210
Properties, Methods, and Events of TDataSetProvider ~ 216
Methods Supported by IProviderSupport Interface ~ 218
The TDataSource Component ~ 221
XML-based Data Access Components ~ 221
Borland dbExpress Architecture ~ 222
Overview ~ 222
dbExpress Components ~ 222
Configuring a dbExpress Connection ~ 223
Using Unidirectional Datasets with Data-aware Controls ~ 225
Through TSQLClientDataSet ~ 225
Through TClientDataSet and TDataSetProvider ~ 230
Using Unidirectional Datasets without Data Controls ~ 235
Borland InterBase Express for InterBase ~ 236
Overview ~ 236
IBX Components ~ 237
TIBDatabase, TIBDatabaseInfo, and TIBTransaction ~ 237
AWord about Transaction Isolation Levels ~ 241
Datasets in the IBX Family ~ 242
Executing Stored Procedures That Return a Result Set ~ 245
Updating a Read-only Dataset ~ 246
TIBClientDataSet at a Glance ~ 250
Summary ~ 251

Part IIAdvanced and Distributed Application Development

Chapter 7 Building WebBroker Applications ~ 255

Introduction ~ 255
Uniform Resource Identifiers (URIs) ~ 256
Overview ~ 256
Parts of a URL ~ 256
The HTTP Protocol ~ 257
The HTTP Methods ~ 258
The HTTP Request ~ 259
The HTTP Response ~ 262
The HTTP Response Status Codes ~ 262
Web Development in C++Builder 6 ~ 263
Overview ~ 263
A TypicalWeb Application ~ 265
Web Dispatcher in Action ~ 274
Sample Web Applications ~ 275
Overview ~ 275
CGI Application ~ 276
Convert the CGI Application to ISAPI DLL ~ 282
Apache Application ~ 285
Producer Components ~ 290
Overview ~ 290
PageProducer Components ~ 290
TableProducer Components ~ 292
Summary ~ 303

Chapter 8 Building WebSnap Applications ~ 305

Introduction ~ 305
WebSnap Components at a Glance ~ 306
Overview ~ 306
Web Page Modules ~ 307
Web Data Modules ~ 309
Adapter Components ~ 309
What are Adapters? ~ 309
Types of Adapters ~ 312
Content Producers ~ 314
The IPageDispatcher Interface ~ 314
Server-side Scripting ~ 315
Overview of the Scripting Language ~ 319
VCL Script Objects ~ 321
The Page Object ~ 326
The Module Object ~ 327
Other Objects ~ 327
Building WebSnap Applications ~ 328
WebSnap ApplicationWizards ~ 328
A SimpleWebSnap Application ~ 332
An ImprovedWay to Save the State Information ~ 338
AWebSnap Application Connecting to a DataSource ~ 339
Summary ~ 346

Chapter 9 Developing DataSnap Applications ~ 347

Introduction ~ 347
DataSnap Applications ~ 347
Connecting to the Remote Application Server ~ 348
What is Contained in the DataSnap Server Module? ~ 350
The IAppServer Interface ~ 354
The Threading Model of Server Objects ~ 357
DataSnap Application Logic Flow ~ 359
Sample DataSnap Application ~ 361
Connecting to the Server through DCOM ~ 368
Applying Updates and Reconciling Errors ~ 369
Web Client to a DataSnap Server ~ 372
TXMLBroker Component ~ 372
TInetXPageProducer Component ~ 374
AWord on the XML-based Provider ~ 378
Summary ~ 382

Chapter 10 Developing Distributed Applications (CORBA and TCP/IP) ~ 385

Introduction ~ 385
CORBA Overview ~ 386
The CORBA Object Model ~ 387
The Interface Definition Language ~ 388
IDL to CPP Translation ~ 390
The Stub File Classes ~ 390
The Skeleton Classes ~ 392
The CORBA Server Application ~ 393
The CORBA Client Application ~ 399
The Portable Object Adapter ~ 402
The Interface Repository ~ 407
The Object Activation Daemon (OAD) ~ 408
The Naming Service ~ 408
Simple TCP/IP Applications ~ 409
Simple TCP/IP Protocol ~ 409
Blocking and Non-blocking Connections ~ 412
How Do Clients Establish a Connection with the Server? ~ 412
Custom App Server Model ~ 414
A Simple FTP Client ~ 422
Summary ~ 427

Chapter 11 Building BizSnap Applications (XML and Web Services) ~ 429

Introduction ~ 429
XML Overview ~ 430
XML Documents ~ 431
The Document Object Model ~ 432
XML Namespaces ~ 435
XML Schemas ~ 436
What is TXMLDocument? ~ 436
SOAP Overview ~ 440
Web Services ~ 442
Building and UsingWeb Services in C++Builder 6 ~ 442
Building SOAP Server Applications ~ 443
Building SOAP Client Applications ~ 451
SOAP-based Multi-tier Distributed Applications ~ 454
Building the Server Module ~ 455
Summary ~ 460

Chapter 12 Miscellaneous and Advanced Topics ~ 461

Introduction ~ 461
The Cross-platform Component Library ~ 461
What does BaseCLX Contain? ~ 464
INI Files andWindows Registry ~ 464
Non-visual Containers ~ 468
TStrings and TStringList ~ 468
TList and TObjectList ~ 471
Streams and Streaming ~ 472
Graphics at a Glance ~ 475
TCanvas ~ 476
Visual Container Components (in VisualCLX) ~ 477
TListBox ~ 477
TListView ~ 477
Custom Component Development ~ 478
Implementing Component Properties and Methods ~ 480
Implementing Component Events ~ 482
Overriding Default Event Behavior ~ 484
Registering the Components ~ 486
Miscellaneous Programming Features ~ 487
Variant and OleVariant ~ 487
Using Office 2000 Automation Objects ~ 492
The TOleContainer Component ~ 493
Summary ~ 497

Index ~ 499