First Look: AppGen

by Dave Harms

Published 2008-10-22    Printer-friendly version

Advertisement

The Clarion Reference Library

Programming Objects In Clarion

Programming Objects in Clarion is a special Clarion Magazine edition of Russ Eggen's widely-acclaimed book on object-oriented programming and ABC. 250 pages.

Buy Now!

Yesterday SoftVelocity released the new Clarion 7 Application Generator to third party vendors for compatibility testing. Naturally, the third party vendors were very happy; a few individuals outside that group were disappointed not to be included. But I think it was a good choice to let the vendors beat on the new AppGen first, not just to ensure their templates are ready for the CSP beta but also to flush out the first round of bugs.

And there are some bugs, to be sure. I've managed to crash C7 a few times already, as have others. But, like the first IDE release, this is a remarkably stable product, and I don't think it will be long before it's released to the rest of the beta program participants.

Why should I care?

I've heard a few developers say they don't really care about C7 because it doesn't offer them anything they can't get in C6. This is true in the same way that a Bugatti Veyron offers no significant advantage over a Chrysler Minivan, inasmuch as they both have four wheels and an engine.

The problem is that there isn't one absolute killer feature in C7. Rather, there are a bunch of small to medium-size features that, put together, make for an enormous gain in productivity and ease of use. But it's hard to grasp the full significance of the sum of these features until you spend a little time actually using C7.

Goodies in C7 include, but are not limited to:

  • A real editor with actual undo, regex search, etc.
  • Code folding
  • Color syntax in the embeditor
  • A flatter user interface (not as flat as I had hoped, but very much better than it was, as I'll illustrate later)
  • RTL improvements, including ClearType and Unicode support, styled menus, tabbed MDI windows
  • The ability to generate and compile using earlier versions of Clarion (that is, the APP/DCT get migrated to C7 format, but in all other respects you have an app that is C5.5 or whatever version (back to C4 I think).
  • IDE is no longer 16 bit so will run on Vista 64
  • Multi-application solutions
  • A much richer and highly customizable IDE
  • The file schema pad
  • Alignment helpers in the window designer
  • Significantly faster code generation and compilation (for the SCHOOL app gen/compile time dropped by about 40%)

No doubt there's a bunch of other stuff I can't recall at the moment. I won't touch on all these points in this article; rather I'll try to give you an overall impression of the new AppGen.

New skin, same bones

In many ways the C7 AppGen looks much like the C6 AppGen. Figure 1 shows the C6 IDE with the SCHOOL app open; Figure 2 shows the same app in C7, using the default IDE layout. Figure 3 is a closeup of the AppGen pad, squished a little to fit on the page without resizing.

Figure 1. SCHOOL.APP in C6 (view full size image)
Figure 2. SCHOOL.APP in C7 (view full size image)

In Figure 2, take note of the various tabbed areas. On the left side you have the Project pad, but this area (in the default layout) is also used to display the Toolbox (which is active when you're in a window or report designer), the Class pad (handy for navigating), and the App pad (like the Project pad but showing only APP files). On the right side you have the Properties pad, which is active at various times, including when you're in a window or report designer, and below that the File Schema pad, which lists files and variables for the selected procedure. At the bottom of the IDE you have a variety of informational pads, including Errors, Output, Task List, Bookmarks, and Search Results. I have no idea what Definition View is for.

Figure 3. SCHOOL..APP in C7 - AppGen pad only

In Figure 3 note the tabs across the top, which provide access to global app settings, and the buttons down the right which for the most part correspond to the buttons in the procedure properties window in C6. This is the first click saved, as you can go directly to, say, the window or embeds without having to go to procedure properties first.

If you click on one of these buttons, such as Embeds, you'll see the window shown in Figure 4. Note that each of the buttons in Figure 3, with the exception of Formulas, is now represented by a tab. The tabs make it easy to navigate to the different areas with a single click, as compared to having to drill down, then save, then drill down again.

Figure 4. Procedure details.

There's one oddity here, however. If you click on the Window tab you'll see Figure 5. The default is to show just the window text. You'll need to click on the Designer button to see the window designer (Figure 6).

Figure 5. The Window tab.
Figure 6. The window designer

You can set the designer view as the default, but if you do whenever you click on the Window tab you'll need to exit the window designer to regain access to your tabs.

While I'm in the window designer I should point out the new alignment helpers. Figure 7 shows the window formatter displaying an update form. I've just grabbed the entry field under the cursor and I've moved it slightly. As I move the entry field (or any other control) around the window, the formatter displays alignment lines. These lines indicate when any side of the control I'm moving aligns with any side of any other control. In this case the entry field aligns with the top of the prompt to the left and the string to the right, and with the left edge of the entry control below.

Figure 7. Moving controls in the window formatter.

The designer also snaps controls to these alignment lines, making it dead easy to put the controls where you want them.

There's another kind of snap line for spacing between controls. Figure 8 shows a prompt moved close to the left side of the window and the prompt just above. In both cases a short line perpendicular to the side of the control appears indicating the minimum distance has been reached.

Figure 8. Snapping to minimum distances between controls

You can now drag and drop fields/variables, controls and control templates onto the window; in C6 you click once (or more) to select and click again to place.

Embed points

Embed points work as you'd expect, but with one very important bonus. The procedure-wide embed editor, PWEE (a.k.a. the embeditor), now features color syntax (Figure 9).

Figure 9. Color syntax in the embeditor.

If you've ever done work in the embeditor before you've probably suffered from eyestrain trying to differentiate embed comments from code. Color syntax takes care of the problem completely. As an aside, it's quite easy to not only specify the colors you want in C7 but to define your own syntax coloring rules. For instance, I've set up a few simple rules that make template writing a joy, so far as template writing can ever be that.

As Figure 9 also indicates, the embeditor includes code folding, but at present settings are not preserved between sessions. With straight source code the editor remembers code folding as returns you to your previous location the next time you open the file. It would be nice to see this done for the embeditor as well.

There's a great deal more I could say about C7 (and will say in the coming weeks and months) but for now I just want to touch on two more points: multiple Clarion versions and the flatness of the IDE.

Multiple Clarion versions

In order to open a C6 (or earlier, I assume) app in C7, that app (and any dictionary) must be converted to the C7 format. But conversion to C7 isn't the same thing as migration to C7.

Conversion simply means the APP (and if present, the DCT) is converted to the C7 file format, after which it cannot be read by a previous version of Clarion.

Migration means generating that application with C7 templates and compiling with the C7 compiler.

One of the truly wonderful features of the new IDE is that after converting the APP and DCT to C7 you can, if you wish, maintain that application using the compiler, templates, source files, libraries and DLLs from a previous version of Clarion. You can even switch back and forth. I've done with several times with the SCHOOL application, first generating and compiling it as a C7 application, then as a C6 application, and once again as a C7 application again.

C7's installation program detects eligible existing versions of Clarion and installs them in the IDE. To apply a version of Clarion you choose Build | Set Clarion version, and choose the version of Clarion you want. You will need to register the templates for that version of Clarion if you haven't already done so. Then open the APP and you're in business.

IDE flatness

In the early days following the initial C7 announcement much was made of the flatness we could expect in the new IDE. I'm not sure that vision has been fully realized, but there's definitely less mouse clicking involved. Just as importantly, the new IDE is less modal than the old IDE.

Case in point: I loaded up the HowTo-ABC browse sample application, and encountered one compile error due to an empty ICON attribute. In C6, and in C7, an error in a window structure won't take you to an embed point; instead, you'll get the option to go see the offending generated source code. In C6 that window is a modal window. You have to exit to get back to the application tree to fix the problem, by which time (if you're like me) you may have forgotten the name of the procedure and the offending line of code. In C7 I similarly loaded up the source containing the error, but left the source window open for reference while I navigated to the procedure in question. I was still able to switch between the AppGen window and the source window when I had the window designer open. That kind of flexibility is most welcome.

Summary

In short, the new AppGen works. Not all the time, of course - this is a beta after all. But it's also quite possible to have a session whereby you open an application, make changes, generate the code, compile and run and have everything work perfectly. AppGen is well on its way.

There's a great deal about the AppGen I haven't touched on, and much of that has to do with IDE enhancements such as the Property Pad and the File Schema Pad. As well, the ability to have solutions containing multiple APPs (as in multi-DLL applications) is of great value to many developers. Beyond AppGen, improvements to the RTL make it possible to deliver a more sophisticated and visually pleasing user interface. Unicode support is finally here, and at last we have an IDE that runs on 64 bit Windows. (And as Steve Parker pointed out to me, because of C7's support for multiple Clarion versions you can go ahead and install your older Clarion versions on Vista 64 and make use of them even though the IDEs themselves won't run.)

Stay tuned...


David Harms is an independent software developer and the editor and publisher of Clarion Magazine. He is also co-author with Ross Santos of Developing Clarion for Windows Applications, published by SAMS (1995), and has written or co-written several Java books. David is a member of the American Society of Journalists and Authors (ASJA).

Printer-friendly version

Reader Comments

Posted on Thursday, October 23, 2008 by Stephen Ryan

Well done SV. Use the new Clarion sharp on all new projects.

 

Posted on Thursday, October 23, 2008 by douglas johnson

David,

Might you touch on how a .red file is handled? If multiple apps are open, is only one .red file in effect?

 

 

Posted on Thursday, October 23, 2008 by Dave Harms

Douglas,

Redirection files are handled pretty much the same way as in previous versions (although there is now an INCLUDE directive).

AFAIK you can't have two apps in one solution that use different Clarion versions, so if you've set the version to, say, C6 then the C6 RED applies to all the apps in the solution. And of course you can still have local RED files in the app directories.

Dave

 

Posted on Thursday, October 23, 2008 by Scott Ferrett

The redirection system works on a version and directory basis.  So if you are building a solution using Clarion 6 and that solution consists of 2 apps in different directories, then you can have a C60EE.RED file in each directory.  The redirection file in effect depends on which app you have active.

One feature of C7 is the INCLUDE directive.  With this you can include other redirection files.  Note that you can use this feature of the c7 redirection system even when working with older versions of clarion (although you will have to enable this via the Tools/Options/Clarion/Versions screen for versions before C7. Another thing you can do is change the name of the redirection file.  So if you change the name of the redirection file for C6 to C60FromC7.red and enable include you can then have a a C7 system that does not clash with your C6 system but has the power of the C7 system.


 

Posted on Thursday, October 23, 2008 by Philip Prohm

In Figure 3, Tree Mode is a droplist. In the 16-bit IDE, changing the View in the Application Tree Dialog is move-click (or Ctrl+Tab). However, in the 32-bit IDE, changing the Tree Mode is move-click-move-click, a step backward.

Can the droplist please be changed to a listbox (reinstating move-click)? There's room for a listbox. Thanks. Ctrl+Tab would also be good if it's not there already.

While I'm here: I hope maximum keyboard functionality is maintained. While a mouse has its moments, when you have two hands on the keyboard you want to be able to do things via key-combinations not take a hand off the keyboard just to use a mouse.

Lack of 32-bit IDE was my biggest gripe so goodonyer SV for fixing this shortcoming.

 

Posted on Friday, October 24, 2008 by Bruce Johnson

Hi Philip,

There is a button on the app's toolbar, the last one on the right, which "toggles" between the last 2 modes you used. So for example, I find myself oscillating mostly between say Module View, and Procedure view, then this button can do that.

Or if I'm oscillating between Date-Modified view and Procedure view it does that too.

Perhaps not as east as C6, but it's a bit quicker than only using the drop-down.

Cheers
Bruce

 

Posted on Friday, October 24, 2008 by Randy Rogers

Hi Dave
Thanks for the article.  Yes lots of nice little things but I saw no mention of built-in, out-of-the-box support (like VB eg) for COM objects.  Is this important bit still missing from Clarion7?  Do I still need to write COM wrapper classes to use com objects?
Randy

 

Posted on Friday, October 24, 2008 by Dave Harms

Randy,

I don't use VB so I'm not sure what you're expecting, but COM support looks similar to C6 from what I can see. Perhaps someone with more COM experience can jump in here.

Dave

 

Posted on Friday, October 24, 2008 by Jane Fleming

Thanks, Dave :)

Question -
"C7's installation program detects eligible existing versions of Clarion and installs them in the IDE."
How does that detection work for those of us who are running C6 in VMWare in Vista 64 but want to run the new IDE/Appgen natively?  
Is it just a matter of installing C6 in the host machine and not attempting to run the C6 IDE?

 

Posted on Friday, October 24, 2008 by Dave Harms

Jane,

Pretty much, although I did find with 6.3 that I couldn't register the templates right away. I copied across my working C6 folder from a 32 bit machine and all was well (although perhaps just restarting the C7 IDE would have accomplished the same thing).

Dave

 

Posted on Saturday, October 25, 2008 by Rakesh Khatri

Dave -

Are there template enhancements to handle Classes created in App to be exported. Currently in a multi dll app, class declarations are not exported. You have to manually created export list etc. Any change in this area?

Rakesh

 

Posted on Monday, October 27, 2008 by Dave Harms

Rakesh,

I'm not aware of any enhancements to the templates regarding class exports as of the current beta.

Re exporting classes you may want to have a look at Ben Dell's article at http://www.clarionmag.com/cmag/v10/v10n06classdll.html

Dave

To add a comment to this article you must log in.

 
 

Search

 

Advanced Search
Topical Index

Related Articles

Subscribe to
ClarionMag

One year: $159

(includes all back issues since '99)

Renewals from $109

Two years: $249

Renewals from $199

More Info

Subscribe Now!

ClarionMag Blog

RSS Feeds

Updates via Email

Enter your Email


Powered by FeedBlitz

Quick Links