Clarion (programming language)

From Wikipedia, the free encyclopedia

Clarion
Latest release 6.3 / 2006-01-18
OS Microsoft Windows
Genre Integrated development environment
Website www.softvelocity.com

Clarion is a 4GL programming language and Integrated Development Environment from SoftVelocity used to program database applications. It is compatible with ISAM, SQL and ADO data access methods, reads and writes several flat file desktop database formats including ASCII, CSV, DOS (Binary), FoxPro, Clipper, dBase, or all SQL RDBMS databases via ODBC, MS SQL Server, Sybase SQLAnywhere and Oracle through the use of accelerated native database drivers, and XML, Clarion can be used to output to HTML, XML, plaintext, and PDF, among others.

One of the Clarion Development Environment's primary features is its use of "templates" which are used in conjunction with a code generator (named AppGen) to produce much of the repetitive, time consuming code that is typically required when producing an application. An "embeditor" shows the developer the code that will be generated and embed points where the developer can enter their own hand-code in the context of the template generated code.


Contents

[edit] Notability

Clarion is historically notable as being one of the first computer languages for MS-DOS that provided a 4GL screen painter, report writer and native database access.

It is also notable as being an early (although primitive) Computer-aided software engineering tool for MS-DOS with support for defining relationships between data and automatically generating application code.

Its native database interaction was also unusual at a time when most languages required the use of add-on software to interact with database files and index files.

Later on, its early Microsoft Windows releases were historically notable for providing a screen painter and report writer. At a time, most programming languages for MS-Windows required you to write code to create each screen.

[edit] History

The first release of the Clarion language was a DOS product called Clarion 1.0 and was first released in April of 1986. Clarion was created by Bruce Barrington, one of the founders of healthcare firm HBO & Company (now McKesson), and a small team of developers. Barrington's goal was to create a language that would be compact and expressive, and would maximize the use of the memory-mapped screen of the IBM PC by creating a screen designer. Version 1 produced pseudocode; the initial release included a screen designer, an interpreter, an editor, and a debugger. Initially it supported databases composed of DAT files and Clarion’s proprietary ISAM file format. Bruce Barrington formed Barrington Systems and released version 1.0.

Clarion 1.0 required the use of a dongle, at a time when industry sentiment was turning against dongles, which was offset by the ability to create royalty-free applications. However the dongle was removed with the release of 1.1.

Version 2.0, released in May 1988, was known as Clarion Professional Developer, or CPD, and included a component called Designer, which incorporated a data dictionary. CPD generated Clarion code based on the contents of that dictionary and a template called a "model file." Because the model file was a text file, it could be modified (in limited ways) to create custom code. The model file was implemented with the "browse and form" paradigm, where data is initially displayed to the user in list box, and updating is done via a form called via buttons associated with the list. Designer created all the essential of the CRUD (create, read, update, delete) code, and developers could enhance functionality by inserting code at specified points in the generated code, or by hand-coding new procedures. Clarion Professional Developer also introduced Language Extension Modules (LEMs), that could extend the Clarion language using modules compiled in other languages that were built to the LEM format. Clarion Software and many third-party tool developers created LEMs for all purposes, including an extension for connecting to other databases such as dBase, Clipper and Paradox.

CPD 2.x was a database solution with everything required for screens, reports, databases and help files. A version of Clarion 2.x for end-users, Clarion Personal Developer, was also released just for the business user creating his own personal applications. Around the same time period, Clarion released Clarion Report Writer. This was created as both a stand-alone product for end-users of Clarion Personal Developer and users of programs written by developers with CPD, and as a built-in program bundled with Clarion Professional Developer version 2.1.

In 1991 Barrington licensed compiler technology from a small company called Jensen & Partners International (JPI).

JPI was founded in 1987 by Niels Jensen, who had earlier (1979 or 1981) been one of the founders of Borland. Philippe Kahn was the marketing personel who built Borland around the $99 Turbo Pascal compiler. Niels and his team were working on a new compiler technology at Borland when Philippe Kahn decided to buy Wizard C, and call it Turbo C. Niels and several other developers left Borland and started JPI, where they continued to work on their compiler technology, christened TopSpeed, which they bought from Borland for $1.7 million. All the TopSpeed compilers, including Pascal, C, C++ and Modula 2, created compatible binary code, so you could mix and match languages within a single application (a capability .NET would make mainstream a few decades later).

Clarion Database Developer 3.0 (CDD) was soon released. It was a revolutionary product adding many features and technology that could create programs with a “Windows like” CUA (Common User Access) user interface. Much of the CDD changes fit well into the Windows programming paradigm and laid the ground work for the future Clarion for Windows product.

The CDD IDE was completely new and based on the JPI IDE. It included many professional programmer quality tools: editor, project system, compiler, linker, visual debugger. Gone was the p-code of CPD. The JPI compiler for the Clarion language produced true machine code EXEs, LIBs and DLLs. Binaries could be compiled for Protected Mode allowing DOS programs to use extended memory breaking the 640KB barrier.

The Clarion 3.0 language was enhanced in many ways, e.g: new data types (CSTRING, PSTRING, DATE, TIME, USHORT, ULONG), file driver system (e.g. Btrieve, Clarion, Dbase, FoxPro, Paradox), queues (tables) were enhanced, screen processing was enhanced for CUA. Code generation by Models was replaced by “templates” that had more features and were extensible. This allowed generation of much more robust and complex code.

With all this new power came complexity. Many existing users found the transition to CDD difficult. CPD was simple and easy to use which attracted many non-programmers that could build programs by answering questions. CDD was more suited to professional programmers. Programs could still be developed as easily, but the size and vast features of the IDE made it appear complex.

The first 5 patch releases of CDD were buggy to the point of being unusable, which caused so many users to abandon the product that it was nearly a complete disaster for the company. Clarion kept working on CDD and by version 3.007 it was usable.

Version 3.1 named Clarion for DOS (CFD) was released in 1995. This proved much more stable, but by this time there was little interest in DOS development tools. A significant feature was the TopSpeed file driver, an ISAM file format allowing all indexes and multiple data files to be contained in one disk file.

During this time the relationship between Clarion Software and JPI grew closer, and on April 30, 1992, Clarion merged with JPI to form an entity which would eventually be called TopSpeed Corporation.

The employees at the TopSpeed Development Centre in London went to work on CDD and ironed out many of the bugs. And they went to work on the first release of Clarion for Windows, more commonly known as CW 1.0 (although later releases would drop the "for Windows" part of the name).

Clarion for Windows version 2 added object orientation to the language, including inheritance and interfaces. TopSpeed elected to skip the dreaded version number three (the official explanation was that CW 1.5 "should have been CW 2.0," so CW 2.0 "should have been CW 3.0", so let’s just call the next one version 4). Clarion 4 (no longer “Clarion for Windows”) also came with a new template set and class library called “ABC”. The original template set generated procedural code, which was becoming increasingly complex. The ABC template set generated far less code, and leveraged the class library, which contained most of the actual logic for windows, browses, forms, etc.

Clarion’s 6.3 release is mainly a 16-bit tool. This 16-bit history produced some problems using current Windows technologies (ActiveX, OCX, COM, DOC, ...) however note that the series 6.x of Clarion produces native win32 executables (32-bit exes and/or dlls). Previous versions produced both 16-bit and 32-bit executables, the 16-bit support was dropped from the end-user product with version 6.0 of Clarion.

Clarion's newest release is called Clarion .NET or Clarion#, an implementation of the Clarion programming language that runs on the .NET Framework [1].

[edit] Properties

The programming language is similar to Basic, Pascal, and Cobol. It avoids requirements like Pascal's requirement that every code block is contained in a begin-end block. Like Cobol, Clarion separates data declarations from code. The language was designed to make writing business database applications simple.

Clarion is somewhat unique from many mainstream languages in having data file access, window and report structures, and printing commands built into the language. This allows much more flexibility compared to using a report generator.

[edit] Drawbacks

Currently there is a lack of a 32 bit development environment that allows design time expression of OCXs or other COM components. The 16 bit development environment does not allow the developer to work on more than one application at a time and restricts certain functionality through the use of system modal windows. This limitation can be worked around under Windows NT by running the IDE in a separate memory space and changing the IDE setup to Multiuser developer. This allows multiple copies of the IDE to be running with different apps opens. Only one 32 bit build session (compile/link) can be running.

There are also limitations to the number of controls that can be populated in the IDE window or report formatter due to constraints imposed by memory pool size relative to 16 bit architecture. The 32 bit compiler can handle much larger structures. Along with the lack of being able to generate .Net, and being only capable of generating Win32 applications. However some of these drawbacks are due to be addressed in updated versions.

  • Note This info is now out of date Clarion 7 boasts a 32 bit IDE based on the Sharpdevelope IDE however this as yet does not have the AppGen component. See www.softvelocity.com

[edit] See also

Modula-2

[edit] References

[edit] External links