Delphi 6 - Borland Delphi 6 Developer's Guide.pdf

(9237 KB) Pobierz
Borland Delphi 6 Developer's Guide
Borland ®
Delphi 6 Developer’s Guide
Steve Teixeira and Xavier Pacheco
201 West 103rd St., Indianapolis, Indiana, 46290 USA
2784055.004.png 2784055.005.png 2784055.006.png
Borland ®
Delphi 6 Developer’s Guide
E XECUTIVE E DITOR
Michael Stephens
A CQUISITIONS E DITOR
Carol Ackerman
Copyright © 2002 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical, photo-
copying, recording, or otherwise, without written permission from the pub-
lisher. No patent liability is assumed with respect to the use of the information
contained herein. Although every precaution has been taken in the preparation
of this book, the publisher and author assume no responsibility for errors or
omissions. Nor is any liability assumed for damages resulting from the use of
the information contained herein.
International Standard Book Number: 0-672-32115-7
Library of Congress Catalog Card Number: 2001086071
Printed in the United States of America
First Printing: October 2001
04
D EVELOPMENT E DITOR
Tiffany Taylor
M ANAGING E DITOR
Matt Purcell
P ROJECT E DITOR
Christina Smith
P RODUCTION E DITOR
Rhonda Tinch-Mize
I NDEXER
Sharon Shock
03
02
01
4 3 2 1
P ROOFREADER
Harvey Stanbrough
Trademarks
All terms mentioned in this book that are known to be trademarks or service
marks have been appropriately capitalized. Sams Publishing cannot attest to
the accuracy of this information. Use of a term in this book should not be
regarded as affecting the validity of any trademark or service mark.
T ECHNICAL E DITOR
John Ray Thomas
Tom Theobold
T EAM C OORDINATOR
Pamalee Nelson
M EDIA D EVELOPER
Dan Scherf
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as
possible, but no warranty or fitness is implied. The information provided is on
an “as is” basis. The authors and the publisher shall have neither liability nor
responsibility to any person or entity with respect to any loss or damages aris-
ing from the information contained in this book or from the use of the CD or
programs accompanying it.
I NTERIOR D ESIGNER
Anne Jones
C OVER D ESIGNER
Aren Howell
P AGE L AYOUT
Octal Publishing, Inc.
2784055.007.png
Contents at a Glance
Introduction
Part I: Development Essentials
1 Programming in Delphi
2 The Object Pascal Language
3 Adventures in Messaging
Part II: Advanced Techniques
4 Writing Portable Code
5 Multithreaded Techniques
6 Dynamic Link Libraries
Part III: Database Development
7 Delphi Database Architecture
8 Database Development with dbExpress
9 Database Development with dbGo for ADO
Part IV: Component-Based Development
10 Component Architecture: VCL and CLX
11 VCL Component Building
12 Advanced VCL Component Building
13 CLX Component Development
14 Packages to the Max
15 COM Development
16 Windows Shell Programming
17 Using the Open Tools API
Part V: Enterprise Development
18 Transactional Development with COM+/MTS
19 CORBA Development
20 BizSnap Development: Writing SOAP-Based Web Services
21 DataSnap Development
2784055.001.png
Part VI: Internet Development
22 ASP Development
23 Building WebSnap Applications
24 Wireless Development
Index
2784055.002.png
Table of Contents
Introduction 1
Who Should Read This Book ................................................................2
Conventions Used in This Book ............................................................2
Delphi 6 Developer’s Guide Web Site ....................................................2
Getting Started ........................................................................................3
P ART I Development Essentials 5
1 Programming in Delphi 7
The Delphi Product Family ....................................................................8
Delphi: What and Why ........................................................................10
The Quality of the Visual Development Environment ....................11
The Speediness of the Compiler Versus the Efficiency
of the Compiled Code ..................................................................12
The Power of the Programming Language Versus
Its Complexity ..............................................................................13
The Flexibility and Scalability of the Database Architecture ........14
The Design and Usage Patterns Enforced by the Framework ........15
A Little History ....................................................................................15
Delphi 1 ..........................................................................................16
Delphi 2 ..........................................................................................16
Delphi 3 ..........................................................................................17
Delphi 4 ..........................................................................................18
Delphi 5 ..........................................................................................18
Delphi 6 ..........................................................................................19
The Delphi IDE ....................................................................................19
The Main Window ..........................................................................20
The Form Designer ..........................................................................22
The Object Inspector ......................................................................22
The Code Editor ..............................................................................22
The Code Explorer ..........................................................................23
The Object TreeView ......................................................................23
A Tour of Your Project’s Source ..........................................................24
Tour of a Small Application ................................................................26
What’s So Great About Events, Anyway? ............................................28
Contract-Free Programming ............................................................28
Turbo Prototyping ................................................................................29
Extensible Components and Environment ..........................................29
2784055.003.png
Zgłoś jeśli naruszono regulamin