Review of Clarion for Windows
by
Shawn M. Gordon
President
S.M.Gordon & Associates

Introduction

In my relentless pursuit of the perfect MS Windows programming environment, I was recently led to a product called Clarion for Windows, by TopSpeed Corp. I was rather excited about this product based on what I had heard about it’s language, development environment, and execution speed. While it took a little work to get my demo, the sales rep was not very helpful, and I finally had to talk to the president of the company, it seems it was worth it.

I tested Clarion under Windows 3.1, as well as Windows 95, on a couple different flavors of 486 boxes.

Features

It appears that Clarion originally started life as a data base frontend tool. It is very dictionary driven, like many 4GL’s, but has a syntax that closely resembles COBOL’s formalism. This makes Clarion well suited to writing business applications, but not so well suited to trying to write something like a Word Processor. I want to focus a bit on the Clarion language itself, before I get into the visual development environment.

The Clarion language (unlike Basic) is obviously written by design, the intro on one of the manuals goes through a very interesting, and fairly lenghty, history of the devlopment of the language. The original architects talk about how they like this bit from COBOL, or that bit from MODULA, etc., and how they decided to improve on each of these ideas as they were implemented within Clarion. this approach has a significant advantage, and significant disadvantage. The advantage is that you have a modern language that isn’t based on a language designed in the 50’s or 60’s, that learns from experience of what is useful, and what isn’t. The disadvantage is that there isn’t anything you can do to be prepared for Clarion, however COBOL programmers will probably find it the easiest to get used to.

Let’s run down the Clarion development environment, and the sequence of events you would go through to build an application. First thing is to develop your data dictionary, this is similar to any other data dictionary you may have used, such as Powerhouse from Cognos. This is where you are going to define all the record structures and such necessary for your application. The data dictionary is key to Clarion’s ease of use (as a side note, the new Borland Delphi product has just added data dictionary support). You dictionary can contain all sorts of information about fields, files, indexes, keys, file relations, field validation rules, referntial integrity constraints, etc. You can also define, or use your own templates, these could almost be considered inheritable objects, but they aren’t quite that robust.

Now you can use the Application Generator to build your application for you based on your data dictionary, and the templates that you apply to the generation. This makes it a piece of cake to build standard data base access programs without writing any code, it’s easier than Delphi, and MUCH easier than Visual Basic. You can add functionality to the application by embedding source on controls,.

Now you may want to use the Window Formatter to enhance and modify your screen, by adding controls, graphics, moving things around on the screen, whatever it takes to make your interface look the way you want.

Now if you have a need for reporting, you can use the Report Formatter. The Report Formatter works in sync with the Application Generator in much the same way as the Window Formatter. You place controls in bands, header, detail, footer, trailer. At run time the print engine processes the records, handling page breaks, group breaks, headers and footers, as specified.

The Text Editor is a full function programmer’s editor in which you can handwrite source code. Typically when using the Application Generator, you’ll call the Text Editor to create embedded executable source code to customize the way a procedure operates. The Editor features color coded syntax highlighting, as most Windows code editors do today. This makes it easy to spot keywords, comments and such.

The Formula Editor help quickly generate a statment that will result in a value. You can use the Formula Editor to assign values to computed fields, conditional fields, and record filters. There is also the Project system, and the integrated debugger., which includes the ability to set break points and examine variable content.

Figure 1 shows an example of how an application framework looks like, there are various ways to look at different views of this data. Everything that you see was generated by Clarion, based on the data dictionary definitions. Figure 2 shows an example of
that same application running. Figure 3 shows a VERY small sample of the code that was generated by Clarion, and figure 4 has an example of the Report Formatter.

Clarion applications can be built for either 16 or 32 bit deployment, and as you can see from figure 2, the applications can conform to the Windows 95 interface standard under regular Windows 3.1

One of the interesting notes about Clarion, is that it shares the same backend compiler as TopSpeeds other languages, like C, C++, Pascal, and Modula-2. Basically what top speed did was design a very fast generaic compilier, and then implement a language specific environment “template” on top of it. The other half of TopSpeed is the original language development team from Borland. The history of the language at the beginning of the Language Reference manual makes for very interesting, and informative reading. It helps you understand why a lot of things are the way they are.

That gives you a raw overview of the environment, the language, and the steps involved in using Clarion. It is by no means exhaustive, especially with about 1500 pages of documentation, but it should give you a general idea.

Figure 3

!---------------------------------------------------------------------------

ProcedureReturn ROUTINE

  IF WindowOpened

    CLOSE(AppFrame)

  END

  IF LocalResponse

    GlobalResponse = LocalResponse

  ELSE

    GlobalResponse = RequestCancelled

  END

  RETURN

!---------------------------------------------------------------------------

InitializeWindow ROUTINE

  DO RefreshWindow

!---------------------------------------------------------------------------

RefreshWindow ROUTINE

  IF AppFrame{Prop:AcceptAll} THEN EXIT.

  DISPLAY()

  ForceRefresh = False

!---------------------------------------------------------------------------

SyncWindow ROUTINE

!---------------------------------------------------------------------------

Usability (also installation)

Clarion uses a standard MS Windows setup procedure, which just basically requires selecting a few options, and then swapping disk’s. I was a little suprised that a CD-ROM installation wasn’t available. The software is very easy to use, once you learn how to use it. Fortunatly the Getting Started guide does a good job of getting you up to speed, but don’t expect to be writing and accounting system your first week.

Reliability

Clarion is a stable, robust product, you wont have any problems with the reliability of the development system, or the applications created in it.

Performance

As I mentioned, Clarion uses the same backend compiler as some of TopSpeed’s other languages. This means that in general you will have applications that execute quite a bit faster than Visual Basic, and a bit slower than Delphi.

The development environment is very quick to bring up various sections of the program (unlike some Windows development tools that I have used), however loading projects and starting the application itself can be very slow, of course this is all system dependent.

Supportability (including Doc)

I never did use the direct Clarion support service. I did take advantage of the CompuServe support forum, and their web site to get information. The CIS forum is very active, and the questions I posted were promptly answered by representatives of TopSpeed.

Clarion comes with three manuals: Getting Started, Users’ Guide, and Language Reference. There are very complete, well organized, and well written. There are plenty of screen snapshots, useful tips on effective techniques, and an online global index to all three manuals. The Getting Started guide is a strong document, and is very good at getting you familiar with the environment. I have even see some 3rd party books on the language, but the ones that are included are so good I don’t know what you would need to take advantage of these 3rd party books.

Summary

Clarion wasn’t what I was expecting, but I wasn’t really sure what it was going to be. In that respect I was a bit disappointed, but I must say that Clarion really surprised me in a lot of areas. There is a fair learning curve to get going due to the newness of the language, and there is work involved in setting up your data dictionary, but once that it accomplished, you can build useful applications, very quickly, and with little or no coding.

There are some quirks, and lacks in Clarion. For example, there is no direct access to OLE Automation, it can be got by coding to the Windows API directly, but this doesn’t give you the kind of sophisticated access you would want. I imagine a 2.0 release should fix this. Then there is the scenario where you are viewing your application tree, and want to edit a module in it, instead of just double clicking on the icon, you have to hi-lite it, and the select “Edit” from the menu bar. Granted, this isn’t a big deal, but it is non-standard, and bothersome.

With that all said, I want to tell you about some of the features that are going to be coming to Clarion in the near future. OCX controls will be supported, Object extensions to the language are being added, Internet templates to allow you to easily connect a web page to a data base, and enhanced native accessory program, OLE, and a new report writer are just some of the many enhancements that will show up soon, possible by the time you read this.

I must say that if you are looking at developing Windows based business applications, Clarion is certainly worth a hard look. It is reasonable priced, very fast, has a strong development environment, multitude of data base drivers, and encourages standardization through use of of it’s data dictionary, make it very attractive. Give them a call, don’t assume that Visual Basic is the way to go.

At-a-Glance box

Clarion for Windows version 1.5

TopSpeed Corporation

800-354-5444

Comes with 3 manuals at a price of $499 per copy. Call to order, or for a free demo.