By: John Kaster
Abstract: What I Learned from Customer Reactions to Delphi 4 at PC Expo
Delphi 4 contains components that support developing MIDAS 2 application servers. MIDAS 2 has many new features and improvements over MIDAS 1. (Development support for MIDAS 1 originally shipped with Delphi 3 Client/Server.) New MIDAS 2 features include:
Building a MIDAS Application Server supporting both DCOM and CORBA
Because many Delphi developers are still unfamiliar with MIDAS, I'll show you two demonstrations of it. The first is a simple one that just connects to a single table. Let's begin.
First, we'll create a new application. Since a server is usually a non-visual application, we'll put a label on this form with a caption of "DCOM & CORBA " so we can keep track of when the server is running, and shrink and move the form down to the bottom right of the screen.
Next, using the File|New brings up the Object Repository, where I select the Multitier tab, and double-click on "Remote Data Module."
The Remote Data Module wizard is displayed, asking me for the Class Name, Instancing options for how the RDM should be launched, and the Threading Model. The following explanations for these options are lightly paraphrased from the Delphi 4 help for this wizard.
For the Class Name, enter the base name for the Automation interface of your remote data module. The class name for your remote data module (a descendant of TremoteDataModule) will be this name with a T prepended. It will implement an interface named using this name with an I prepended. To enable a client application to access this remote data module, set the ServerName property of the client application's connection component to the base name you specify here.
You can use the instancing combo box to indicate how your remote data module application is launched. The following table lists the possible values:
If you are creating the remote data module in an active library (DLL), use the threading combo box to indicate how client calls are passed to your remote data module's interface. The following table lists the possible values:
Here are the options I chose.
After pressing okay, a blank Remote Data Module named "Simple" is created. I drop a TTable component on it from the Data Access tab of the component palette, and set the following properties:
I want to provide the data in this table to thin-client applications, so the last step before running the Application Server is indicating that this table should be exported from this module. That can be accomplished by clicking the right mouse button and selecting Export Customer from Data Module:
If you want to verify that the table has become part of the interface for the application server, bring up the type library editor using the View|Type Library menu option. You can see in this screenshot that Customer is part of the external interface to this application server.
It's about time to run our Application Server, which will automatically compile it. It ran successfully -- I guess you'll just have to take my word for it.
Download Delphi XE4!
Free Trial License
Webinars on demand!
More social media choices:
Delphi on Google+
@RADTools on Twitter
Server Response from: ETNASC03