Athena

Kylix 3 Review

Brian Long (www.blong.com)

Borland Kylix now reaches out to C++ developers as well as Pascal coders. Brian Long looks in the box to see what this latest release has to offer.


This article first appeared in Linux Format Issue 32, November 2002.

If you find this article useful then please consider making a donation. It will be appreciated however big or small it might be and will encourage Brian to continue researching and writing about interesting subjects in the future.


Introduction

Kylix has had a rapid growth cycle, after a little hesitation getting started. Kylix 1 was released in February 2001 as Borland's first attempt at a Linux-based RAD tool. It offered facilities for building GUI applications for X windows, console applications and also Web server applications (CGI applications or Apache modules). All this was supported through the Object Pascal language and a rich supporting library called CLX.

Nine months later in November Kylix 2 was released with a good remit of Enterprise-level support including the ability to build Web Services and CORBA applications.

In July of this year (2002) Kylix 3 was announced. So what's new?

Overview

The main thrust of Kylix 3 is to finally fulfil Borland's aim of getting state of the art RAD tools on the Linux platform for both Pascal and C++ developers.

Yes that's right, Kylix is no longer restricted to those who want to dabble with Object Pascal (or the Delphi language as it has now been renamed). Naturally it still completely supports the Delphi language as it has done since its inception, but Kylix now contains two identical looking integrated development environments (IDEs).

One IDE is for doing Delphi language development (see Figure 1) and the other is for C++ based development (Figure 2). Kylix 3 is effectively a Linux version of both Delphi 6 (with some Delphi 7 features) and C++Builder 6, Borland's RAD tools for the Microsoft Windows platform.

Figure 1: The Kylix 3 Delphi IDE

 

Figure 2: Is this the Delphi IDE again? No, it's the C++ IDE

Both IDEs offer much the same features (see the What Is Kylix? appendix). They allow you to develop applications using the full CLX library but you have a choice of which language to develop applications in, Delphi or C++. It's even possible to build applications with combinations of Delphi and C++ source modules.

You can see the striking resemblance between the two IDEs in the screenshots. Each IDE has the ImageView sample project loaded (it's available as both a Delphi and a C++ project) and you should be able to see the only real difference is the syntax in the code, as visible in the code editor in both cases.

Installation is straightforward, thanks to the continued use of Loki Software's installation kit but a note of caution should be injected here. Make sure you have plenty of disk space; Kylix 2 was a large product but Kylix 3 is much bigger. Depending which version you install it will take between 250 and 500 Mb for a full installation.

After installation you should have two key menu items installed on the desktop: Kylix 3 (Delphi IDE) and Kylix 3 (C++ IDE) as shown in Figure 3. You can use these menus or launch either IDE from a terminal window with the startdelphi or startbcb command.

Figure 3: Desktop menu items for the two IDEs in Kylix 3

C++ Support

Kylix 3 represents the debut of Borland's C++ compiler for Linux. As with the Delphi language support you can write C++ code in the C++ IDE, compile it, link it and then run it and debug it. However there is nothing stopping die-hards still using the command-line. Both Kylix languages offer command-line tools for compiling and linking.

The C++ compiler is a fully ANSI/ISO compliant, optimising compiler and supports pre-compiled headers to increase compilation speeds. It comes with the STLPort 4.5 Standard Template Library as well as the CLX library.

If you already have a various tools to help your build process the C++ IDE lets you associate these tools with appropriate file types, for example you might want to use Bison or Yacc to compile .y files. You can also export C++ projects to makefiles compatible with the GNU Make utility. Clearly attention has been paid to ensuring that established Linux C++ developers can continue to use and leverage their existing skills and tools.

What Else?

To be fair, the main point of Kylix 3's release is to bring their C++ compiler to the Linux market. Changes to the CLX component library and Delphi language RTL are minor and other changes are varied but not really major in comparison to what was offered in version 2.

The Object TreeView is a new IDE window that helps whilst developing forms, frames and data modules by showing the logical relationships between visual and non-visual components in a tree view (see Figure 4). Selecting a component tree node automatically selects them on the Form Designer and exposes their properties on the Object Inspector, whilst drag and drop can be used to change component relationships. You can also access component editors for the components by right-clicking their tree nodes.

Figure 4: The new Object TreeView

The dbExpress database framework now supports Oracle 9i and Informix SE and the Indy components (which were also available in version 1 and 2) have been upgraded to version 9, and now include additional intercept components and I/O handler components.

Web server applications (either Apache shared modules or CGI applications) can still be written in various ways, but debugging them is made much easier with the Web App Debugger (see Figure 5). This functions as a Web server to facilitate direct source debugging without the need for a real Web server to be installed.

Figure 5: The Web app debugger listing out requests and responses

Kylix 2 introduced the ability to create new Web services and also write applications that make use of Web services (existing ones or ones that you write yourself), but this was only available in the Enterprise version. With Kylix3 the Professional Edition now includes support for making use of Web services, with native SOAP bindings for compile-time syntax and type checking (most easily done with a wizard in the IDE as shown in Figure 6). To write Web services you still need the Enterprise Edition.

Figure 6: Kylix for C++ importing a Web service written in Kylix for Delphi

Summary

There's no doubt about it, this is a whopping product. C++ developers should look very carefully at this product with an open mind and, at the very least, either download the Open Edition or a trial version of the Enterprise Edition and check it out. You should like what you find. Granted there are a variety of free IDEs around for C++ development but this product has many years of history behind it; it's a mature, impressively rich and wide-ranging development system.

For users of Kylix 2 who aren't interested in C++ there are various improvements to the IDE and to CLX to consider, but not that many of them. If you use Kylix 2 Professional then the upgrade is well worth it. If you use Kylix 2 Enterprise there are less compelling reasons to upgrade but you should certainly look at a trial version and see whether you like what's been added.

You should also be aware that if you are not interested in C++ you can get the Delphi version of Kylix 3 free in the Delphi 7 box (Delphi 7 Studio Professional comes with Kylix 3 Professional and Delphi 7 Studio Enterprise is accompanied by Kylix 3 Enterprise). That gives you Linux and Windows development capabilities (as well as for .NET, since a preview version of Delphi for .NET is also supplied) in one product purchase.

Most newcomers to Kylix will be looking either at the Open Edition or the Professional Edition (the Enterprise Edition is more for corporate developers). There's simply no reason not to download the Open Edition if you have access to a high speed Internet connection and wish to create GPL applications. For commercial software the Professional Edition is hardly an expensive purchase and you get a lot for the money, although the support for C++ and using Web services is really all that sets it apart from Kylix 2 Professional.

There aren't many real gripes with Kylix, mainly due to its mature and long heritage on the Windows platform. The IDEs are still built mostly from the Delphi/C++Builder Windows code base using the WINE library. Yes they are real Linux ELF applications, but they still don't quite look or feel like it. Before Kylix 1 was released Borland assured the public that a proper native CLX IDE would be forthcoming with future releases, but so far they seem to be sticking with the WINE version.

There is still no help with application deployment (other than a text file describing what files you'll need to ship). Identifying all the files to deploy can be tricky, for example VisualCLX database applications require the application, the Qt library and dbExpress database driver to be deployed in addition to the database itself. If you build your application with runtime packages, things are rather more involved.

These downsides apart, Kylix 3 gets the thumbs up from us.

Verdict

Ease of use 8 out of 10
Features 9 out of 10
Performance 8 out of 10
VFM 7 out of 10
Borland have done a good job in providing wide-ranging application development capabilities to both C++ and Pascal programmers alike.
Rating 8 out of 10

Appendix A: What Is Kylix?

In a nutshell, Kylix is a RAD (Rapid Application Development) tool used to build X windows applications, Linux console applications, Web server applications and shared objects. All these have access to databases (DB2, Informix, InterBase, MySQL, Oracle or PostgreSQL) through dbExpress components.

Applications can be developed either in C++ or in the Delphi language (a language that's evolved over the last two decades from Pascal, which many programmers learned in college), each having their own IDE (Integrated Development Environment). Both C++ and Delphi are object-oriented, third-generation languages and both generate high-performance, optimised compiled code.

Applications user interfaces can be developed quickly using the tools in the IDE, which include:

The IDE also offers other tools that you would expect tro be in a professional development toolkit:

The IDEs are rich with functionality and options, but command-line die-hards are not forgotten with Kylix. Every step of the compile and link process can be performed from a Linux prompt with the command-line compilers.

Both languages (Delphi and C++) have their own RTL (Run-Time Library routines) but share the CLX library, which consists of four main areas:

Appendix B: Kylix 3 Editions?

Kylix 3 has been released in three versions, just as with version 2 and are priced the same as well:

If you compare these RRPs with the combined RRPs of Delphi 7 and C++Builder 6 on the Windows platform (which give you much the same functionality as in Kylix 3) you'll find yourself getting a considerably better deal on Linux. The Personal Editions (similar to Kylix Open Edition) would be £128, the professional Editions £1368 (£548 upgrade) and the Enterprise Editions £3998 (£2398 upgrade). Borland are clearly making some concessions towards the lower price expectations of Linux consumers.

About Brian Long

Brian Long used to work at Borland UK, performing a number of duties including Technical Support on all the programming tools. Since leaving in 1995, Brian has spent the intervening years as a trainer, trouble-shooter and mentor focusing on the use of the C#, Delphi and C++ languages, and of the Win32 and .NET platforms. In his spare time Brian actively researches and employs strategies for the convenient identification, isolation and removal of malware.

If you need training in these areas or need solutions to problems you have with them, please get in touch or visit Brian's Web site.

Brian authored a Borland Pascal problem-solving book in 1994 and occasionally acts as a Technical Editor for Wiley (previously Sybex); he was the Technical Editor for Mastering Delphi 7 and Mastering Delphi 2005 and also contributed a chapter to Delphi for .NET Developer Guide. Brian is a regular columnist in The Delphi Magazine and has had numerous articles published in Developer's Review, Computing, Delphi Developer's Journal and EXE Magazine. He was nominated for the Spirit of Delphi 2000 award.


Back to top