I’m hardcore .NET developer having 10+ years of experience. Recently got an assignment from my organization in existing Clarion 6 application and I don’t have any knowledge on the Clarion basics.
Can someone help me to understand the basics of Clarion 6 application in terms of .NET applications? i.e. where general configuration goes, what are the modules, what are the actual applications called?, etc.
One thing that might streamline your journey to make sense of Clarion would be to upgrade to the latest version. You can still compile in C6, but you would have a solution explorer that might seem a lot more familiar than that of C6 and you’d be able to take advantage of code completion and lots of other features that aren’t in C6’s IDE. Although it compiles 32-bit executables, the C6 IDE is 16 bit and can only be operated in a Win32 environment.
But updating Clarion from C6 would not be free of its own set of complications, so you’d have to weigh the benefits. If your app uses the application generator (.app/dct files using templates), then the C6 template chain would need an update that you can get from SV. And some 3rd party and/or in-house templates could need updating as well.
A lot of us are less familiar with the C6 IDE than we used to be, so there’s that too.
Clarion 6 was obsolete a long time ago. It was superceeded with a new IDE by clarion 7 in like 2008 (?). That took some time to stabilise, but by 2012 it was (mostly) gone. We retired all support for it in 2013.
The new IDE (currently Clarion 11) has the ability to compile using the Clarion 6 compiler, classes, runtime etc. In other words you can use the C11 IDE, while making a byte compatible version of your existing program. There were some minor changes to C6 to make this work, but SoftVelocity should be able you help you with that.
In terms of general advice on using C6, well, ive forgotten most of it. Basically the last time i used it was before you even thought about becoming a programmer. If you have specific questions then some might remember, but i think youll find community support for that is hard.
Clarion 11 support is basically good until Clarion 12 comes out. Which may be later this year. or not. We’ll see. SoftVelocity is the only “official” support, but there are plenty of unofficial support resources, including clarionhub, clarionlive, newsgroups, skype-chats and so on.
The migration from C6 to C11 might be straight-forward. Or tricky. It depends on the size, scope, and complexity of your program. For most apps’s it’s simple, but the more exotic your app, and the more defunct 3rd partly DLL’s you use, the more complicated it gets.
I usually recommend companies that are not familiar with C11 to get someone who is in as a consult, to properly scope the job. They’ll be able to look at your C6 system, understand the dependencies, and give a proper analysis of how complicated an upgrade is likely to be.
Typically for a small application you have an .APP and a .DCT. The Dct describes you data sources, which can be ASCII files that you write to, ISAM files, and tables that reside on a SQL server somewhere. It also describes the default controls that will be used for each field/column in the data sources.
The .APP file will contain the information that you need to produce an executable. For larger programs the program may be split into parts, with each APP producing a DLL. In the app you will have a bunch of procedures, most of which will have been initiated by a particular template, like a form or a browse template.
Producing the executable is a two-step process. First the “generation” process creates clarion code (in .CLW files) based on information from the template and from all the stuff that the programmer has specified for that procedure, and then the Clarion code is compiled. Modules can contain one or several procedures.
The programmer input for a particular procedure consists of:
specifying the “files” data sources that it will use
designing the screen that the user will see, which has controls that are most often attached to fields/columns declared in the dictionary
filling in prompts in the “Action” buttons attached to control templates
adding Clarion code in “embeds”
The templates come in two versions: the ABC templates, which rely heavily on the ABC classes that you can find in the libsrc directory, and the Clarion/Legacy templates, where the templates produce a lot more code in the generation process.
It is very easy to generate a standard browse/form application in Clarion. But when you need some special behaviour, it will take you a while to figure out which embed points are the ones that will get your special requirement to happen when you want it to.
Of course, you can also write a program entirely in source code if you want. In which case the templates play no part.
That’s the basics. Doesn’t really match what you asked in your question. “General configuration” doesn’t compute; modules exist, but are mostly unimportant. You can call the applications you produce whatever you want. The main clarion application is called Clarion.exe and provides you withe IDE for working with dcts, apps and source files.
This is really helpful and clears most of the basics. I looked into our application based on your comments and now I could co-relate most of the things. One more question - What would be the best way to migrate application to the latest version?
Is there any tool to migrate C6 to C11?
Or I need to create a new application in C11 and then copy-past the C6 files manually?
In addition to what Bruce said, the templates are important.
Templates are essentially scripts that tell the system to generate code based on the information in the .app and .dct
The templates are a very very powerful tool and generate a lot of code for you. In addition, as noted above, you can ‘embed’ your own code into the stream of generation, and that can change based on the templates.
If you want to move to Clarion 11, you need to have all the appropriate templates used by the application in their C11 version. Note that there can be a LOT of backward compatibility here. I have templates that I’ve been using since C6 and they still work.
You’re probably familiar with code generation from .net. Clarion takes it to another level, because we generate all the time. Not just to create a starting point.
I believe that any worthwhile Clarion 6 application uses a variety of dll’s that are no longer available. So the only alternative is to do an analysis of the functionality of such dll’s and find suitable substitutes.
Finally, transfer the functionality of the application from c6 to c11 by procedures following the flow of the complete program.
A) dlls written in a language not clarion. (Technically speaking, Dlls which do not link to the clarion RTL). Thse can be used as-is.
B) Clarion Dlls which are available for C11. For example any CapeSoft Dlls (which are obviously still maintained. )
C) Clarion-based Dlls which are no longer maintained. In some cases the source is available (PowerBrowse for example) and can be recompiled. In other cases their functionality has to be replaced.
Only Dlls in category C are a problem. And to be honest, theres not a lot of them around. Some, but not a lot.
 we identified this issue in the year 2000, and have not produced a new product with a DLL since then. I’m also activly working to reduce the number of products with clarion-compiled Dlls with upgrades that remove the compiled dll from the system. There are a few left, but each year the list gets shorter.
The nice thing about black boxes was that you could leave your socks strewn on the floor and most people wouldn’t see it.
Unfortunately, it is easier to seal off the room than to spend a day picking up socks.
That’s part of it, although so far it’s not been tooo bad… some comments need removing etc.
The bigger issue is that (the ones that are left) are “function libraries” - not “class libraries”. It’s a little trickier to make that transition “smooth” for end users.