Clarion programming language
From Free net encyclopedia
Clarion is a 4GL programming language and Integrated Development Environment from SoftVelocity used to program database applications. It is compatible with several database formats including all SQL, ADO, and XML, and can output to HTML, XML, plaintext, and PDF, among others. As of the time of writing (2006), Clarion is on version 6.3.
Database access is simple to implement, and list box formatting can be handled with easy to use WYSIWYG (What you see is what you get) formatting windows.
One of Clarion's many strong points is its use of "templates" which are used in conjunction with a code generator to produce much of the repetitive, yet 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 his/her own hand-code in the context of the template generated code.
Templates are open for developers to modify to suit their needs, and the template language, though very robust, is simple to learn. This makes the possibilities of what can be done in Clarion endless. Many companies sell third party templates to extend the functionality that comes "out of the box" with the Clarion product, as does SoftVelocity itself.
Development of templates that generate Microsoft .NET code from Clarion applications is underway at SoftVelocity, which will give Clarion developers the best of both worlds: Clarion developers will be able to program with the ease and speed they're accustomed to, and will be able to provide .NET code to clients who just have to have projects developed in Microsoft technology.
Contents |
History
The first release of the Clarion language was a DOS product called Clarion Professional Developer, or CPD. CPD was first released in April of 1986. Clarion was created by Bruce Barrington and a small team of developers. Barrington's goal was to create a language that was both compact and expressive. CPD produced pseudocode; the initial release included an interpreter, and editor, and a debugger. Initially CPD supported databases composed of DAT files, Clarion’s proprietary, and quite flexible, ISAM file format.
Clarion 1.0 required the use of a dongle, at a time when industry sentiment was turning against dongles. But Clarion also let you create royalty-free applications, which was a big plus, particularly for small, independent developers. And the dongle was gone by 1.1.
CPD version 2, released in May 1988, 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 also implemented Clarion's signature "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’s popularity grew, and a sizable number of non-programmers took to the product as well, simply because Designer made it possible to create useful database applications with very little work. CPD 2.x was an out of box database solution with everything required for screens, reports, databases and help files.
During the 1980-1995 period, Clarion competed with dBase, R:Base, Data Ease, Clipper, FoxPro, Paradox, and others. Clarion has survived while many of these are gone.
Barrington had grand plans for Clarion, including a true, multi-platform version that would run on Unix as well as Windows. In 1989, Clarion Software began a complete rewrite of the Clarion programming language. Realizing he needed outside help, 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 wizard who built the Borland empire around the $99 Turbo Pascal compiler. Niels and his team were hard at work on some terrific new compiler technology at Borland when 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).
The next release of Clarion was Clarion Database Developer 3.0 (CDD). CDD had much more sophisticated template technology, and a common database grammar combined with various database drivers which made it much easier to plug and play different databases. But CDD was, at least initially a complex and buggy product, delivered at a time when few developers were choosing new DOS tools. CDD 3.0 was nearly a complete disaster for the company.
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 bright minds 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 (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. Not so mysteriously, 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 current release is 6.3. These continue to remain 16 bit tools. This 16 bit history produce some problems using current Windows technologies (ActiveX, OCX, COM, DOC, ...)
The next major releases of Clarion will be Clarion 7 is promised to be a 32 bit and Clarion.NET. Both products will share a new .NET-based IDE, which incorporates significant parts of a licensed version of the SharpDevelop environment.
Properties
The language is somewhat like a mix of Basic, Pascal, and Cobol that is compact yet expressive. It avoids annoying requirements like Pascal's requirement that every code block is contained in a begin-end block.
Code sample (Clarion for Windows)
Absmax PROCEDURE(LONG[,] a, *LONG OutMaxX, *LONG OutMaxY),LONG ! The absolute greatest element of the matrix is returned to caller as are its positions ! Call by address is done with the * similar to C x LONG,AUTO ! Loop variable y LONG,AUTO ! Loop variable m LONG(0) ! Maximum return value CODE OutMaxX = 1 OutMaxY = 1 LOOP x = 1 TO MAXIMUM(a[],1) BY 1 LOOP y = 1 TO MAXIMUM(a[],2) BY 1 IF ABS(a[x, y]) > m m = ABS(a[x, y]) OutMaxX = x OutMaxY = y END END END RETURN m
Hello World
The simplest way to achieve this is with the built in message function that is similar to the windows messageBox().
PROGRAM MAP END CODE MESSAGE('Hello World!','Clarion') RETURN
A more real world example uses a Clarion structure to declare a window and the Clarion Accept loop to process events from that window.
PROGRAM MAP HelloProcedure PROCEDURE() END CODE HelloProcedure() RETURN HelloProcedure PROCEDURE() Window WINDOW('Clarion for Windows'),AT(,,222,116),FONT('Tahoma',8,,FONT:regular),ICON('Hey.ICO'), | SYSTEM,GRAY STRING('Hello World!'),AT(91,22),USE(?String1) BUTTON('Close'),AT(92,78,37,14),USE(?CloseBtn),LEFT END CODE OPEN(Window) ACCEPT CASE ACCEPTED() OF ?CloseBtn POST(EVENT:CloseWindow) END END CLOSE(Window) RETURN
See also
External links
- SoftVelocity
- Brady & Associates, LLC.
- Clarion Developer's Programming Resource
- French developper's programming resource
- Lindersoft, Inc.
- SealSoft Company, Russia (3rd party Developer)
- Clarion news and resource for Russian programmers
- Ingasoftplus (3rd party Developer)
- Clarion Argentina
- Davidson Software - Developer using Clarion
- VMT Software - Developer using Clarion
- Gopac SI - Clarion Solutions Provider, Mexico
- MacLean Design Graphics Limited
- [http://www.clarionmag.com/ Clarion Magazine - an online, subscription-based publication for
Clarion developers]
- Riebens Systems - Contract Programmers using Clarion in South Africa
- BoxSoft Development Inc., Canada (3rd party Developer)
- Creative Software, Colorado, USA (Accounting and Point-of-Sale Software written with Clarion)
- CarlBarnes.Com (3rd party Developer)
- Optimate Computer Systems - Developer using Clarion
- Dev Dawn A Group of Developers and Their Take on ... Development
- RADFusion, Inc. Clarion custom development, consulting and education
- Programming Objects in Clarion A book about Clarion development
- CapeSoft.com 3rd party Developers
- ClarionShop.com The place to buy all your Clarion 3rd party tools and accessories
- Genawise Pty Ltd - Developer using Clarion
- Auratek International (ClarionTools) 3rd party Clarion Templates and Wizard Product Developers
- KlariSoft - Tools and templates for Clarion developers
- BG SoftFactory, Inc. - Clarion training via Streaming OnDemand Videos
- Data Equity LLC - Sophisticated Analysis, Reporting and QC for Clarion APPs and DCTs
- Win-IT - Developers using Clarion, United Kingdom & South Africade:Clarion (Programmiersprache)
es:Clarion fr:Clarion pl:Clarion fi:Clarion (ohjelmointikieli)