Académique Documents
Professionnel Documents
Culture Documents
2003
Volume 9 Number 6
INSIDE
ON THE COVER
Greater Delphi
Safety .NET
Delphi Informant
www.DelphiZine.com
Safety .NET
An Introduction to .NET Security
IntraWeb Fundamentals:
3 Basic Objects
Page 18
E treme Testing -
FEATURES
Delphi Style
Page 24
On the Net
12
The Myth of
the Upgrade
IntraWeb Fundamentals
Noel Rice continues his exploration of Delphi
7s RAD Internet app creation tool, IntraWeb, by
focusing on three key objects that work together to
create complete Web solutions: ServerController,
WebApplication, and UserSession.
Page 30
Page 48
$5.99 US
$8.99 CAN
In Development
18
Extreme Testing
.NET Tech
23
REVIEWS
30 VssConneXion
32
36
Easy MAPI 2
D E PA R T M E N T S
2 Toolbox
39 File | New by Alan C. Moore, Ph.D.
T O O L B O X
ModelMaker Tools Releases ModelMaker 7.05
ModelMaker Tools
announced ModelMaker 7.05, the
latest upgrade to
their visual modeling
and refactoring tool
based on UML technology.
New features
include: customizable views (create
and save the layouts
you want); IntelliReplace (automatic
renaming of certain
identifiers in code);
new built-in refactorings, which take advantage of IntelliReplace; auto display of unit procedures
in diagrams and custom compartments
in all relevant symbols; MMToolsAPI
extensions and modifications that
enable improved Bold integration in
combination with Datators new Bold
integration suite (www.datator.com);
records can now be modeled just like
Atozed Software
Price: Visit the Web site for complete details.
Contact: info@atozedsoftware.com
Web Site: www.atozedsoftware.com
T O O L B O X
/n software Announces
Public Beta of IP*Works!
EDI for Microsoft .NET
/n software announced the first
public beta of IP*Works! EDI for
Microsoft .NET. IP*Works! EDI is
new to /n softwares IP*Works!
product family of components for
Internet development. IP*Works!
EDI includes software components
that facilitate the transmission of
secure EDI transactions over the
Internet. The AS2Sender component can be used from any Web
or desktop application to connect
and securely deliver EDI data. The
AS2Receiver component allows
ASP.NET applications to securely
and reliably receive and respond to
EDI transaction requests. A digital
certificate management component
completes the package with certificate verification, creation, encoding, and signing capabilities.
The IP*Works! EDI components
are based on Applicability Standards (AS2), the leading Internet
standard for EDI transmissions,
enabling new levels of security and
reliability, and at the same time
providing significant cost savings
by leveraging the Internet as a
ubiquitous network.
Applicability Standards (AS2) is a
protocol that defines how to send,
receive, and validate data using
the S/MIME standard for message
security and the HTTP/S protocols
for communications.
Electronic Data Interchange (EDI) is
a set of protocols designed to streamline the exchange of highly structured
data between organizations, such as
purchase orders, medical records,
invoices, etc. EDI-INT refers to a set
of protocols related to the secure
transfer of EDI over the Internet.
The IP*Works! EDI Public Beta
for Microsoft .NET is available for
download from /n softwares Web
site. IP*Works! Subscription customers will receive free development licenses for IP*Works! EDI
when the final release is available.
/n software inc.
Contact: info@nsoftware.com
Web Site: www.nsoftware.com
T O O L B O X
AcctSync Technologies Launches AcctSync SDK
AcctSync Technologies, a provider
Books through the QBXML SDK,
of components for the integration of
Intuits development kit that enables
financial management software with
data integration between third-party
other software packages, released
applications and QuickBooks. AcctSync
AcctSync SDK Delphi Edition, a toolSDK has no external dependencies,
kit for QuickBooks developers and
other than QuickBooks; end users need
integrators. AcctSync SDK will enable
not download the QuickBooks SDK, an
QuickBooks developers to build inteXML parser, or any other utilities to run
grated solutions in a fraction of the
applications built with AcctSync SDK.
time without any prior knowledge of
Most of the components included
qbXML, XML, or COM APIs.
in the AcctSync SDK correspond
AcctSync SDK connects to Quickdirectly to the most commonly used
Mastering Delphi 7
Essential XML
Quick Reference
Successful IT
Project Delivery
Marco Cant
SYBEX
ISBN: 0-7821-4201-X
Cover Price: US$59.99
(1,011 pages)
www.sybex.com
David Yardley
Addison-Wesley
ISBN: 0-201-75606-4
Cover Price: US$29.99
(346 pages)
www.it-minds.com
G R E A T E R
D E L P H I
MICROSOFT .NET
SECURITY
STRONG NAMES
.NET FRAMEWORK CONFIGURATION
CODE SIGNING
By Bill Todd
Safety .NET
Part I: An Introduction to .NET Security
Greater
Delphi
Safety .NET
The .NET SDK includes all the tools you need to work
with code signing, including a Certificate Creation Tool
that lets you create test certificates. This lets you try the
entire code signing process before purchasing a certificate.
You can create a test certificate and sign an assembly
using the following steps.
sn -k mykey.snk
You can give the file any name, and the .snk extension is
optional. You can use any file extension you choose, or no
extension at all. The Strong Name utility creates the key file in
the current directory. Next, add the key file to your assembly
by adding the AssemblyKeyFile attribute to your source code:
[assembly: AssemblyKeyFile('c:\keyfiles\mykey.snk')]
Greater
Delphi
Safety .NET
Permission Class
Grants Access To
DirectoryServicesPermission
Active Directory
DnsPermission
EnvironmentPermission
Environment variables
EventLogPermission
FileDialogPermission
FileIoPermission
IsolatedStorageFilePermission
IsolatedStoragePermission
Isolated storage
MessageQueuePermission
OleDbPermission
PerformanceCounterPermission
Performance counters
PrintingPermission
Printers
ReflectionPermission
.NET reflection
RegistryPermission
SecurityPermission
Unmanaged code
ServiceControllerPermisssion
SocketPermission
SqlClientPermission
UiPermission
WebPermission
Web connections
When you run this command, cert2spc will display Succeeded and create a file named test.spc in the current directory.
Use this file and the File Signing Tool, signcode.exe, to sign
an assembly. Type in signcode.exe at the command prompt
to start the Digital Signature Wizard. Click Next to move to
the second page of the wizard, shown in Figure 3, and enter
the path to the assembly you want to sign. Move to the next
page, shown in Figure 4, and select the Custom radio button.
You can only specify a certificate file if you select Custom.
On the next page, click the Select from File button, and choose
your certificate file in this case, test.spc, as shown in
Figure 5. Click Next, then enter the path to your private key
file as shown in Figure 6. Click Next, enter the private key
password, then click OK. Click Next, select a hash algorithm
and click Next again. Click Next to move through the remaining pages of the wizard without changing any of the default
options. When you get to the last page, click Finish and enter
the private key password when prompted.
Now that your assembly has been digitally signed, you can
check the signature using the Certificate Verification Tool,
chktrust.exe. When you type the command:
chktrust.exe assemblyfilename.exe
Greater
Delphi
Safety .NET
mine to which code groups it belongs.
Evidence includes such things as the
publisher, strong name, hash, and
location from which the code was
loaded. Using the evidence, the CLR
examines all the code groups at the
enterprise level, and determines to
which groups the code belongs.
Code groups are organized hierarchically, starting from a root node named
All_Code. Any code group can have
one or more child code groups and
code groups can be nested to any
level. If an assembly is not a member
of a code group, it cannot be a member of any child of that code group.
Greater
Delphi
Safety .NET
application belongs to a code group
that doesnt grant ServiceControllerPermission. When you try to run
your new application youll get
a security exception when your
application tries to use any of the
methods of the IBManager class,
because IBManager cannot have
ServiceControllerPermission if the
application that calls it doesnt have
that permission.
If you return to the .NET Framework
Configuration tool and expand the
Enterprise and Machine nodes in the
tree, you should see something like
the screen shot shown in Figure 10.
The enterprise level has a single code
group named All_Code, and all code
is a member of this group. The permission set for All_Code is FullTrust,
which grants all permissions, so, by
default, all code has all permissions at
the enterprise level.
Greater
Delphi
Safety .NET
Condition
Description
All Code
Application Directory
Hash
Publisher
Site
Strong Name
URL
Zone
Fixing MSCORCFG.MSC
Follow these simple steps to open the .NET Framework Configuration snap-in from Administrative Tools:
Open a command prompt window.
Type mmc.exe and press R.
Select Console | Add/Remove Snap-in from the menu to open
the Add/Remove Snap-in dialog box.
Click the Add button to open the Add Standalone Snap-in
dialog box.
Select .NET Framework Configuration from the list and click the
Add button.
Click OK to close the Add/Remove Snap-in dialog box.
Choose Console | Save As from the menu. Navigate to the
C:\WINNT\Microsoft.NET\Framework\v1.0.3705 directory and save the file as mscorcfg.msc.
You should now be able to open the .NET Framework Configuration snap-in from Administrative Tools.
list to assign the new permission set to this code group. Click
Next then Finish to create the code group.
To change the properties of a code group, select the group
in the tree and click the Edit Code Group Properties link in the
right-hand pane. Figure 14 shows the property dialog box.
Note the two check boxes at the bottom of the General tab.
The top check box sets the code groups Exclusive attribute
and the second check box sets the LevelFinal attribute.
These attributes were described earlier and cannot be set
from the Create Code Group wizard. Use the Membership Condition and Permission Set tabs to change the code
groups membership condition and permission set.
Figure 13: Using the Strong Name condition for a code group.
Greater
Delphi
Safety .NET
11
O N
INTRAWEB
T H E
N E T
DELPHI 7
By Noel Rice
IntraWeb Fundamentals
The ServerController, WebApplication, and UserSession Objects
Figure 1: The IntraWeb Application Wizard produces all of the shell code for you.
12
On
the
N e t
IntraWeb Fundamentals
TUserSession = class(TComponent)
private
FEmpNo: Integer;
FFirstName: string;
FHireDate: TDateTime;
FLastName: string;
FPhoneExt: string;
FSalary: Double;
public
DataModule1: TDataModule1;
property EmpNo: Integer read FEmpNo;
property FirstName: string read FFirstName;
property HireDate: TDateTime read FHireDate;
property LastName: string read FLastName;
property PhoneExt: string read FPhoneExt;
property Salary: Double read FSalary;
constructor Create(AOwner: TComponent); override;
end;
Figure 3: Adding properties that match the columns in the Employee table.
One route to
incorporating
authentication is
to hard-code the
ServerController
AuthList property
with user names
and passwords. You
can experiment by
editing AuthList
where user names
and passwords are
listed as name/value
pairs (see Figure 4).
13
On
the
N e t
IntraWeb Fundamentals
procedure TIWServerController.
IWServerControllerBaseAuthRequest(const AUserName,
APassword: String; var AValid: Boolean);
begin
AValid := False;
with DataModule1.tblEmployee do begin
Open;
if Locate('LastName', AUserName, []) then begin
AValid := FieldByName('EmpNo').AsString = APassword;
UserSession.FEmpNo := FieldByName('EmpNo').AsInteger;
if AValid then begin
UserSession.FFirstName :=
FieldByName('FirstName').AsString;
UserSession.FLastName :=
FieldByName('LastName').AsString;
UserSession.FSalary :=
FieldByName('Salary').AsFloat;
UserSession.FHireDate :=
FieldByName('HireDate').AsDateTime;
UserSession.FPhoneExt :=
FieldByName('PhoneExt').AsString;
end;
end;
end;
end;
tmHidden. This option stores the session ID in HTML hidden fields. Heres a sample browser address:
http://127.0.0.1:8888/
Figure 7: If the login succeeds, UserSession properties are populated from the
Employee table.
The generated HTML also causes a post back, but the session ID is in a hidden field, not in the URL:
<form onsubmit="return FormDefaultSubmit();"
name="SubmitForm" method="POST">
...
<input type="HIDDEN" name="IW_SessionID_"
value="7C5E98005C3347CB7267E24020030311140543949">
...
</form>
How do you respond to an exception in an IntraWeb application? That depends on the amount of intervention you want.
In a Delphi application you can leave the exception unhandled,
On
the
N e t
IntraWeb Fundamentals
OutputDebugString Windows API from inside the
browser.
A quick demo of OnException shows how to
vary the exception message output on-the-fly,
based on a TUserSession property:
TUserSession = class(TComponent)
private
FShowMessageType: TIWShowMessageType;
public
property ShowMessageType: TIWShowMessageType
read FShowMessageType write FShowMessageType;
end;
procedure TIWServerController.
IWServerControllerBaseException(AApplication:
TIWApplication; AException: Exception);
begin
AApplication.ShowMessage(AException.Message,
UserSession.FShowMessageType);
end;
On
the
N e t
IntraWeb Fundamentals
Figure 13: Determining if the tree view node represents a form or a component.
On
the
N e t
IntraWeb Fundamentals
17
I N
D E V E L O P M E N T
EXTREME PROGRAMMING
DUNIT
DELPHI
KYLIX
By Ralph Krause
Extreme Testing
Introducing DUnit
public
constructor Create; overload;
constructor Create(LoanAmount: Currency;
InterestRate: Real; Months: Integer); overload;
property InterestRate: Real
read FInterestRate write SetInterestRate;
property LoanAmount: Currency
read FLoanAmount write FLoanAmount;
property MonthlyPayment: Currency read GetMonthlyPayment;
property Months: Integer read FMonths write FMonths;
procedure Reset;
property TotalInterestPaid: Currency
read GetTotalInterestPaid;
property TotalLoanAmount: Currency
read GetTotalLoanAmount;
18
In
Development
Extreme Testing
program LoanCalculator;
uses
Forms, TestFrameWork, GUITestRunner,
MonthlyLoan in 'MonthlyLoan.pas';
{$R *.res}
begin
Application.Initialize;
// Application.Run;
GUITestRunner.RunRegisteredTests;
end.
In
Development
Extreme Testing
procedure TMonthlyLoanTests.SetMonthsTest;
begin
FTestLoan.Months := 36;
Check(FTestLoan.Months = 36, 'Setting Months failed.');
end;
procedure TMonthlyLoanTests.SetUp;
begin
FTestLoan := TMonthlyLoan.Create;
end;
procedure TMonthlyLoanTests.TearDown;
begin
FTestLoan.Free;
end;
In
Development
Extreme Testing
procedure TMonthlyLoanTests.CauseInterestRateError;
begin
FTestLoan.InterestRate := -2;
end;
procedure TMonthlyLoanTests.SetNegativeRateTest1;
begin
try
CauseInterestRateError;
Check(False, 'We should never reach this.');
except
on EInvalidInterestRate do
Check(True, 'Test Passed - Correct error raised.');
else
Check(False,
'Test failed - EInvalidInterestRate not raised.');
end;
end;
procedure TMonthlyLoanTests.SetNegativeRateTest2;
begin
CheckException(CauseInterestRateError,
EInvalidInterestRate,
'EInvalidInterestRate not raised.');
end;
unit SingleSetUpMonthlyLoan;
interface
uses
SysUtils, TestFrameWork, TestExtensions;
type TMonthlyLoanTests = class(TTestCase)
private
procedure CauseInterestRateError;
published
procedure CreationTest;
procedure SetLoanAmountTest;
procedure SetInterestRateTest;
procedure SetMonthsTest;
procedure SetNegativeRateTest1;
procedure SetNegativeRateTest2;
end;
type TSingleSetUpTests = class(TTestSetup)
protected
procedure SetUp; override;
procedure TearDown; override;
end;
implementation
uses Math;
procedure TMonthlyLoanTests.ZeroInterestRateTest;
var
ExpectedResult: Currency;
begin
ExpectedResult :=
FTestLoan.LoanAmount / FTestLoan.Months;
ExpectedResult := SimpleRoundTo(ExpectedResult, -2);
FTestLoan.InterestRate := 0;
Check(FTestLoan.MonthlyPayment =
ExpectedResult, 'Zero percent interest rate failed.');
end;
var
MonthlyLoanTests: TTestSuite;
SingleSetUpTests: TTestSetup;
FTestLoan: TMonthlyLoan;
initialization
MonthlyLoanTests :=
TTestSuite.Create('Monthly Loan Tests');
MonthlyLoanTests.AddTests(TMonthlyLoanTests);
SingleSetUpTests := TSingleSetUpTests.Create(
MonthlyLoanTests, 'Single Set Up Tests');
TestFramework.RegisterTest(SingleSetUpTests);
end.
In
Development
Extreme Testing
Ralph Krause has been programming professionally since 1995 and has been
using Delphi exclusively for the past three years. He lives in Michigan and
works for Genesys Systems, Inc. writing software for automobile dealerships.
22
. N E T
XML
T E C H
System.Xml
System.Xml.XPath
System.Xml.Xsl
System.Xml.Schema
System.Xml.Serialization
The System.Xml namespace contains all classes for parsing XML documents, including the Document Object
Model (DOM) parser, and the XmlReader and XmlWriter
classes. The System.Xml.XPath namespace provides
classes that are used to navigate a document with XPath.
The System.Xml.Xsl namespace contains classes for
applying XSL transformations. In the System.Xml.Schema
namespace, well find classes that can be used to programmatically create or edit XSD schemas. Finally, the
System.Xml.Serialization namespace contains classes that
are used to serialize objects into XML format documents
or streams. All of these namespaces are packaged in the
System.Xml.dll assembly.
Reading XML Documents
The System.Xml namespace contains an abstract class
named XmlReader. This class provides a fast, forward-only,
read-only cursor for processing an XML document stream.
The streaming model this class implies requires no inmemory cache and works in a fashion similar to SAX, i.e.
During the last several years, XML has become a universal data exchange format. There are many possible
sources of XML data: XML documents themselves, XML
data generated by XML Web Services, XML data extracted
from Microsoft SQL Server databases (for more information on this see Alexei Fedorovs five-part series on Delphi
and SQL Server XML starting in the August, 2001 issue
of Delphi Informant), data from some other DBMS, ADO,
and ADO.NET datasets, and many others.
.NET XML Namespaces
The .NET Framework class library contains an integrated set
of classes for working with XML documents and data. XML
support in .NET is partitioned over several namespaces:
23
.NET
Te c h
24
Then, use the Read method to pull the data from the document, and create a string that contains the type of the element and its value:
while Reader.Read do begin
FormatOneLine(Reader.Name + ' ' +
Reader.NodeType.ToString + ' ' +
Reader.Value, Reader.Depth);
end;
.NET
Te c h
Writer.WriteEndDocument();
Writer.Flush();
Writer.Close();
25
Writer.WriteElementString('FirstName',
Writer.WriteElementString('LastName' ,
Writer.WriteElementString('Title'
,
Writer.WriteElementString('HireDate' ,
'Alexei');
'Fedorov');
'CTO');
'15-01-2002');
To clean up, close the document, flush the stream buffer, and
close XmlTextWriter:
.NET
Te c h
XmlDocument;
XmlNode;
XmlNodeList;
Root.SelectNodes('customers[@Country=''USA'']');
.NET
Te c h
.NET
Te c h
28
string;
var
I : Byte;
begin
for I := 0 to Depth do
Console.Write(' ');
Console.WriteLine(Line);
end;
begin
// Open an XML document.
Reader := XmlTextReader.Create(
'CustomersAttributes.xml');
// Pull data from it.
while Reader.Read do begin
FormatOneLine(Reader.Name + ' ' +
Reader.NodeType.ToString + ' ' +
Reader.Value, Reader.Depth);
if Reader.HasAttributes then
begin
Reader.MoveToFirstAttribute;
FormatOneLine(Reader.Name + ' ' +
Reader.NodeType.ToString + ' ' +
Reader.Value, Reader.Depth);
while Reader.MoveToNextAttribute do
FormatOneLine(Reader.Name + ' ' +
Reader.NodeType.ToString + ' ' +
Reader.Value, Reader.Depth);
end;
end;
end.
.NET
Te c h
{$APPTYPE CONSOLE}
{$APPTYPE CONSOLE}
uses System.XML;
uses System.XML;
var
XmlDoc : XmlDocument;
RootNode : XmlNode;
NodeList : XmlNodeList;
I : Integer;
begin
XmlDoc := XmlDocument.Create;
XmlDoc.Load('CustomersElements.xml');
RootNode := XmlDoc.DocumentElement;
NodeList := RootNode.ChildNodes;
for I:= 0 to NodeList.Count-1 do
Console.WriteLine(NodeList.Item(I).InnerText);
end.
var
XmlDoc : XmlDocument;
Root : XmlNode;
Nodes : XmlNodeList;
I : Integer;
{$APPTYPE CONSOLE}
uses System.XML;
{$APPTYPE CONSOLE}
var
XmlDoc : XmlDocument;
Root : XmlNode;
Node : XmlNode;
I : Integer;
uses
System.XML, System.XML.XSL;
begin
XmlDoc := XmlDocument.Create;
XmlDoc.Load('CustomersAttributes.xml');
Root := XmlDoc.DocumentElement;
Node := Root.SelectSingleNode(
'customers[@CustomerID=''HUNGC'']');
for I := 0 to Node.Attributes.Count-1 do
Console.WriteLine(Node.Attributes.Item(I).Name +
'=' + Node.Attributes.Item(I).Value);
end.
29
begin
XmlDoc := XmlDocument.Create;
XmlDoc.Load('CustomersAttributes.xml');
Root := XmlDoc.DocumentElement;
Nodes := Root.SelectNodes('customers[@Country=''USA'']');
Console.WriteLine(
'Found ' + Nodes.Count.ToString + ' items:');
for I := 0 to Nodes.Count-1 do
Console.WriteLine(
Nodes.Item(I).Attributes.Item(0).Value);
end.
var
XmlDoc : XmlDocument;
XslDoc : XslTransform;
Writer : XmlTextWriter;
begin
XmlDoc := XmlDocument.Create;
XmlDoc.Load('CustomersAttributes.xml');
XslDoc := XslTransform.Create;
XslDoc.Load('Contacts.xsl');
Writer := XmlTextWriter.Create(Console.Out);
XslDoc.Transform(XmlDoc, nil, Writer);
end.
N E W
&
U S E D
By Andrew Ghinaudo
VssConneXion
Visual SourceSafe Access Made Simple
Figure 2: VssConneXion provides an integrated menu for the Delphi IDE with the most-used VSS tasks.
30
New
&
Used
VssConneXion
Figure 3: The Compare To option makes looking at changes easy and quick.
Contact: info@epocalipse.com
Web Site: www.epocalipse.com
Price: Delphi or C++Builder versions available: 1-5 users,
US$59.95; 6-10 users, US$49.95; 11+ users, US$39.95;
site license, US$800.
and
and more (see Figure 2).
Refresh),
31
N E W
&
U S E D
By Clay Shannon
cohesively. Team Coherence supports collaboration, not only of teams working in the same geographical area connected by a LAN or an intranet,
New
&
Used
Installation
Installing Team Coherence is similar to installing most
commercial software. If youre going to use one of the multiuser editions, install the server on the machine to which all
users will have access, and the client on the machines that
you want to access the server.
You can use Team Coherence as a completely separate
environment, or you can integrate Team Coherence into
Delphis IDE. In fact, the documentation states that Team
Coherence, although useful for a variety of other tools such
as Visual Studio and ModelMaker, was created primarily
for Delphi and C++Builder. This isnt surprising, because
Team Coherence itself was developed with Delphi 5.
To integrate Team Coherence into the Delphi IDE, select Start |
Programs | qsc | Client | IDE Integration on the client machines. Team
Coherence will determine which compilers that it supports are
installed on your system, and allow you to select the one(s)
into which you want it to integrate (see Figure 1).
If you integrate Team Coherence into the Delphi IDE, you
can then access it by selecting Workgroups | Connect to TC (or
via the Connect to Team Coherence speedbutton thats added
above the Component palette). The Workgroups menu will
then be populated with several of the more common actions
you will normally perform, such as getting files, checking
out (locking), and checking in files. Or you can select
Workgroups | Run Team Coherence to access the full TC GUI.
Whether or not you decide to integrate Team Coherence into
the Delphi IDE, you can always access the Team Coherence
Repository on the server via the Windows Start menu (Start |
Programs | qsc | Client | Team Coherence).
Configuration
Team Coherence is highly configurable, especially (as
is to be expected) on the server side. The administrator
adds users and passwords, sets users properties (such as
their e-mail address, so e-mail can be sent to them from
33
New
&
Used
Nevertheless, the ability to use the Parallel Model is there, if you want it. Of
course, Team Coherence doesnt force
you to work that way.
Some Server Specifics
The connection to the repository on
the server is made via TCP/IP. The
server could, if necessary, reside on
the other side of the planet and be
accessed using a standard Internet
connection. Indeed, that was the case
with the project I worked on. I was in
the United States and the server was
in Germany. Even so, and with a dialup connection, transferring an entire
large projects worth of source files
took only a few seconds.
Team Coherence can be configured to automatically add comments to your files so you can ascertain the history of a file
at a glance. Things like when it was last checked in, what
changes were made at the time, and who made changes can
be very helpful. And setting up Team Coherence to automatically add these types of comments can be very useful.
Parallel Model vs. Serial Model
Another area where Team Coherence differs from some VCS
tools is that it supports the Parallel Development Model (in
addition to the more common Serial Development Model).
In the Serial Model, only one user can work on a specific
file at any given time, locking all others out from changing
that file until the user is through with it and checks it back
in (and unlocks it).
The problem with the Serial Model is that it can create serious bottlenecks in the development process while other
members of the team wait to modify a locked file. The Parallel Model eliminates this problem by allowing multiple
users to work on the same file simultaneously. When all the
developers working on the one file are finished, they merge
their changes (which Team Coherence obviously supports).
Although this can be beneficial in certain circumstances
when there is good communication between developers
about who is working on what (you certainly wouldnt want
multiple developers working on the same method at the same
time) it also presents a potential problem: one developers
changes may not work when combined with those of another.
Im not a fan of the Parallel Model it seems too fraught with
peril for my taste. The preferred way of working would be to
either limit the scope of the files so that rarely would more
than one developer want to work on the same file at the same
time, or use the Extreme Programming practice at least
in an instance like this of both coders working on the same
instance of the file together (at the same computer).
34
New
&
Used
35
The documentation includes help files for each module (Version Control, TC Tracker, and TC Builder), as well as separate
help files dedicated to the APIs, which you can call if you
want to create an add-in of your own. There is also a help file
for TC.exe, the command-line utility. The documentation is so
comprehensive that it even includes a list of the constants that
Team Coherence defines, including a list of error codes.
If you want to learn exactly what Team Coherence can do
before you order it, the documentation is available as a separate download from www.qsc.co.uk/doc_tc.htm.
Et Cetera
Youll need a license for each person using Team Coherence.
There are numerous editions of Team Coherence, and there
are multi-license discounts available, as well as discounts for
upgrading; for details visit www.qsc.co.uk/prices.htm.
By the time you read this, QSC should have released a Linux
version of the command-line tool and the API (scheduled for
release in April 2003). Kylix 3 is being used to develop this
tool. Check their Web site for the latest details.
The Bottom Line
Team Coherence is exceptionally easy to use. The impressive
part is that QSC has achieved this ease of use without skimping on features. On the contrary, Team Coherence has everything you could want in an SCM tool: its extensible, integrates
well into Delphi, and is highly configurable. For the complete
rundown of which features are available in which editions,
see the feature matrix at www.qsc.co.uk/features_tc.htm.
To try before you buy, download an evaluation copy from
www.qsc.co.uk/download_tc.htm.
N E W
&
U S E D
By Mathew Hess
Easy MAPI 2
MAPI Power without the Complexity
36
New
&
Used
Easy MAPI 2
Figure 2: One of the Easy MAPI 2.0.1 sample projects; this one shows how to
create and send e-mail using text, HTML, and RTF message bodies.
New
&
Used
Easy MAPI 2
38
Conclusion
RAPWares Easy MAPI is easy to install and easy to use.
Developers wishing to get up and running quickly with
MAPI support wont go wrong. Others wanting to do more
sophisticated things will also not be disappointed. To quote
from the RAPWare Web page, Easy MAPI lets you do MAPI
the Delphi way. For example, instead of calling:
function MAPILogonEx(ulUIParam: ULONG;
lpszProfileName: PChar; lpszPassword: PChar;
ulFlags: ULONG; out lppSession: IMAPISession):
HResult; stdcall;
Spend a little time delving into Easy MAPI and you too will
discover many interesting and powerful possibilities.
F I L E
N E W
Again, I gave it my best effort, freeing up space on the small hard drive,
removing resident programs I didnt
need, and re-installing the new client multiple times all to no avail.
Several weeks ago the hard drive on
the computer crashed with multiple
bad sectors rendering Windows inoperable. Much to my surprise, I found
myself celebrating this occurrence!
Rest in peace, old Win95 dinosaur.
The world of Delphi. As Delphi
developers, we must be concerned
with upgrading issues that include
helping our users avoid the scenarios Ive chronicled here. We must
also consider questions of how to
handle bug fixes, how to schedule
new feature additions, how often to
issue major upgrades, and a host of
related business decisions. Should
we provide free upgrades, including
both bug fixes and new or enhanced
features? As we discuss these issues,
well consider how some Delphi
developers feel about issues related
to upgrades.
A while back there was a very interesting thread in the Delphi Talk list
titled The Need to Bitch. The originator of the thread posed this question: Is anyone else getting tired of
this particular side of the industrys
seemingly unconscionable attitude
regarding their responsibility to us
when it comes to bug fixing? He
went on to point out that vendors
dont always live up to their responsibility to ensure ... that their products
work as advertised, include all the
features, abilities, etc., advertised,
and will be fixed in a timely and free
File
New
40
Alan Moore is a professor at Kentucky State University, where he teaches music theory and
humanities. He was named Distinguished Professor for 2001-2002. He has been named the Project
JEDI Director for 2002-2003. He has developed education-related applications with the Borland
languages for more than 15 years. Hes the author of The Tomes of Delphi: Win32 Multimedia API
(Wordware Publishing, 2000) and co-author (with John C. Penman) of The Tomes of Delphi: Basic
32-Bit Communications Programming (Wordware Publishing, 2003). He also has published a number
of articles in various technical journals. Using Delphi, he specializes in writing custom components
and implementing multimedia capabilities in applications, particularly sound and music. You can
reach Alan on the Internet at acmdoc@aol.com.