.NET
  Home arrow .NET arrow Page 7 - .NET Remoting and Delphi
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

.NET Remoting and Delphi
By: Xavier Pacheco
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 14
    2004-08-09

    Table of Contents:
  • .NET Remoting and Delphi
  • Distributed Architectures
  • Benefits of Multitier Application Development
  • .NET Remoting Basics
  • The ChannelServices Class
  • Object Activation
  • Your First .NET Remoting Application
  • Adding References
  • BankPackage.dll: Contract Between Clients and Servers
  • Implementing the Server
  • Implementing the Client

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    .NET Remoting and Delphi - Your First .NET Remoting Application


    (Page 7 of 11 )

    Developing Delphi applications that make use of .NET remoting is a relatively easy process, and, if you used COM, you will find that it's conceptually very similar to developing OLE automation servers. Luckily, registration of remotable objects is much simpler. It can be done programmatically (RemotingConfiguration method calls) or declaratively (using an XML configuration file). You no longer have to deal with type libraries.

    The following example, although simple, shows how to best structure .NET Remoting projects and contains a certain amount of real-world business logic.

    The server of this example represents a bank service. It contains a list of bank accounts (two to be precise) and allows to query for the details of these (account number, name of the person associated with it, and its balance) and to do a money transfer.

    Setting Up the Project

    We'll start the development of our bank system by creating a project group and three empty projects (a Package, a Console Application, and a Windows Forms Application) that we will complete in the following sections.

    Select File, New, Other. Click Other Files and select Project Group, as shown in Figure 29.7.

    delphi

    Figure 29.7
    Setting up a project group.

    Save the project group as BankExample.

    It's very convenient to use project groups when developing distributed applications, especially at early stages. Project groups provide you with an immediate look at all the elements of your systems and allow you to switch between them more efficiently than with individual projects.

    Add the Package to the group by clicking the New button inside the Project Manager panel and then selecting Package, as shown in Figure 29.8.

    delphi

    Figure 29.8
    Selecting a Package.

    Repeat the operation and add a Console Application and a Windows Forms Application to your project group.

    Once done, save and name the projects as shown in Table 29.1.

    Table 29.1 Project Names in the Project Group

    Project Type

    Project Name

    Package

    BankPackage.dll

    Console Application

    BankServer.exe

    WinForms Client

    BankClient.exe


    This chapter is from Delphi for .NET Developer's Guide, by Xavier Pacheco (Sams, 2004, ISBN: 0-672-32443-1). Check it out at your favorite bookstore today.

    Buy this book now.

    More .NET Articles
    More By Xavier Pacheco


       · in time compiling is message:Incompatible types 'IBankManager' and 'Object'where...
       · is in WinformfBankManager := Activator.GetObject( typeof(IBankManager), ...
     

    .NET ARTICLES

    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT