Category Archives: Clarion News

Update for 7.1

An update for 7.1 is going out today, one of the really nice improvements is this release:

FEATURE: New option in “Tools/Options/Clarion/Clarion for Windows/General” – Use lightweight parsing mode (enabled by default). Used only if project parsing is set to “Parse all hand-coded projects and only applications opened for editing”. If this option is enabled only the PROGRAM file will be parsed on project reparsing to refresh global information for code completion. Each MEMBER file will be parsed only when a procedure located within this MEMBER file is opened for editing.

What this new feature boils down to is a very noticeable improvement in performance for parsing large applications, especially when working with embedded code. There are also several other refinements for code completion, some fixes for conversion of TXRs to the the new .REPXL format (used in the new ReportWriter), and a number of other fixes. You can read the entire list here

.Net Application Generator

In this post I’ll try to provide a complete overview and our best estimate on when you’ll have this new technology in your own hands. Diego Borojovich is leading the team working on the new .Net Application Generator (AppGen.Net), and if you have attended any DevCon events over these last years then you probably have met Diego. He’s been working with Clarion for over 16 years, and joined the SoftVelocity development team 8 years ago. You’ll be hearing a lot more from Diego in blog posts in the upcoming weeks as he talks in-depth about the new AppGen.Net, the template language, and how the new code generation/template system works.

Let’s start from the top; the Code Generation engine in AppGen.Net is completely new. It has its architectural and conceptual roots in the Clarion Win32 AppGen, and that technology is blended with the functionality found in the Text Template Transformation Toolkit (T4).

The template language used in the new AppGen.Net is a complete departure from the syntax used by the templates in our Win32 Application Generator.  It uses an extended set of the T4 template directives. It’s very easy to work with the template code and templates can be used in any type of project (WinForm, WebForm, CompactForms, Web Services, etc.). And just like with our Win32 AppGen you can write templates to create any type of output that you need – CLN, CS, ASPX, HTML, SQL, XML, or anything else you need.

The syntax for the new templates is similar to what you see in an ASP.NET .ASPX source file – here’s a small snippet so that you get a feel for what it looks like:

<#@ template language=”C#” debug=”true” type=”ProcedureExtension” name = “DescriptionOutput” family = “Clarion.Linq”#>
<#@ assembly name=”mscorlib.dll” #>
<#@ assembly name=”System.dll” #>
<#@ import namespace=”System” #>
<#@ import namespace=”SoftVelocity.TextTemplating” #>
<#@ property processor=”PropertyProcessor” name=”MyDescription” type=”System.String” defaultValue=”None”#>
<#%+ CustomGlobalData priority = “1000”#>

I already mentioned that the AppGen.Net template system supports an extended set of the T4 template directives, these extended directives include equivalence for our #PROCEDURE, #CODE, #GROUP, #CONTROL, #EMBED and #AT and #EXTENSION directives as found in our Win32 template system. And you may have noticed in the first line of the template snippet where it reads “template language=C#”? In the first release, all the templates are coded in C#, but in a future release we plan to let you use any .Net language to write your own templates. The templates themselves can utilize the entire .Net Framework, including any 3rd party components, and that gives us (and you) incredible power and flexibility in the template system; meaning there are really no limits to what you can do in a template (outside of is your own imagination). If you plan on writing templates you’ll be glad to know that inside the IDE we already have T4 syntax highlighting in the editor, and in the near future we’ll be adding code completion support.

The template system has the concept of a template registry, just as we have now. But with AppGen.Net when templates are registered into the IDE they are automatically compiled into a binary assembly. Compiling the templates provides for faster code generation, immediate detection of syntax errors, and makes it easy to share templates within a team.

In the initial public release the generated data access layer will let you select from two data access frameworks; LINQ to File, and LINQ to SQL.  (It’s possible that we will also provide a template set for generating a plain ADO.NET data access)

What is LINQ to FILE?

LINQ to FILE utilizes our own LINQ provider that encapsulates an ABC-styled framework — using LINQ syntax for accessing and updating data via our underlying File Driver technology. The LINQ to FILE provider maintains referential integrity and also handles auto incrementing of keys. The LINQ to File data access layer can also utilize our managed .Net IP driver. If you’re not already familiar with LINQ syntax here is a simple example of the syntax used for retrieving data:

query? = from class in ClassesQuery    |
where class.RoomNumber < 10   |
select class

This LINQ query will retrieve all records where the column RoomNumber is less then 10, it’s really that simple. And using a LINQ query with a Where clause instead of filtering records in a Loop provides a noticeable increase in performance. Using the LINQ to File lets us work with powerful SQL-like query and update capabilities, working with all of our FILE Drivers, and integrated into the LINQ to FILE provider is functionality essentially equivalent to that in our existing ABC framework.

What Is LINQ to SQL?

LINQ to SQL is itself a light-weight ORM (object relational mapping) implementation that ships as part of .NET 3.5, that allows you to model a relational database using .NET classes.  You can then query the database using LINQ, as well as update/insert/delete data from it. LINQ to SQL supports transactions, views, and stored procedures.  The templates provide an easy way to integrate data validation and business logic rules directly into your data model.

In addition to the two LINQ frameworks we plan to add template support for working with several additional technologies for the data access layer;  options for data access will look like this:

•    LINQtoFile
•    LINQtoSQL
•    ASP.NET MVC
•    NHibernate
•    CSLA
•    ADO.Net

We also plan to have templates for supporting these technologies:

•    Windows Communication Foundation (WCF) is the .Net programming model for building service-oriented applications.
•    Web Services (for exchanging data)

And I should mention that we’re providing template sets to support the three target platforms; Winforms (desktop), WebForms (Web) and Compact Forms (Mobile devices). The templates being developed for .Net offer code generation in 2 language flavors C# and Clarion#, and eventually we’ll add VB to the list.

I want to mention a few things about the user interface generated by the templates. These are options that the templates will provide for the user interface layer:

•    Winforms (using the standard .Net Framework controls, or a designated 3rd party component set)
•    CompactForms (using the standard .Net Framework controls, or a designated 3rd party component set)
•    Webforms (using the standard .Net Framework controls, designated 3rd party component set, Ajax Library, and in the future Silverlight)
•    WPF – Windows Presentation Foundation: (using the standard .Net Framework controls, or a designated 3rd party component set)
(The WPF support will come after the initial release, and although we don’t presently have a full-blown designer, we will have UI edit capabilities, and of course you can use many different external tools to create and work on the UI as the code is completely separate from the other layers)

For creation of the UI the templates read the control settings from the Dictionary, just as we do now in the Win32 AppGen, but we plan to provide (as a configuration option) the ability to specify that the templates use an external file for control mappings, and in this file we’ll store the fully-qualified name of the control, along with its properties (i.e. font, width, height, etc.). The controls specified in the config file will map back to the controls supported in the templates for generating the UI. This feature means that you can specify the use of 3rd party components and the Template Wizards will generate the UI using those controls and properties.

Here are a few miscellaneous new features that are worthy of mention which are planned to be introduced with the new AppGen.Net:

•    Option to generate test cases (nUnit) for aspects of the APP
•    Ability to attach developer documentation/working notes directly into the .APP and/or to individual procedures

And something else exciting is coming up; we are happy to announce that the templates to power these technologies will be made part of an open collaborative community project so that anyone interested can participate in their ongoing development. This collaborative project will contain all of the new Clarion templates and sample Apps.

And this project is not just for the new .Net templates, we’ll be adding all of our Clarion templates (Win32 and .Net), as well as new example Apps. With this project the Clarion community will always have access to the very latest updates, as well as contribute patches, and add new templates and sample Apps.

Now the question at hand is when will you get it?  We have had to revise our earlier estimates to allow extra time for some of the integration tasks in our switch over to the new AppGen.Net, and the revised estimate for delivering a full beta is now about 5-6 weeks from today, putting it into a late-May early-June time frame. However, it is very likely that we’ll release the new AppGen.Net with some reduced template support before that. That first early release will support generation of code targeted at the data access layer, in other words it will be without the tie-in with the Designers. And that release also will likely include Application and Procedure Wizard functionality. So that first release will provide a big increase in productivity in two areas, and it’ll also allow those who are interested, to start working on the template code itself. Very importantly it’ll also let us get feedback from you on the AppGen.Net UI itself, which is very valuable to us all.

Clarion.Net updates

We have a new update on its way to you.  This release solidifies the new LinqToFileProvider and has some good general fixes. We’re getting closer with the new App code generator and we will keep you posted on how its progressing.  We’re also getting close to where we’ll open up weekly or bi-weekly internal builds.

Update for 7.1

A new update for 7.1 is now available.  One often requested feature was added; FEATURE:  You can now set (via Tools/Options/General/Projects and Solutions dialog) if new projects should default to release or debug mode.  Several good bug fixes, including a fix for a regression that popped up in build 6813. You can check the complete change log here.

And look for a new Clarion.Net release on this coming Monday!

Update for 7.1

Latest update for 7.1 has just been made available. This build works around a problem Clarion developers found on Windows 7 when the Alt Key was pressed. The problem reported was an apparent conflict with Windows 7 “Live Mail” or Outlook 2007. Both of these apps default to hiding the main menu and activating it upon pressing the Alt Key. The problem wasn’t unique to Clarion 7, the same conflict happens under Windows 7 with version 6 Clarion apps (and most likely prior versions too). We are testing a backport of the workaround for C6.3.x.

In the prior release we implemented code completion within the regular Embed Editor. In this release we have optimized the process so when working within the Embed Editor code generation of the procedure only occurs when something has changed that requires it, and the generated code is reused in the same edit session if possible.

We also tweaked a few things to make working with App based solutions and various version control systems a lot smoother. These changes mainly deal with detecting read-only files (Apps and Projects), and then shifting into a mode such that no merging occurs from the App generation process. Speaking of version control, we introduced a nice feature several builds ago; “Binary File auto-export/import”. What’s that? Well if you open Tools-Options-General you’ll see a node aptly named “Binary File auto-export/import”. On that tab you can specify individual Apps and DCTs (or entire folders if you have multiple Apps or DCTs), and whenever you are working with the named Apps or DCTs, an automatic export/import to TXA or DCTX format is executed in the background. This means when you open the App (or DCT) for editing the system looks for the TXA or DCTX format file and automatically imports it, and when you save the App or DCT the system exports your latest changes. Pretty slick and very useful.

The other notable change in this release is a change in how deleted controls affect embedded code attached to those controls. In this release whether you delete a control from within the Designer, or even from within the text editor when working with the window or report structure as text, any attached embed code will become orphaned (leaving it up to you to delete or preserve).

There are also several other changes and fixes, to see the entire change log click here

Update for Clarion 7.1

Emails are going out with download instructions for the latest update to 7.1 (build 6755). There are lots of good fixes and changes, and I already blogged on the significant new feature of Code Completion in the Embed editor. The only other new feature is the addition of the “Properties toolbar’ in the Report Designer. To activate it go to Tools-Options-Report Structure Designer and turn on the ‘Show Properties Toolbar’ option. To see the entire change log click here

Code Completion in the Embed Editor

There was much gnashing of teeth over the fact that the plain Embed Editor didn’t implement Code Completion – well now the next 7.1.x update implements Code Completion in the Embed Editor. We are also looking at adding the support for Code Folding, which as of today isn’t supported in the Embed Editor, and Clarion devs have asked that we also provide code folding for Control Statements such as IF, CASE, LOOP, etc. and we’re looking into this too.

In case you haven’t found this yet, you can define your own “folding regions” anywhere you like with this syntax:

!region SomeDescriptiveText
…….source code
!endregion

Check the Help file index for this topic: “Regions – Source Code” or just give it a try with the above syntax.

Product downloads and access to Internal builds

We’ve received some requests via email that have prompted us to start a new project this week; a secured website membership component. We have two goals to accomplish; first we’ll provide the ability to log in to our website and download products that you own, retrieve serial numbers for same, and get the newest updates to the Help files, and second you’ll be able to log in and have access to pre-release internal builds. We’ll make internal builds available for both Clarion 7 (Win32) and Clarion# (.Net). We have started the work on an implementation of a website membership project to be built on top of ASP.NET’s SQLmembership Provider with the UI built with AJAX. We’ll be using it to control the access to the product downloads and to the internal builds, and we’ll also be shipping the secured website membership component as source code with Clarion.Net (and of course we’ll be using it with the .Net App generator).

Access to internal builds will be open to anyone with a current subscription. Once the project is launched we’ll initially try to make internal builds available on a bi-weekly basis (weekly builds are also a possibility). You’ll have access to the change log, and if you see a fix or a feature become available that’s important to you – you’ll have the option to download the corresponding internal build. And by the way, if there happens to be a change to the RTL or compiler that would require your 3rd party tools be rebuilt (this is a fairly rare occurrence), it’ll be duly noted in the change log.

We’ll also be increasing the frequency of publishing maintenance releases (this too was requested in several emails), and we expect to make a new 7.1.x release available at the end of this week.

Update ready for Clarion 7.1

Emails are going out with download instructions for the latest update to 7.1.  There are lots of good fixes and changes, as well as some nice new features. I’ll talk about a few of the highlights.

On the “Features” side we have implemented:

FEATURE: If you double click on a File, Field or a Key in the Data Pad while a Text Editor is open, the File/Field/Key label will be pasted into the text editor

– this one was a  sorely missed feature present in the Clarion 6 IDE – that we didn’t know was so popular, but now its back

FEATURE: Template support to create/read/write INI and Data FILEs in specified CSIDL locations (ABC and Clarion chains)

– this lets you easily adapt your application to UAC compliance, and its backed up with a very easy to use Class so you can easily use it throughout your application

here’s a few screen shots from the template interface:

csidl_ini3

csidl_dataaccess3

as you can see it’s very simple to use, with just a few clicks of the mouse you can choose to store INI or your Data Files in any of the CSIDL locations presented by the template (these are the Microsoft recommended locations) .  You can also choose to store the INI and Data Files in different CSIDL locations – it’s your choice.  The template and the supporting Class also make it very easy to choose any other CSIDL location, or any other Network location if that’s what you need.

FEATURE: Added template support for theme to change based upon the OS theme in use

– this is a new Menu style that at runtime matches the OS theme

CHANGE: Optimize writes to the App recovery log
CHANGE: A value of 0 for the auto-save limit disables the App recovery log

– these two relate to a problem that some users had whereby writes to the automatic App recovery log were taking too long, now its optimized and we don’t think you’ll even notice it happening, but if you do, then you can now turn it off

All told there are about 120 fixes/changes and features in this release, you can view the complete list here

Clarion.Net updates

We just released an update for Clarion#, the release features our new  LINQToFileProvider along with a few examples that should get you going pretty well.  We’ll post some documentation on the LINQToFileProvider here within a few days, but the examples are a good way to start getting familiar with this powerful tool.

Also if you haven’t already done so – be sure to look at the Class Diagrammer.  Open any Solution select the Project node in the Solution Explorer and right-click to create the Class Diagram. You can use the Class Diagramer to create new class files or work with existing classes. From the design surface you can add fields,properties,events and methods, and a dbl-click on any element in the class opens the appropriate source file and positions to that element.

The Class Diagramer is a great tool for when you are creating custom user controls, and is especially useful for the Compact Framework. Our CF Form Designer can work with asmmeta files created in MS VS and vice versa MS VS CF form designer now can use CF user controls created in our IDE. We also added a new file template CFDesignerTimeAttributes that allows using our CF custom user controls in the MS.

The basic steps are:

– create a CF User Control project
– design the control in the Form Designer
– add a new item to the project using the Compact Framework Design Time Attribute File  template
– use the Class Diagrammer to add all required information about the control’s properties and events attributes
– compile the project
– Genasm will be launched automatically and an appropriate asmmeta will be generated.

We’ll have a thorough tutorial on all this in the next update for the Clarion# By Example course. In the mean time explore it and see what it can do for your development.

Happy New Year to all in the Clarion community!