Clarion 10 under the hood, Part 1

by Unknown user

The first betas of Clarion 10 are now in the hands of participating third party folks and other developers. 

What's new

We've previously published Bob Z's list of new features in Clarion 10 from the ClarionLive webinar. The What's New document in Clarion 10 lists many of the same features plus a few more:

  • New templates for Sending Emails, Emailing Reports, and Sending SMS (Text) messages. The old implementation continues to ship for backward compatibility.
  • Web Requests (PUT, GET, POST, DELETE) via HTTP/HTTPS - an easy way to send HTTP web requests (and receive responses) to Web Servers, REST Web Services, or standard Web Services, with the most commonly used HTTP verbs; POST, GET, PUT, and DELETE.
  • TCP Networking - Client/Server communications (templates to come in a later release). Connect to server, Send Message/Command, Send Shutdown Notification, Send Data packet with confirmation, Server (Listen and Send), QuickAppConnectClass and methods.
  • Amazon Simple Storage Service (Amazon S3). Cloud data for your apps. 
  • JSON Class improvements (JSON support has been around since 9.0)
  • Image manipulation functions: ImageToPNG, ImageRotateFlip, ImageSaveThumbnail
  • WorkingThreadManager Class allows you to run a PROCEDURE on a background thread without any UI, and receive events on its status. Templates to come include: Start a background Procedure, Pause a background Procedure, Restart a paused background Procedure, Cancel a background Procedure.
  • Dictionary Global Search and Replace
  • A new exception (GPF) log viewer
  • A new scanner for the Clarion (CLW) compiler (Mark Goldberg has reported massively faster compiles)
  • Project System adds support for file copying
  • Option to have the %FILE Template symbol return files in the same order that they are displayed in the dictionary editor. This means that some lists of files inside the application generator will appear the same as the dictionary editor. Note: If you use LIKE in your file structures the changed order of generated FILEs could possibly cause compiler errors.
  • Lock Retries - you can now set how many times generator tries to gain access to a file in the Application Options window. This option can be useful in situations where automatic backups are running and briefly locking files.
  • Template Registry version identifiers. For example, Clarion 10 by default uses the name TemplateRegistry10.trf.
  • The Dictionary Editor now remembers dialog sizes and positions.
  • The Dictionary Editor now stops you from adding GROUP fields to keys of SQL tables
  • The Dictionary Editor now stops you from adding dimensioned fields to a key
  • ClarionCL /rt switch to trace file location using the redirection system
  • MSSQL Driver adds SCOPE_IDENTITY support
  • SQL drivers report more error detail when you try to define a KEY whose component is a GROUP
  • When you select "Open Containing Folder" from the context menu of the tab for a document in the IDE it now highlights the file in the opened folder
  • Text editor's Find All runs in the background 

Look and feel

The look and feel of the IDE is pretty much the same as it is for Clarion 9. Here's a comparison, with C9 above and C10 below. 

New files

One of the first things I do with any new Clarion release is compare the install files with those from the previous release. 

Here are some of the interesting new files:

bin\Addins\DisplayBindings\ExceptionLogViewer

Presumably this is the log viewer mentioned in the release notes. The log viewer is a handy utility that can help you find the location of GPFs in your code. For instance, I induced a null reference GPF in the JSON example app, saved the GPF info to a log file, then opened the GPF log in the viewer (from the Tools menu). 

If you've compiled in debug mode then what you'll see is pretty much the same as you'd get if you were running your app using the debug version of ClaRUN.dll.

However if you're in release mode the exceptionlog viewer does give you information you'd otherwise have to find by painstakingly tracing addresses as found in the map file. Here's the GPF when I compile in release mode:

That's not particularly helpful. But if I click on Log Info and open the resulting log file in the exception viewer I get this:

That tells me that the GPF has something to do with the JSONDataClass's ClearObject method, and the calling code is in TakeEvent, which is a big step toward finding the cause of my GPF.

bin\awssdk.dll
LibSrc\win\ClaAwsS3.clw
LibSrc\win\ClaAwsS3.inc

These files are for Amazon S3 support, and awssdk.dll is the Amazon Web Services SDK DLL. It's also a .NET DLL, which pretty strongly suggests that Clarion's new support for Amazon S3 comes via some interop. It also suggests that if you want to use the S3 support your customers will need .NET 3.5 installed. 

 

Speaking of .NET versions, it's been pointed out in the new Clarion 10 newsgroup that the install now requires .NET 4.

bin\Cladbrun.dll

This appears to be 32 bit debugger code extracted into a DLL.

bin\IPReq.exe

I don't see IPReq.exe in my previous installs. The properties say it's the IP Server Requestor. Perhaps this is for H5... 

LibSrc\win\CWSYNCLP.CLW
LibSrc\win\CWSYNCWT.CLW
LibSrc\win\CWSYNCWT.INC

These files are in support of the new background worker thread.

LibSrc\win\QuickSock.CLW
LibSrc\win\QuickSock.INC

Contain code for QuickSocketClass and QuickAppConnectClass, for TCP communication. Much of this code is commented out. 

template\win\H5.TPL
template\win\H5GROUP.TPW

H5 is SoftVelocity's still-in-early-development tooling for a new way to create web applications with the AppGen. The first H5 source files showed up in Clarion 9.1, but this is the first release of a template that I'm aware of. H5.TPL contains an application extension and a procedure extension. No word yet on whether it's ready for experimentation or how to use it. In the C10 newsgroup Bob Zaunere stated "H5 is a WIP not ready for testing yet".

Changed files

 Besides all the binary file changes you'd expect there are a number of source and template files that have been modified:

LibSrc\win\abapi.clw
LibSrc\win\abprpdf.clw
LibSrc\win\ABPRPDF.INC
LibSrc\win\brwext.clw
LibSrc\win\ClaMail.CLW
LibSrc\win\ClaMail.INC
LibSrc\win\ClaRunExt.CLW
LibSrc\win\ClaRunExt.INC
LibSrc\win\EFOCUS.CLW
LibSrc\win\equates.clw
LibSrc\win\H5BROKER.INC
LibSrc\win\H5CLIENT.INC
LibSrc\win\H5CNTRLS.INC
LibSrc\win\H5HTML.INC
LibSrc\win\H5HTTP.INC
LibSrc\win\H5JSL.INC
LibSrc\win\H5LAYOUT.INC
LibSrc\win\H5REPORT.INC
LibSrc\win\H5SERVER.INC
LibSrc\win\H5WINDOW.INC
LibSrc\win\ICBROKER.INC
LibSrc\win\ICCLIENT.INC
LibSrc\win\ICCNTRLS.INC
LibSrc\win\ICHTML.INC
LibSrc\win\ICHTTP.INC
LibSrc\win\ICJSL.INC
LibSrc\win\ICLAYOUT.INC
LibSrc\win\ICREPORT.INC
LibSrc\win\ICSERVER.INC
LibSrc\win\ICWINDOW.INC
LibSrc\win\JSON.CLW
LibSrc\win\JSON.INC
LibSrc\win\property.clw
LibSrc\win\QuickXMLParser.clw
LibSrc\win\QuickXMLParser.inc
LibSrc\win\svapifnc.inc
LibSrc\win\WINSOCK.INC
template\win\ABBROWSE.TPW
template\win\ClaTalk.TPL
template\win\CTLBROW.TPW
template\win\CW.TPL
template\win\cwtriggers.tpw
template\win\ICONNECT.TPL
template\win\RELATION.TPW
template\win\rtarpdf.tpl
template\win\VistaManifest.tpw

I'll explore these changes in Part 2.