All posts by rzaunere

Coming up with 7.2

There was a recent thread in the news group where a lot of people were saying how much they used (and missed) the availability of a list of an Applications’ Procedures. Seems that code completion wasn’t the best option when you can’t remember the name of the Procedure. And its quite understandable when you have many many procedures, possibly hundreds, in your .App. So thanks to some quick work by Diego, Scott and Alexey, we were able to slip this this new feature into the 7.2 release; the Data pad now has a “Procedures” node, and when selected it lists all template based procedures, the Procedures node is only activated when you are in any of the editors, and dbl-clicking on a procedure name in the list inserts the procedure name into the editor. The Procedures list also has a Windows Explorer style incremental locator.

proclist

ReportWriter and the report engine

For 7.2 we’ll deliver the new standalone ReportWriter, and provide support for integrating the new report engine into Clarion Win32, Clarion#, and C# applications.

The new ReportWriter has major improvements in both functionality and ease-of-use, and of course it’s fully compatible with the Windows 7 64bit OS. It is extremely easy to create great looking reports, and reports can be exported to PDF, HTML, Excel, RichText, CSV, MHT, Text, and a variety of image formats (PNG, BMP, etc.). The ReportWriter also has support to export to any of those formats and email them in one operations. You can also preview reports in HTML format.

rwpreview-sm

You’ll definitely want to offer upgrades to your end users so they can start using the new ReportWriter. The new ReportWriter automatically converts existing TXR libraries into the new library format. For quantity purchases we’ll be offering custom branding opportunities.

Using the report engine

Clarion 7 has existing support to work with TXR based reports from within your applications (see the Invoice example to see how it’s implemented), and we’ll continue to support TXR based report libraries in version 7.2. So any programs that are using the win32-based report engine won’t need any changes. But now in the release of 7.2, the ReportEngine class supports working with both the old report engine (TXR based reports), and the new report engine. The ReportEngine class determines which engine to run based on whether it’s asked to open a .TXR or a .REPXL library (.repxl is the extension used for the new report library files).  And on the .Net side its equally easy to integrate the new report engine into your Clarion# or C# applications.

Bob Foreman is doing a ClarionLive presentation tomorrow (5/21), and he’ll be showing the new ReportWriter and showing how to integrate the new report engine into your applications.

Clarion 7.2 – Code gen from (almost) everywhere

For 7.2 we’ve come up with an implementation that allows developers to safely generate their application code from everywhere except from within the Window/Report Designers and the code Editor. We had previously added restrictions that prevented code generation being initiated with partial or unsaved changes, this new implementation ensures 100% consistency for code generation, but it allows you to generate code from anywhere on the Procedure Properties dialog or the main Application window.

Clarion 7.2 – Menus

We’re getting Clarion 7.2 ready for release, and I thought I’d make a few posts and talk about the changes and new features. Version 7 already has support for creating a very nice UI on your menu’s, and we recently added a couple new menu styles and support for using a 3d vertical separator. Using the Menu Styles lets you provide the exact same UI for your menu’s across all supported operating systems. No matter what OS your application is deployed on you have complete control of the menu colors and overall style.

Now in 7.2 we’ll introduce new support to make your applications use the OS menu’s. The new support doesn’t use the MenuStyleManager class, its only requirement is that your App is properly manifested, and with that your menus will match the menus on the users operating system. Here are some screen shots taken from different operating systems.

osmenuwin7

osmenuvista

osmenuxp

ospopupvista

ospopupwin7

ossystemmenuwin7

and for those who prefer using the C7 MenuStyleManager class you can be sure we’ll continue to enhance it, so that you’ll have complete consistency in your menu’s across operating systems

menustylesbabyblue

Update for 7.1

An update for 7.1 is going out today, there are no new features introduced in this release, but there is a change (for the better) that you’ll soon have:

CHANGE: Code generation only executes from the application tree window, this prevents generation with partial or unsaved changes and ensures consistency for code generation.

What this new change boils down to is a subtle (or not so subtle, depending on your work style) change to where and when you can initiate code generation. In all previous releases the IDE was very loose about allowing you to initiate code generation from just about anywhere within the Application Generator dialogs and supporting components (Designers, Embed Editor, etc.), without consideration for the current state of uncommitted changes, and unfortunately this flexibility opened up avenues for introducing problems into the generated code. Imagine if you changed a Window or Report and exited the Designer, now the structure has changed but you haven’t committed the changes at the Procedure level, but while still on Procedure Properties you execute code generation. What should generate? Should AppGen somehow restore the old structure (probably not what you want), or auto-commit the changes to the Procedure, again not a decision that should happen without an explicit choice by the developer. The implemented solution for this is very simple, the AppGen will inform you to return to the main window, which in turn forces you to either save the partial changes or abort them. The result is 100% consistency in the generated code, at the cost of having to make an explicit decision to save or abort changes at the Procedure level. Besides this change (for the better and safer) there are a good number of other fixes. You can read the entire list here

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.

Automated Import and Export of Applications and Dictionaries

Clarion 7.1 added the ability to automatically import and export .App and .Dct files to/from their text representations.  This was primarily added for use with version control systems like Subversion, but developers may also find it useful for automated backup purposes.

With this system any time a dictionary or application is saved it is automatically exported to text.  If you load a dictionary or application and the text file has a newer time-stamp then the binary file, then the text file will be loaded into the binary file.  With this system you can then check in and check out the text representation of your files into your version control system, and the IDE will automate updating the binary files.   Further, if you are using Subversion as your version control system you can see the history of your file via the History tab (shown in the image below) appears at the bottom of the DCT Explorer or Application View.

The History tab displays the version history pulled from your SVN repository.

dcthistory

ClarionCl.exe is also auto import/export enabled.  So if you use another new feature of Clarion 7.1 (Enterprise Edition) to generate an application, the .App and .Dct files will be updated if the timestamp of the text file is newer then the binary file.  This allows you to use automated build tools like CruiseControl.NET to build your Clarion applications.

To enable automated import/export of files go to Tools/Options/General/Binary File auto-export/import.  You will then have a screen similar to the image below.

importexportconfig

The import/export automation does its work on a background thread, so you should not see any impact on your normal work flow.

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!