Tuesday, August 31, 2004

Dr.Bob's Programming Clinic:

Delphi 8 for .NET Assemblies; Packages and Libraries.

kbmMW HOT news!!!

August 29. 2004 - Native Java access to kbmMW

The last few codelines are being put into the new Java simple client
library, which allow for a Java application to access a kbmMW based
application server, regardless of the application server running on Linux,
Windows or .Net.

Some code:


public TkbmMWSimpleClient SimpleClient = new


void btnConnect_actionPerformed(ActionEvent e) {
try {
catch (Exception ex) {

void btnDisconnect_actionPerformed(ActionEvent e) {
try {
catch (Exception ex) {

void btnInventoryList_actionPerformed(ActionEvent e) {
try {
Object o =
catch (Exception ex) {

void btnGetAbstract_actionPerformed(ActionEvent e) {
try {
String[] sa=new String[1];
Object o = SimpleClient.SendRequest("KBMMW_INVENTORY","KBMMW_1.0","GET SYNTAX
catch (Exception ex) {

void btn100List_actionPerformed(ActionEvent e) {
try {
for (int i=0; i<100; i++) {
Object o =
catch (Exception ex) {

August 28. 2004 - kbmMW application server and clients on .Net

kbmMW application servers and clients are now running as fully managed
and safe code on .Net. In addition to a .Net kbmMW client to talk with a
.Net kbmMW app. server, .Net clients can also talk directly with Win32 and
Linux kbmMW app. servers and visa versa.

What has now been ported is about 95% of the functionality of the Win32
kbmMW setup.

That means that you have direct access to remote procedure calls,
remote datasets, objects, loadbalancing, failover, transactions etc. as
you already know from the current kbmMW setup.

May we also use the occation to celebrate that its the first
3rdparty true enterprise level application server framework for the .Net

Sample diagram of a cluster with native Win32, native
Linux and .Net kbmMW application servers all participating in a
distributed loadbalancing setup.
The cluster is
accessed by Java enterprise servers, .Net handhelds and native
Win32/Linux desktops.

Mantis 0.19.0rc1 Released

Mantis is a php/MySQL/web based bugtracking system. Learn more.

MyGeneration, a free .NET schema and code generation tool

New beta release this morning of MyGeneration, a free .NET schema and code generation tool by Mike Griffin and Justin Greenwood, now generates correct Firebird stored procedures for Dialect 1 and 3. Its free .NET architecture, called dOOdads, supports both dialects in C# and VB.NET. Of course, it's using the Firebird.NET driver for data access. This release is considered to be fully functional for Firebird.

Let's use FastReport 3. Now.

FastReport 3 – new generation of the reporting tools.FastReport™ 3 is an add-in component for giving your application the ability to generate reports quickly and efficiently. FastReport™ provides all the tools you need to develop reports.All variants of FastReport 3 contains:Visual report designer with rulers, guides and zooming, wizard for base type reports, export filters to html, tiff, bmp, jpg, xls, pdf, Dot matrix reports support, support most popular DB-engines. Full WYSIWYG, text rotation 0..360 degrees, memo object supports simple html-tags (font color, b, i, u, sub, sup), improved stretching (StretchMode, ShiftMode properties), Access to DB fields, styles, text flow, URLs, Anchors.See all new features in FastReport 3

Monday, August 30, 2004

Firebird JCA/JDBC Driver v 1.5.0 released!

What's new in JayBird 1.5
The newest release features full JDBC 2.0 compatibility (passed JDBC CTS 1.3.1 suite), new JDBC and X/Open specification features and a group of Firebird-specific interface features.
The Type 2 driver support now enables use of all of the supported Firebird client models, including Windows embedded server. This driver can also be used with InterBase 5.x, 6.5 and 7.0.
The JDBC connection pool has been completely reimplemented, with multi-threaded connections, prepared statement caching and more enhancements.
Full details are here.

Teaching optimization (Optimalcode)

The best source on web for optimizing delphi code was always Robert Lee's But this site was closed somewhere in 2003.
But thanks to the wayback machine little is lost. the last version of the site can be read here: Most pages are there, but some of the zip-files are missing.
When playing with the links I came across Jake's Code Efficiency challenge hosted by another of the slcdug bloggers, John M. Jacobson . It proved that delphi was as fast as any other language.

Encrypted execution engine

This article describes an implementation of user-mode (therefore, OS independent) code decryption engine. The code has been developed and tested under Linux and FreeBSD, but it should also work on Win32.
paper (.pdf, ~170k)
code (.tar.gz, ~35k)

List all the virtual key codes

This code snippet describes how to list all the virtual key codes and use them to simulate keyboard events. (email:

Description: Here, on formcreate, the combobox is built up with all key names using the GetKeyNameText function. I have added the virtual key code in the combo text. Then on combobox's change, you can simulate your Keybd_Event.

procedure TForm1.FormCreate(Sender: TObject);
i, j: Word;
MyKey: LPARAM; //Just to be brave!
TmpStr: array[0..100] of char;
ComboBox1.Text := '';
for i := 0 to 255 do
MyKey := MapVirtualKey(i, 0); //if this is not done, we get
//actual keyboard scan code
MyKey := MyKey shl 16; //We need to shift it to left because the
// GetKeyNameText function expects it that way!
j := GetKeyNameText(MyKey, @TmpStr, 101);
if j > 0 then
ComboBox1.Items.Add(string(TmpStr) + Format(' %.3d', [i]));

procedure TForm1.ComboBox1Change(Sender: TObject);
VKey: Word;
VKey := StrToInt(Copy(ComboBox1.Text, length(ComboBox1.Text) - 1, 3));
Keybd_Event(VKey, 0, 0, 0);

Some details from history...

When Niclaus Wirth created first Pascal compiler? 1970
Borland Software Corporation founded? 1983
Release date of Turbo Pascal v1.0? 20.11.1983
Year when released last version of Borland Pascal? 1993
Official release date of Delphi 1.0?14.02.1995

Sunday, August 29, 2004

Delphi Basics..

Sometimes perusing through the public newsgroups will reveal some real gems among the rough. Take for instance, there is current a very civilized and informative discussion currently taking place in borland.public.delphi.non-technical regarding different ways to make it easier for the Visual Basic programmer to move to Delphi. One such thing that came up was this web site, If you're looking to start programming in Delphi, this is a fantastic starting point.

Friday, August 27, 2004

Compile Delphi/Kylix Applications on Windows

I just ran across this cool tool.
CrossKylix - Kylix Crosscompiler for Delphi/Windows

Thanks Simon!

Borland continues to make smart acquisitions

"The tool will be embedded within the next version of the Borland
CalibreRM requirements management system, Version 7.0, which is due
later this year, according to Borland."

Firebird development

New Engine Document: How to Write Internal UDF's by Claudio Valderrama.

Learn Asp.Net programming with Delphi!

Design Patterns

Articles discussing the implementation of Design Patterns in Delphi

The Iterator Pattern

The Observer Pattern

How to ...

...simulate the pressing of keyboard keys?
Autor: Babak Sateli

{1. PostKeyEx32 function}

procedure PostKeyEx32(key: Word; const shift: TShiftState; specialkey: Boolean);
* Procedure PostKeyEx32
* Parameters:
* key : virtual keycode of the key to send. For printable
* keys this is simply the ANSI code (Ord(character)).
* shift : state of the modifier keys. This is a set, so you
* can set several of these keys (shift, control, alt,
* mouse buttons) in tandem. The TShiftState type is
* declared in the Classes Unit.
* specialkey: normally this should be False. Set it to True to
* specify a key on the numeric keypad, for example.
* Description:
* Uses keybd_event to manufacture a series of key events matching
* the passed parameters. The events go to the control with focus.
* Note that for characters key is always the upper-case version of
* the character. Sending without any modifier keys will result in
* a lower-case character, sending it with [ssShift] will result
* in an upper-case character!
// Code by P. Below
TShiftKeyInfo = record
shift: Byte;
vkey: Byte;
byteset = set of 0..7;
shiftkeys: array [1..3] of TShiftKeyInfo =
((shift: Ord(ssCtrl); vkey: VK_CONTROL),
(shift: Ord(ssShift); vkey: VK_SHIFT),
(shift: Ord(ssAlt); vkey: VK_MENU));
flag: DWORD;
bShift: ByteSet absolute shift;
i: Integer;
for i := 1 to 3 do
if shiftkeys[i].shift in bShift then
keybd_event(shiftkeys[i].vkey, MapVirtualKey(shiftkeys[i].vkey, 0), 0, 0);
end; { For }
if specialkey then
flag := 0;

keybd_event(key, MapvirtualKey(key, 0), flag, 0);
flag := flag or KEYEVENTF_KEYUP;
keybd_event(key, MapvirtualKey(key, 0), flag, 0);

for i := 3 downto 1 do
if shiftkeys[i].shift in bShift then
keybd_event(shiftkeys[i].vkey, MapVirtualKey(shiftkeys[i].vkey, 0),
end; { For }
end; { PostKeyEx32 }

// Example:

procedure TForm1.Button1Click(Sender: TObject);
//Pressing the Left Windows Key
PostKeyEx32(VK_LWIN, [], False);

//Pressing the letter D
PostKeyEx32(Ord('D'), [], False);

//Pressing Ctrl-Alt-C
PostKeyEx32(Ord('C'), [ssctrl, ssAlt], False);

{2. With keybd_event API}

procedure TForm1.Button1Click(Sender: TObject);
{or you can also try this simple example to send any
amount of keystrokes at the same time. }

{Pressing the A Key and showing it in the Edit1.Text}

keybd_event(VK_SHIFT, 0, 0, 0);
keybd_event(Ord('A'), 0, 0, 0);
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0);

{Presses the Left Window Key and starts the Run}
keybd_event(VK_LWIN, 0, 0, 0);
keybd_event(Ord('R'), 0, 0, 0);
keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0);

{3. With keybd_event API}

procedure PostKeyExHWND(hWindow: HWnd; key: Word; const shift: TShiftState;
specialkey: Boolean);
* Procedure PostKeyEx
* Parameters:
* hWindow: target window to be send the keystroke
* key : virtual keycode of the key to send. For printable
* keys this is simply the ANSI code (Ord(character)).
* shift : state of the modifier keys. This is a set, so you
* can set several of these keys (shift, control, alt,
* mouse buttons) in tandem. The TShiftState type is
* declared in the Classes Unit.
* specialkey: normally this should be False. Set it to True to
* specify a key on the numeric keypad, for example.
* If this parameter is true, bit 24 of the lparam for
* the posted WM_KEY* messages will be set.
* Description:
* This procedure sets up Windows key state array to correctly
* reflect the requested pattern of modifier keys and then posts
* a WM_KEYDOWN/WM_KEYUP message pair to the target window. Then
* Application.ProcessMessages is called to process the messages
* before the keyboard state is restored.
* Error Conditions:
* May fail due to lack of memory for the two key state buffers.
* Will raise an exception in this case.
* Setting the keyboard state will not work across applications
* running in different memory spaces on Win32 unless AttachThreadInput
* is used to connect to the target thread first.
*Created: 02/21/96 16:39:00 by P. Below
TBuffers = array [0..1] of TKeyboardState;
pKeyBuffers: ^TBuffers;
lParam: LongInt;
(* check if the target window exists *)
if IsWindow(hWindow) then
(* set local variables to default values *)
pKeyBuffers := nil;
lParam := MakeLong(0, MapVirtualKey(key, 0));

(* modify lparam if special key requested *)
if specialkey then
lParam := lParam or $1000000;

(* allocate space for the key state buffers *)
(* Fill buffer 1 with current state so we can later restore it.
Null out buffer 0 to get a "no key pressed" state. *)
FillChar(pKeyBuffers^[0], SizeOf(TKeyboardState), 0);

(* set the requested modifier keys to "down" state in the buffer*)
if ssShift in shift then
pKeyBuffers^[0][VK_SHIFT] := $80;
if ssAlt in shift then
(* Alt needs special treatment since a bit in lparam needs also be set *)
pKeyBuffers^[0][VK_MENU] := $80;
lParam := lParam or $20000000;
if ssCtrl in shift then
pKeyBuffers^[0][VK_CONTROL] := $80;
if ssLeft in shift then
pKeyBuffers^[0][VK_LBUTTON] := $80;
if ssRight in shift then
pKeyBuffers^[0][VK_RBUTTON] := $80;
if ssMiddle in shift then
pKeyBuffers^[0][VK_MBUTTON] := $80;

(* make out new key state array the active key state map *)
(* post the key messages *)
if ssAlt in Shift then
PostMessage(hWindow, WM_SYSKEYDOWN, key, lParam);
PostMessage(hWindow, WM_SYSKEYUP, key, lParam or $C0000000);
PostMessage(hWindow, WM_KEYDOWN, key, lParam);
PostMessage(hWindow, WM_KEYUP, key, lParam or $C0000000);
(* process the messages *)

(* restore the old key state map *)
(* free the memory for the key state buffers *)
if pKeyBuffers <> nil then
end; { If }
end; { PostKeyEx }

// Example:

procedure TForm1.Button1Click(Sender: TObject);
targetWnd: HWND;
targetWnd := FindWindow('notepad', nil)
if targetWnd <> 0 then
PostKeyExHWND(targetWnd, Ord('I'), [ssAlt], False);

{3. With SendInput API}

// Example: Send text
procedure TForm1.Button1Click(Sender: TObject);
Str: string = 'writing writing writing';
Inp: TInput;
I: Integer;

for I := 1 to Length(Str) do
// press
Inp.Itype := INPUT_KEYBOARD; := Ord(UpCase(Str[i])); := 0;
SendInput(1, Inp, SizeOf(Inp));

// release
Inp.Itype := INPUT_KEYBOARD; := Ord(UpCase(Str[i])); := KEYEVENTF_KEYUP;
SendInput(1, Inp, SizeOf(Inp));


// Example: Simulate Alt+Tab
procedure SendAltTab;
KeyInputs: array of TInput;
KeyInputCount: Integer;

procedure KeybdInput(VKey: Byte; Flags: DWORD);
SetLength(KeyInputs, KeyInputCount);
KeyInputs[KeyInputCount - 1].Itype := INPUT_KEYBOARD;
with KeyInputs[KeyInputCount - 1].ki do
wVk := VKey;
wScan := MapVirtualKey(wVk, 0);
dwFlags := Flags or dwFlags;
time := 0;
dwExtraInfo := 0;
KeybdInput(VK_MENU, 0); // Alt
KeybdInput(VK_TAB, 0); // Tab
SendInput(KeyInputCount, KeyInputs[0], SizeOf(KeyInputs[0]));

PInvoke - Win32 declarations again

I found a GotDotNet Sample that looks like it has some of the Windows.H declarations. No #defines converted, though.
So why am I harping about all this PInvoke stuff? i just don't believe that .NET's going to be the only platform for years to come, and there's tons of things in Win32 that are plain ignored in the FCL. So, we'll need PInvoke for a while - and it's better to have a ready set of translations so you can use what you're going to need.

Unloading an ISAPI dll from IIS

I got this snippet from the borland.public.delphi.internet.isapi-webbroker newsgroup - a simple way to unload an ISAPI dll programmatically:
WSite, WServer, WRoot: Variant;
WSite := CreateOleObject('IISNamespace');
WSite := WSite.GetObject('IIsWebService', 'localhost/w3svc');
WServer := WSite.GetObject('IIsWebServer', '1');
WRoot := WServer.GetObject('IIsWebVirtualDir', 'Root');
This works on XP - I didn't even know you could create an OLE object with "IISNamespace". But you can. Anyhow, in the WSite.GetObject call you see a "1" - if you're wondering what that is, it's the number given to a web site by IIS. You can get the numbers of all your websites through Adsi - import the Ads type library and use the code from ADSI paper like this:
var serv : IADSContainer;
varArr : OleVariant;
lNumElements : ULong;
obj : IADs;
hr : integer;
// list web sites
AdsGetObject('IIS://localhost/w3svc',IAdsContainer, serv) ; hr := ADsBuildEnumerator(serv,e);
while(Succeeded(Hr)) do
hr := ADsEnumerateNext(e,1,
varArr ,lNumElements);
if (lNumElements=0) then
IDispatch(varArr).QueryInterface(IADs, obj);
if obj<>nil then
if obj.Class_ = 'IIsWebServer' then
// obj.Name contains the "number" you need.
obj := nil;
varArr := NULL;
//don't call ADsFreeEnumerator(e); //since e will be released by Delphi
You can use ADSI to do a ton of things.

A List of Delphi Tutorials

A few of these sites I hadn't seen before. I haven't reviewed any of them, so no guarantees as to quality.

Choosing Between VCL for .NET and WinForms

Delphi 8 for .NET developers have two choices for developing Windows user interfaces: Microsoft's Windows Forms framework, and Borland's VCL for .NET framework. Neither of these is appropriate for all applications. This article is a simple guide to how to determine which choice is right for your projects.

Firebird ODBC Driver V1.2 has been released!

The IBPhoenix Open Source Firebird ODBC Driver V1.2 has been released and is available for download.

Thursday, August 26, 2004

WFML : A DFM equivalent for .NET?

Check out This is a component that can use XML markup to "design" forms - so you can have your form design separate from your code! Very much like Delphi DFMs - and the event model also expects handlers inside of the .CS class.
No designer for it, of course - and probably no support in Longhorn either - XAML does this in Longhorn anyhow. But you know what, this does one thing that I've always wanted in Delphi - allows me to put comment in the form design code - i.e. comment out a component easily. Even in the .NET IDEs, you can't really muck about with the "InitializeComponent()" code - they don't like it too much, for reasons I can't understand. (If you're parsing, parse it right, dammit. So what if I chose to comment something out?)
But the app is *slow*. No, this isn't just .NET - XML parsing in general is slow, and then all the stuff like dynamically creating stuff is slower.

C# 2.0's 'yield return' Looks Like InterBase's SUSPEND

Marc Rohloff pointed out that the new iterator feature of C# 2.0 (yield return) looks a lot like SUSPEND in the InterBase stored proc and trigger language. I agree.

It's not about the platform

A question on the Borland newsgroup has caught my eye. It's not the first time the question has been asked, and I expect it won't be the last. A developer was wondering why should we develop for the .NET framework, instead of building a Win32 application. Reading the answers, it seems to me there's a misconception among developers of what .NET is about.
One common answer is simply that .NET is Microsoft's next platform. Microsoft has put its considerable weight behind the framework, and clearly considers .NET its main application-level API in the near future. This is, in fact, a perfectly valid reason to choose .NET as your development platform, and in many cases it is the only reason needed to make such a decision.
But there are also technical considerations. The .NET framework is a platform, but it's not an operating system. Win32 is here to stay, and will be supported for a long time. Why bother with a new platform when your existing tools and skills work just fine?
It turns out the technical answer is even simpler than the "because Microsoft is big" answer: productivity. Or, to be exact, developer productivity. The .NET framework is a development platform, and is targeted at developers, not end users. End users don't care if applications are managed, or garbage-collected, or built on a common type system. Developers, however, should.
As Brad Abrams points out, the whole idea behind the .NET framework, the CLR, Visual Studio .NET, the C# language, visual designers, and other similar tools and technologies is increasing developer productivity. The less time and effort you spend on making sure your program is stable, on managing user interface elements, on memory and object lifetime management - the more time you can spend on what your application actually does.
This focus on developer productivity is what makes the .NET framework attractive for developers. Note that this doesn't mean .NET is always the right choice. Delphi developers, for example, have had a visual RAD tool and a powerful framework for years. It might make more sense to develop a Win32 application in Delphi, saving your users the need to install the .NET framework. On the other hand, the framework is extremely easy to deploy, and is already installed on a lot of machines. The technical merits of the framework (some of which are listed here) may outweigh the inconvenience of the initial deployment.

Database poll

The preferred database poll on O'Reilly? InterBase/Firebird came out on top.Firebird also came a very close second to MySQL in an earlier poll on readers choice awards.

InterBase and MySQL, a Technical Comparison

InterBase and MySQL, a Technical Comparison by Bill Todd.

InterBase and Microsoft SQL Server, a Technical Comparison

"InterBase and Microsoft SQL Server, a Technical Comparison", By Bill Todd.

Firebird- Dreamweaver-PHP-Phact

Thinking about upgrading your website? The Firebird- Dreamweaver-PHP-Phact gives detailed instructions about getting Firebird, Dreamweaver and PHP-Phact to play together nicely. Store supports Firebird - bringing the world of ASP.NET to Borland Delphi developers
now supports both Firebird and InterBase via the Firebird .NET Data Provider.

Firebird INTL Architecture

Peter Jacobi has made available a new version of fbintl2.dll at (example, source, Win32 binary, sample scripts), along with more information and a download to test. New features include: Some defective handling of trailing spaces in comparisons have been fixed. The very interesting case of the Thai character set TIS 620 and its sorting according to the Thai Royal Dictionary, has been included for testing. Also a first attempt to make the multi-level collations more space efficent. Whereas current Firebird uses 24 bits/character, the TIS620_TH_TH collation is happy with 10 bits/character, for a full fledged four level collation.

Web-based strategy game

Here's an interesting one, but this ones a little bit different. Its a web-based strategy game. Using FireBird 1.5 Classic, under Linux. 95% of all of the games logic is written in DML (stored procedures and triggers). It also uses a self-made API C++ wrapper to access the database from CGI. Visit for more information.

Firebird Users

This page allows users of Firebird to list their applications, their usage of Firebird, and why they like Firebird. This page acts as a testimonial, user story area that would encourage new users to try Firebird themselves...

Everything You Need to Know About InterBase Character Sets

"Everything You Need to Know About InterBase Character Sets", the update is based partially on some useful comments by Peter Jacobi on Character Sets in Firebird.

Hidden costs of open source

The following letter was printed in ITWEEK, in response to this article: "Hidden costs of open source" by Martin Butler.
The points Martin Butler makes are accurate, but only in respect to open source software products like MySQL. MySQL uses a dual licensing policy, a commercial license that allows the MySQL database to be distributed with your application, without having to open source your own code, and a free software license if you are distributing your own open source applications that comply with GPL terms.This is pretty much the norm for most commercially viable open source projects, but not always. For example both Firebird - a relational database based on the open sourcing of Borland's InterBase, 4 years ago - and PostgreSQL do not use GPL as their license.So both can be freely deployed with commercial applications without requiring a license fee, or open sourcing your application code. Firebird uses IPL, the InterBase Public License, avariant of MPL, whilst PostgreSQL uses the BSD license. Paul Beach

Open Source Myths

A post in this Linux user group pointed me to an article about Common Open Source Myths. I especially like the All Software should be Free paragraph; Software should never be treated as something that must be free. Even as in beer. Because at a very macro level, the small company is going to have problems - imagine a garage company that makes and sells something. If they need accounting software, it's free (GREAT!) but now if they have a problem, they have choices of:
a) Contact a programmer who wrote the software, which is open source, so he's funded by his full time job in organization X that makes microprocessor chips. So he doesn't have time to fix or address the problem immediately, or
b) Find a "support" company that will support this famous open source software, but they're either too expensive or don't have any good programmers who can fix the software using the source code. Because the best programmers are at company X at makes microprocessor chips.
My point: The best programmers will leave the industry if there's not enough money to be made writing software.
Extrapolate further: as support becomes the only money making opportunity, countries like India and China, who have vast resources of programmers, will be able to provide support at much cheaper rates. (No, I don't believe providing "support" is a wonderful thing to do, even if it provides revenue for my country. We'll always stay at the bottom of the value chain) And if the entire business model depends on support - why would anyone ever want to fully document software? Or even fix things that they see as potential problems, but aren't noticed by customers yet? (Hey, we can bill them for it when they find out :) )
I like open source software - I use many tools that are open source. Our internal company rule disallows the use of GPL based components in any of the work we do, but we do use MPL and other free licence based components. But I think closed and open source software should co-exist, as competition.
There's tons of free source code dished out in newsgroups, source code (even from Microsoft) and websites such as CodeProject. Anyone can use this source code today: I just hope such code doesn't become inaccessbile to us closed source application authors!

Wednesday, August 25, 2004

Firebird Frenzy Erupts,4149,1477935,00.asp?kc=EWGL10310KTX2B2200436
After comparing what are commonly thought of as the two most common and most popular open-source databases—MySQL and PostgreSQL—I was floored by the amount of mail I received regarding my ill-advised omission of the hotly popular Firebird open-source database.

The Rookery: Introduction to the Firebird Database

"The Rookery: Introduction to the Firebird Database" on Linux Journal by Masroor Farooqi

Is it FLAP or WAFP?

Is it FLAP or WAFP? Firebird {Windows Linux} Apache PHP. Check out the answer to LAMP here.

MyGeneration & Firebird

MyGeneration announces support for Firebird and InterBase. My Generation is a Development Tool written in Microsoft .NET. that generates code from templates by combining either JScript, VBScript, DotNetScript C#, or DotNetScript VB.NET.

The Productivity of a Hacker

Michael Pence posted a link on The Delphi Advocacy Group to a terrific article by Paul Graham called “Great Hackers”. Now this is an insightful, excellent piece of writing. Graham discusses the mentality of insanely productive developers, how they go about their business, and what motivates them. He discusses how many companies make the mistake of creating an environment that repulses these types of programmers, and what it is that attracts them.
The most interesting point he makes, though, is the point about the tools that these uber-developers choose. He points out that the tools they choose are most often not the tools that are frequently chosen for them. They frequently choose open source tools because of the control that they give.
And that made me realize that I know a whole lot of developers who have had their tool chosen for them, but if given the choice, would be using Delphi. As a matter of fact, I've venture to guess that there are a lot of these folks. And that, to me, speaks volumes about Delphi as a language and as a development tool.

JEDI Version Control System

The goal of the JEDI VCS project is to create an open source VCS system, based on the existing FreeVCS database structure. This will allow current FreeVCS users to migrate to JEDI VCS, while continuing to use the existing server portion.
Although the original name for this project was freevcsclient, the successor to FreeVCS will now be called JEDI VCS, short for JEDI Version Control System

Download Unstable Builds here:

BTW, I am maintainer of Delphi 7 IDE dll!

VB Programming with Firebird

Your developing an application that requires a database, which one will you use? If the application is only being accessed by no more then 4-5 people at any given time, then Access can be a good choice. But what if this application will be accessed by 20-50 people or more at any given time and needs to be a server then what?
Well you can use MS SQL, Oracle, Sybase or InterBase among others. But what if you or your customer is on a tight budget then what? What if you needed a powerful database server but you don't have the big bucks to fork over on the major databases!
Well your in luck, because there are open source databases out there other then MySQL. While MySQL is a very good database lets face it, you cant do Stored Procedures, although these features may be available in a year, but you need them now.
This month we will be looking Firebird. Firebird will blow Access out of the water and can compete with MS SQL, Oracle, Sybase and InterBase. As a matter of fact firebird is InterBase, on July 25th, 2000 Borland decided to make InterBase open source, to the horror of Microsoft. Later they decided to keep up a commercial versions, so the open source version of InterBase became Firebird and the commercial version is stilled called InterBase.
While I wanted to provide in depth examples on both Firebird and SAP DB (another open source database), I could only do this on Firebird. While I was able to install SAP DB on my NT machine, the only thing I was able to do is test if the database was running and start and stop the database. I installed the web tools but for some reason they did not get installed properly because I was not able to access them. Now it could be that my NT system was not up to specs, so if you are able to run SAP DB on your machine successfully please let us know. By the way SAP DB only works on NT/2000 and XP. So I will be going in depth on working with Firebird but I will only be able to provide you with links and information on SAP DB. It's to bad really I was really looking forward to testing SAP DB.
Oh, by the way did I tell you that Firebird is FREE! When I say free I mean free both for personal and commercial use.
Lets talk about Firebird!

VCL Component registration.

How many of you have found that when you create a design-time package for Delphi, there are many things you can do in the unit initialization equally as well as using the “sanctioned” technique of providing a single global procedure called “Register”? You may have discovered that things like the Open Tools API services are available, you can register property/component editors with some success as well. Well... stop it! Please make sure you are using the properly sanctioned technique of placing all this code into a “Register” procedure in one or more units in the design-time package.
There are some new features and services that the next version of Delphi that heavily relies on the registration of wizard, components, property/component editors, and custom modules be done from within a Register procedure. Let's just say that the next version of Delphi will “demand” that component developers are following the rules. The good thing about this is that using the Register procedure will work for all versions of Delphi, so you shouldn't be breaking any backward compatibility, nor are you going to be required to introduce yet another IFDEF. If you take a quick look over your code and make sure that this is the case, then you should be in very good shape and ready when we release the next version of Delphi.

Diamonback at Borcon 2004 in San Jose

Great new features of DiamondBack (Delphi 9) will be shown at Borcon 2004 in San Jose. Take a look at some of the relevant sessions at,1410,32499,00.htm

Delphi 9 will host both Delphi and C# together!!!

Most folks have assumed that Delphi 9 will host both Delphi and C# together, but it's never been as clear as Danny put it in a newsgroup message:
Marcelo Carvalho wrote:
> Hi,> > Will D9 include C# as a language option???? (in the same IDE, same> product)>
We'll be showing just how closely integrated Delphi and C# code can bein the new product at BorCon in San Jose in September.
-- Delphi Compiler Core:

New Diamondback for-loop Syntax

According to Danny Thorpe's lastest weblog entry, "in the next release of Delphi, the compiler will support a new kind of for loop, dubbed the "" loop. A "" loop works just like a regular Delphi for loop except that you don't have to deal with a loop index variable.". This sounds a lot like the C# foreach feature. And the best thing is: it will even be available in the Win32 Delphi compiler as well. Great news, and great article (as always, Danny).

Tuesday, August 24, 2004

Slipping in a Little Delphi

Now here's an example of what we Delphi advocates ought to be trying to do:
The Web Services Shootout: .NET or Java? by Blake Watson
Blake is an old Delphi hand from back in the days of Compuserve forums. He even wrote a really nice book about the Object Pascal language that, sadly, suffered in its original printing because the editor didn't know the difference between the meaning of “Delphi” and “Object Pascal” (back before there was a difference. ;-) Anyway, Blake wrote an article about web services in Java and .Net, and the guy -- God bless 'm! -- sneaks in Delphi code! How cool is that?
See, that's the way to do it. Now people will read that article and maybe think “Hey, I didn't know Delphi could do that/still existed/etc.”
Well done, Blake.

Sunday, August 22, 2004

sqlWin with support for Firebird

Andy Colson announces version 1.6 of sqlWin with support for Firebird.

Friday, August 20, 2004

Are open source databases for real?

Firebird is mentioned in the following article "Are open source databases for real?" by Simon Sharwood on Builder.Au

XanaNews Newsreader

XanaNews is a free, powerful, fully featured newsreader for Windows 98, Windows 2000 and Windows XP.
Version released 19th August 2004. Please see the readme file for details of what's new.
XanaNews support newsgroups are available. Point XanaNews to the server, and subscribe to the and xananews.wishlist groups. See you there!

Future Versions of Firebird

A "rough" guide to future versions of Firebird has been added. This draft emanates from recent discussion in the Firebird admin group regarding the future direction of Firebird. Comments and feedback to the Firebird Development List please.

The Tao of Babel

There’s been a lot of buzz in the newsgroups over the past months about languages. Should I switch to Java? Will Chrome be the next big thing in .NET languages? What new features will the Delphi language offer in Delphi 9?
The world of computer programming languages is in need of real innovation, not myriad permutations of syntax. I say, the next big thing in languages needs to come by way of completing the UML (as Scott Ambler has so ably stated, “The UML is incomplete”) and making it applicable to real world problems faced by real world businesses. Users need tools that let them create solutions by laying out UML-style diagrams and charts that map to RAD layout tools, and that directly create IL or machine code from those UML and RAD designs, bypassing intermediaries like C++, C# and all other guru-enrichment schemes of similar ilk. The coder is an expensive luxury that the process does not really need.
“Jake, you’ve flipped your lid. There will always be a need for software coders, because there will always be a need for the human element in software development.”
Hello? What is the end user, a Martian? The end user is the only human in the process that is really necessary, everybody else is simply a means to his ends, a tool. Tools do not need to be humans, and the history of technology shows that humans ultimately are poor tools that can and should be replaced by specialized technology. The history of Western wealth and prosperity has been this process of increasing capitalization over time, a process that makes the process more and more efficient in meeting the needs of the final consumer. The fact that this process works very well is attested to by the fact that modern standards of living are so much better than the standards of living of even the most fortunate members of prior ages. The poorest Americans have access to things that even kings from a hundred years ago could not even dream of having, like television and radio. Extended to the process in which software development attempts to serve end users, this means that end users get more control over the process, the process works better, and the process requires fewer human intermediaries--like coders.
The future is not one populated by well-heeled software programmers. It is one populated by well-heeled business analysts using their domain knowledge to directly create solutions within the business process. The days of the generalist software consultant who flits from client to client cranking code, are numbered. The days of the C#/C++/Java/etc. language bigot who does nothing all day but crank code in his favorite programming language, are numbered. The days of the religious fanatic praying to his favorite technology, are numbered. We now know from animal behaviorists that several types of animals use tools. But it seems that only humanity falls in love with tools.

Thursday, August 19, 2004

Post of the Week

Here's a great post about Delphi for .Net, Win32, VCL.NET, and how cool it is.
I wanted to provide a "case study" based on my experiences using Delphi 7&8in tandem.
1) Using Delphi.NET, I was able to start coding for the .NET platformimmediately. Without learning a single new thing about .NET. I used VCL.NET,of course.2) As the need arose, I started working with .NET classes and learningthem - the rest was handled by VCL and the other FX that Delphi provides.This made the learning curve very, very smooth.3) All my expertise and knowledge on the Win32 API, I leveraged withP/Invoke. While it is a valid charge that my code won't run on Mono, Ireally don't care. I am targeting .NET FX 1.1 on Windows. It will be yearsbefore Mono and/or other .NET implementations come close to thebehavior/stability offered by M$ on the Windows .NET FX. Although M$presents .NET as a new platform, I tend to see it as a new framework -nothing more.
4) Maybe this is the best part - I was able to back-port the sameapplication to Win32 in a week or so. AND I have single source compiles forWin32/.NET now. True, there are quite a few IFDEFs here and there, but thatis all it cost.
We all know the famous example - open the Delphi 1 fishfacts app, and itcompiles under D8. Now you have a single source app, compiling on Win16,Win32, and .NET. This definitely says something!
I consider my knowledge of VCL an investment, one that will last well intothe future - Borland gives us reason to believe that even when M$ drops theWin32 API, we will still be leveraging our VCL knowledge - and natively, atthat. While I have occasionally fallen in to the "oh what if Delphi getsdiscontinued" panic, which seemed to be a real threat back in the Del Yocamdays - I think time has proven the choices I made.
What can I say - keep it up guys! We love ya.
Good stuff. As I've said many times -- if you are doing Win32 development today, you should be doing it in Delphi.

Wednesday, August 18, 2004

Unofficial VisualCLX patches - News

Qt3 for Kylix Version 0.3 The version 0.2 was the Qt3 for Delphi release. Version 0.3 is more advanced than Qt3 for Delphi 0.2.The QtClasses.pas is still missing due to issues with object lifetime and type casts.
Qt3 for Delphi Version 0.3Regenerated with the Qt3 for Kylix Generator.

Monday, August 16, 2004

Differences Between .NET Generics and C++ Templates

Someone on the borland.public.delphi.non-technical group asked if .NET generics were like C++ templates. The answer is, "No, not at all." This article does a good job of explaining the differences.

Sunday, August 15, 2004

Firebird RDBMS for WinCE

Thursday, August 12, 2004

Trees in SQL

Some answers to some common questions about SQL trees and Joe Celko

Friday, August 06, 2004

Diamondback Rumors

Some rumors I read in the NGs and blogs last night:Rumor: "I hope Diamondback is more than just Delphi 7 and Delphi 8 combined"Fact: Way more. If it were just 7 & 8 combined, we'd just call it "Garter Snake"Rumor: "Diamondback will be two IDEs one for Win32 and one for .NET"Fact: Diamondback will be a single IDE :o) Rumor: "Diamondback will include ECO for ASP.NET, Refactoring, and Unit Testing"Fact: Thats just scratching the surface... Rumor: "Danny, JohnK, Corbin, Jim and Allen are hotshots"Fact: Heck yaRumor: "DiamondBack will be the best development tool in the world"Fact: Alright, who broke their NDA? Someone call security please.

Thursday, August 05, 2004


InstantObjects™ is the integrated framework for developing object-oriented business solutions in Borland Delphi™. The framework provides the foundation for the development process as well as the engine that powers the final application.
InstantObjects™ offers:
Model realization in the Delphi IDE via integrated two-way tool.
Object persistence in the most common relational databases.
Object presentation via standard data-ware controls.

A Delphi-like language for Visual Studio?

Anyone heard about CHROME, a new product from RemObjects Software? See

Tuesday, August 03, 2004

kbmMW v. 2.03.04 commercial released

You may have heard about 2-tier and n-tier applications. What are they exactly?
2-tier - also called client/server - applications are applications which consist of two separate applications, one server application (typically a database server like Oracle, MSSQL or any other standalone database) and a client application.
n-tier applications consist of 3 or more active applications which data must pass, from the backend server to the front end client. Usually 3-tier models are used, where one tier is the backend database engine, one is the front end client and one is just in between them, also named the application server or business logic node.
What is the purpose of having more than 2 tier?
Well.. if you want to have many different client frontends, like f.ex. one written in Delphi/BCB as a normal fat client, one as a web server, one as a WAP server, one as a linkup server to a mainframe etc. it would be unwise to copy all the business logic (all the rules of your application) to each client application/server. It would be a nightmare to support. Instead its better to create a middle layer containing the business logic, and then let the clients talk with this middle layer. Thus the clients can relatively easily be changed for other types of clients, without need for remembering how was the business logic put together.
Using n-tier models also gives other positive side effects:
- Load balancing. They are capable of serving many more clients than a 2-tier solution, simply because the middle node (the application server) can be copied to more than one machine, and thus divide the load between more CPU's.
- Fault tolerance. If more application servers are running, the clients can simply try the request on another appserver if the first one didnt reply.
kbmMW is about all that and much more. It will support different database backends directly without you having to write any code. Thus if you need to perform a SQL query you will do it much the same way you are used to in a normal 2-tier setup. The specialized client and server service classes will handle everything for you. Further kbmMW contains advanced connection pooling on both client to server and server to database, caching of result sets on both client to server and server to database and much more. The database handling with its advanced caching and connectionpooling can aciually be used in 2-tier (Client/Server) setups aswell without using the remaining part of kbmMW giving you freedom in creating your application or web application the way you want to.
kbmMW is a commercial product but for a very fair price.A freeware license can be obtained for specific non commercial applications. Ask for more info if such a license is needed.There are no runtime fees or royalties except for the developer licenses.
The source is fully included in the package.

Sunday, August 01, 2004

FlameRobin version 0.1.2 released

FlameRobin is a database administration tool for Firebird DBMS.Our goal is to build a tool that is:- lightweight (small footprint, fast execution)- cross-platform (Linux, Windows for start, others planned too)- dependant only on other open source software