Subject Re: [IBO] Attention Helen - Re: IBO VCL --> CLX
Author Helen Borrie (TeamIBO)
At 01:59 PM 18-07-02 +0100, Damian Dowling wrote:

>Regarding the compatibility between the CLX and VCL versions of IBO. I am
>currently developing a system that is portable to Linux (there is nothing
>windows specific in it), what i would like to know is what would be
>involved in porting to the CLX version of IBO:
>
>1. Will the IBO API be the same?

IBO doesn't have an API.
It encapsulates the functions of the IB/FB API which is the same regardless
of platform.

Windows has a huge API, part of which the VCL makes available through
encapsulation and part through direct function calls which are converted to
Pascal. Native IBO makes extensive use of these API calls for its
data-aware controls.

In Kylix, controls are Qt widgets. Qt has its own huge API. Borland has
written wrappers for all of these widgets, surfacing sufficient widget
functionality to get them behaving as closely as possible to their
counterparts on Windows. (They have done a good job, as far as it
goes...) However, the architecture of the GUI and operating system layers
is quite different; so CLX is cross-platform to the extent that it
represents as many as possible of the ways in which Windows control
behaviour and Qt widget behaviour can be achieved using the same language
syntax. The result is the "lowest common denominator" of both APIs.

Direct calls to the Windows API are out. Direct calls to the Qt API are
not available at all. If you want to devise your own, you have to buy
licensing to Qt, as Borland's licensing agreement precludes anything except
what is available in Qt.pas.

In Delphi 6, you have the choice of VCL or CLX. In Kylix, you have only
CLX - there is no equivalent to the VCL.

We have compiled all of the IBO core and data access classes (including
TDataset-compatible) in CLX and they work. Currently, you can do a GUI app
using the TDataset data access classes with the Kylix TDatasource and its
data-aware controls. For native IBO, you are limited to feeding data from
datasets into non-data-aware controls until we can sort out a principle for
achieving the Windows level of functionality. It's not a priority at the
moment.

In the beta group, there is minimal interest in the GUI side and more
interest in being able to compile the core data access without needing to
use Qt at all. Kylix generates enormous executables. Users appear to be
more interested in using IBO on Linux for developing console applications -
web servers and application servers.


>2. Will it just be a case of including different files?

Well, yes, you do use a completely different set of *libraries* for CLX -
and there is one set of libraries for Windows and another for Linux.

If you are talking about using CLX for your application code, I guess it's
up to you how simple or hard it would be. If you are talking about a
single IBO codebase that you can install on both Delphi and Kylix and
expect the same behaviour, no, not entirely. For example, the IBO
design-time components themselves - even the TDataset-compatible ones -
make heavy use of native IBO controls in the property editors. It's going
to be a while before we get close to reproducing IBO's clever property
editors in CLX.

The trick would be to attempt to compile IBO-Kylix on Windows - not
possible with the current beta sourcecode, as its conditional defines
provide VCL for Delphi and CLX for Kylix, for the reasons already
stated. I did some experiments using the Kylix code with CLX defs for
Windows and couldn't get it to compile in Delphi 6, but I didn't spend
extended time on it as it's not in our requirements.

You're welcome to join the Kylix beta group and play with the code yourself...

regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com