You are previewing Delphi for .NET Developer’s Guide.
O'Reilly logo
Delphi for .NET Developer’s Guide

Book Description

Master Microsoft's .NET Framework using Delphi.

This book provides expert knowledge of both Delphi and. NET with the same, practicable and real-world solutions approach used in previous Delphi Developer's Guides. Delphi for .NET Developer's Guide is a new edition of the #1 Delphi book by authors Xavier Pacheco and Steve Teixeira. This newest edition is completely updated for Delphi using the .NET Framework and includes in-depth coverage on Borland's new CLX architecture, DBExpress Applications, SOAP, CORBA, WebSnap and BizSnap features. It continues as a complete reference and authoritative guide to the newest version of Delphi. Additional topics covered include: The .NET Framework; Programs, Units, and Namespaces;.NET Security Custom WinForms Controls; Memory Management and Garbage Collection; COM and COM+ Interoperability; ADO.NET, ASP.NET and Web Services.

Table of Contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. We Want to Hear from You!
  5. Introduction
    1. Who Should Read This Book
    2. How This Book Is Organized
    3. What’s on the Companion CD-ROM
    4. Conventions Used in This Book
    5. Delphi for .NET Developer’s Guide Web Site
  6. Introduction to the .NET Framework
    1. Introduction to .NET
      1. The .NET Initiative
      2. Distributed Development through Web Services
    2. Overview of the .NET Framework
      1. From Development to Execution
      2. The Common Language Runtime (CLR)
      3. The Common Type System (CTS)
      4. The Common Language Specification (CLS)
      5. .NET Framework Class Library (FCL)
  7. Delphi for .NET Programming Language
    1. Introduction to Delphi for .NET and the New IDE
      1. Delphi for .NET—a Bigger Picture
      2. Introduction to the Integrated Development Environment (IDE)
    2. Programs, Units, and Namespaces
      1. Managed Module Structures
      2. Namespaces
    3. The Delphi Language
      1. It’s All about .NET
      2. Comments
      3. Procedures and Functions
      4. Variables
      5. Constants
      6. Operators
      7. Delphi Language Types
      8. User-Defined Types
      9. Typecasting and Type Conversion
      10. String Resources
      11. Testing Conditions
      12. Loops
      13. Procedures and Functions
      14. Scope
      15. Units and Namespaces
      16. Packages and Assemblies
      17. Object-Oriented Programming
      18. Using Delphi Objects
      19. Structured Exception Handling
  8. The .NET Framework Class Library Development
    1. Assemblies—Libraries and Packages
      1. Core Assemblies
      2. Viewing Assembly Contents and Dependencies
      3. Ring the GAC
      4. Building Assemblies
      5. Using Assemblies in Delphi
      6. Using Delphi Assemblies in C#
      7. Installing Packages into the Delphi IDE
      8. Strong Naming Assemblies
      9. Dynamically Loading Assemblies
    2. GDI+ Programming—Drawing in .NET
      1. Fundamental Concepts
      2. Drawing Lines
      3. Drawing Curves
      4. Drawing Shapes
      5. GraphicsPaths and Regions
      6. Working with Images
      7. Revisiting Coordinate Systems
      8. Animation Example
    3. Mono—A Cross Platform .NET Project
      1. Mono Features
      2. History of Mono
      3. Why Mono?
      4. Mono’s Roadmap
      5. Installation/Setup
      6. Creating Your First Mono Program
      7. Running Delphi Generated Assemblies under Mono (on Linux)
      8. Cross Platform ASP.NET
      9. ADO.NET with Mono
      10. Mono and Apache
      11. Mono and System.Windows.Forms
    4. Memory Management and Garbage Collection
      1. How Garbage Collection Works
      2. Constructors
      3. Finalization
      4. The Dispose Pattern—IDisposable
      5. Performance Issues Regarding Finalization
    5. Collections
      1. System.Collections Interfaces
      2. System.Collections Classes
      3. Creating a Strongly-Typed Collection
      4. Creating a Strongly-Typed Dictionary
    6. Working with the String and StringBuilder Classes
      1. The System.String Type
      2. The StringBuilder Class
      3. String Formatting
      4. Format Specifiers
    7. File and Streaming Operations
      1. System.IO Namespace Classes
      2. Working with the Directory System
      3. Working with Files
      4. Streams
      5. Asynchronous Stream Access
      6. Monitoring Directory Activity
      7. Serialization
    8. Developing Custom WinForms Controls
      1. Component Building Basics
      2. Sample Components
      3. User Painting: The PlayingCard Control
    9. Threading in Delphi for .NET
      1. Processes
      2. Threading
      3. Threading .NET Style
      4. AppDomain
      5. The System.Threading Namespace
      6. Writing Thread-safe Code .NET Style
      7. User Interface Issues
      8. Threading Exceptions
      9. Garbage Collection and Threading
    10. Reflection API
      1. Reflecting an Assembly
      2. Reflecting a Module
      3. Reflecting Types
      4. Runtime Invocation of a Type’s Members (Late Binding)
      5. Emitting MSIL Through Reflection
    11. Interoperability—COM Interop and the Platform Invocation Service
      1. Why Have Interoperability?
      2. Common Interoperability Issues
      3. Using COM Objects in .NET Code
      4. Using .NET Objects in COM Code
      5. Using Win32 DLL Exports in .NET Code
      6. Using .NET Routines in Win32 Code
  9. Database Development with ADO.NET
    1. Overview of ADO.NET
      1. Design Principles
      2. ADO.NET Objects
      3. .NET Data Providers
    2. Using the Connection Object
      1. Connection Functionality
      2. Setting Up the ConnectionString Property
      3. Opening and Closing Connections
      4. Connection Events
      5. Connection Pooling
    3. Using Command and DataReader Objects
      1. Executing Commands
      2. Non-Query Commands
      3. Retrieving Single Values
      4. Executing Data Definition Language (DDL) Commands
      5. Specifying Parameters Using IDbParameter
      6. Executing Stored Procedures
      7. Deriving Parameters
      8. Querying for Resultsets Using DataReaders
      9. Querying a Resultset
      10. Querying Multiple Resultsets Using DataReaders
      11. Using DataReader to Retrieve BLOB Data
      12. Using DataReader to Retrieve Schema Information
    4. DataAdapters and DataSets
      1. DataAdapters
      2. Working with DataSets
      3. Working with DataTables
    5. Working with WinForms—DataViews and Data Binding
      1. Displaying Data Using DataView and DataViewManager
      2. Data Binding
    6. Saving Data to the Data Source
      1. Updating the Data Source Using SQLCommandBuilder
      2. Updating the Data Source Using Custom Updating Logic
    7. Working with Transactions and Strongly-Typed DataSets
      1. Transaction Processing
      2. Strongly-Typed DataSets
    8. The Borland Data Provider
      1. Architecture Overview
      2. Borland Data Provider Classes
      3. Designers within the IDE
  10. Internet Development with ASP.NET
    1. ASP.NET Fundamentals
      1. Web Technologies—How They Work
      2. ASP.NET—How It Works
      3. ASP.NET Classes
    2. Building ASP.NET Web Pages
      1. Building Web Pages Using ASP.NET Controls
      2. Pre-populating List Controls
      3. Performing Web Form Validation
      4. Web Form Formatting
      5. Navigating between Web Forms
      6. Tips and Techniques
    3. Building Database Driven ASP.NET Applications
      1. Data Binding
      2. Data Bound List Controls
      3. Data Bound Iterative Controls
      4. Working with the DataGrid
      5. Database-Driven Download Request Form and Administrator
    4. Building Web Services
      1. Terms Related to Web Services
      2. Web Service Construction
      3. Consuming Web Services
      4. Securing Web Services
    5. .NET Remoting and Delphi
      1. Remoting Technologies Available Today
      2. Distributed Architectures
      3. Benefits of Multitier Application Development
      4. .NET Remoting Basics
      5. Your First .NET Remoting Application
    6. .NET Remoting in Action
      1. Template Project
      2. Tracing Messages
      3. Analyzing the SOAP Packets
      4. Client Activation
      5. Lifetime Management
      6. Failing to Renew the Lease
      7. Configuration Files
      8. Switching from HTTP to TCP Communication
      9. Switching from SOAP to Binary Remoting
      10. Differences Between SOAP and Binary Encoding
    7. Securing ASP.NET Applications
      1. ASP.NET Security Methods
      2. Authentication
      3. Authorization
      4. Signing Off
    8. ASP.NET Deployment and Configuration
      1. Deploying ASP.NET Applications
      2. Configuration Settings
      3. Configuration Tips
      4. Adding/Retrieving Custom Configuration Settings
    9. Caching and Managing State in ASP.NET Applications
      1. Caching ASP.NET Applications
      2. State Management in ASP.NET Applications
    10. Developing Custom ASP.NET Server Controls
      1. User Controls
      2. Web Controls