Gui enhancements development progress

Posts   
 
    
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 29-Apr-2004 18:22:39   

A short message about the progress of the GUI enhancements, what's implemented, what is postponed, when to expect a beta etc.

What is/will be implemented: (*=done) * hiding fields mapped on relations * hiding relations * creating / removing new relations (1:1/m:1/1:n) * faster gui * better entity editor * custom properties (name-value pairs for custom values) for table/view/field/entity/field. * connection info dialog moved into database drivers * firebird/interbase driver (no templates yet) * custom properties for project * listviews in typed list/typed view will be replaced with ultrawingrids. * other grids will be replaced by ultrawingrids * all folder textboxes will be writable * remove of folderbrowser -> .NET 1.1. folderbrowser * relative destination folder in generator * ability to specify selection of entities/typedlist/typedviews/proccalls for generator run * some typed list bugfixes and small typed list additions * some refactoring of typedlist code (removal of dead code) * more settings to control save/refresh code so paranoia-mode can be switched off * ability to move typedlist fields up/down * ability to start a variety of actions from the project explorer (rename field, add relation etc.) * addition of checks for corrupt PK fields, duplicate UC's in refresher and drivers * better vs.net project file generator (i.e.: merge new files in current project file * renaming of more elements in the project, like schema, catalog etc.

Postponed (till July-august, when the runtime upgrade of june-july is reflected in the gui) among others: - multi catalog support / project merge - plugin system for the gui. - plugin system for the interpreter. - complete removal of Magic lib.

The removal of hte magic lib and migration to a 3rd party docking solution is postponed because it will take more time than anticipated and it works correctly at the moment. Futhermore, Janusys comes with a new suite of controls, with docking windows and other new objects, so we wait till this suite is on the market.

I know some of you will be dissapointed because of the delay in multi-catalog support, however due to the refactoring of the GUI with new controls there is no time left to add it as it will have a major impact to the code and a lot has changed already (behind the scenes) so to avoid a very long test period, we postponed it till July.

To work around the lack of a plugin system for the gui, we'll address as much issues in the gui which will make it easier to wait till july.

The plugin system for the interpreter is also postponed and will be implemented as a C# template consumer, like the core engine of codesmith. This allows people to add custom pieces of C# to a template or to run different templates in C# to work around the limitations of TDL (which is perfect for generating specific code, but not for flexible, all purpose code).

Although the list of things to do is longer than the list of things already done, the biggest amount of work has been done. Especially the relation editor and relation management code was a lot of refactoring/programming. Also the replacement of the entity field listview with the ultrawingrid took much longer than anticipated. The replacement was necessary because after 3 days of hard work (!) it was impossible to fix the issue where you change a name and then click on another field in the listview and hte name isn't changed. (see for an explanation here: http://weblogs.asp.net/fbouma/archive/2004/03/26/96701.aspx ). Because of this .NET bug (I've notified MS, being an MVP might help speeding up a fix, but nevertheless, we need a fix NOW simple_smile ) 2 other listviews have to be replaced as well, however this will be easier.

Beta when? I really hope to have a working version at the end of the first week of May. This version will not contain the Firebird driver, as the templates will be developed after the initial beta release.

As soon as the beta is out, internal testing will start and also development of teh MySql, PostgreSQL, DB2, Pervasive 8.x and Access driver will start. These development cycles have to end mid-june when the next runtime upgrade will start.

I'll post some screenshots later, probably this weekend.

(updated: 7-may-2004) (updated: 12-may-2004) (updated: 15-may-2004)

Frans Bouma | Lead developer LLBLGen Pro
jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 29-Apr-2004 19:25:31   

Otis wrote:

The removal of hte magic lib and migration to a 3rd party docking solution is postponed because it will take more time than anticipated and it works correctly at the moment. Futhermore, Janusys comes with a new suite of controls, with docking windows and other new objects, so we wait till this suite is on the market.

You do know that Infragistics has docking windows a la Visual Studio, right? Do you not like them?

Jeff...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 29-Apr-2004 20:04:59   

jeffreygg wrote:

Otis wrote:

The removal of hte magic lib and migration to a 3rd party docking solution is postponed because it will take more time than anticipated and it works correctly at the moment. Futhermore, Janusys comes with a new suite of controls, with docking windows and other new objects, so we wait till this suite is on the market.

You do know that Infragistics has docking windows a la Visual Studio, right? Do you not like them?

Yes I know these simple_smile It was the plan to replace the magic lib with the infragistics controls, however it will probably take too much time to make the transition correctly.

Janusys mailed me their controls will be much better so I'll give them a try once their suite is released. Infragistic controls are ok, it's just that some are just cumbersome to use, like the layout of the grid which is thrown away when you bind an empty arraylist to the grid. It just takes extra time to get that sorted out, which is time you can better spend on real programming simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 29-Apr-2004 21:03:20   

I know this is the gui thread but what is the timeline for the 'span' enhancement?

Thanks,

Fishy

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 29-Apr-2004 22:11:21   

Fishy wrote:

I know this is the gui thread but what is the timeline for the 'span' enhancement?

With the runtime enhancements in june, as it requires an overhaul of the query engine.

Frans Bouma | Lead developer LLBLGen Pro
jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 29-Apr-2004 23:21:28   

Otis wrote:

Infragistic controls are ok, it's just that some are just cumbersome to use

Aye, I agree with that...

Jeff...

free4all
User
Posts: 35
Joined: 12-Sep-2003
# Posted on: 30-Apr-2004 09:41:29   

I have a set of templates which I use to create the Business Layer and UI after the DAL. At the moment this process is a pain as I have to run 3 set of templates instead of 1. It would be great to run all 3 as a batch.

Are there any future plans for a batch or command line interface?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 30-Apr-2004 10:09:06   

Yes. With a little help from hte SDK you can also create one yourself I think at the moment: simply reference the GeneratorCore assembly and create a Generator instance, fill its properties and call Start.

Frans Bouma | Lead developer LLBLGen Pro
free4all
User
Posts: 35
Joined: 12-Sep-2003
# Posted on: 30-Apr-2004 11:58:16   

Great I didn't know that, I'll give it a try!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 30-Apr-2004 12:15:16   

free4all wrote:

Great I didn't know that, I'll give it a try!

You might run into a problem with the callbacks for the progressbar window. If you do, let me know simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 03-May-2004 11:26:11   

Screenshots! For a good understanding: "Custom properties" will not end up as properties in the classes, but are name-value pairs you can add which will be added to a static hashtable in your class and available at runtime so you can drive gui generation code using these name-value pairs for example. Also can you create better templates using these name-value pairs by adding new statements to your templates which deal with the name-value pairs during code generation.

Unique constraints viewer in catalog details: Click here for a larger version

Custom properties viewer in catalog details: Click here for a larger version

Custom relations editor:

Custom M:N relations editor:

Entity editor: fields mapped on table fields:. At the left, check the hidden fields mapped on relations and hidden relations. Click here for a larger version

Entity editor: fields mapped on relations:. Click here for a larger version

Entity editor: custom properties for the entity:. The custom properties of the table are present (and can be edited for the entity) and new ones are added. Click here for a larger version

Relation actions. Click here for a larger version

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 07-May-2004 09:58:24   

Things look good for a beta next week (fingers crossed).

Frans Bouma | Lead developer LLBLGen Pro
bertcord avatar
bertcord
User
Posts: 206
Joined: 01-Dec-2003
# Posted on: 07-May-2004 15:32:45   

this look awesome! Cant wait to get the updates so I can update my custom templtes to use teh new features

bert

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 12-May-2004 18:44:53   

Almost done with the GUI, the last .NET bug workarounds (I really am fed up with winforms' crappy controls) are implemented, some project explorer functionality left and I can then implement the template/parser changes. It should be finshed by this weekend.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 15-May-2004 13:21:55   

Gui done, most template work done. The only things left are: - Custom Properties template support/parser support. This is not that hard (static hashtable for object-level properties and static nested hashtables for field related properties. Accessable through static method and nonstatic method at runtime.) - Testing of generated code.

Hopefully a beta can be released on Sunday, May 16th!

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 16-May-2004 18:22:57   

Compilable code at last... pfew Testing continues tomorrow (Monday).

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 17-May-2004 16:52:37   

The beta is LIVE!!

Download the beta from the customer area -> upgrades section.

Beta forum: http://www.llblgen.com/tinyforum/Threads.aspx?ForumID=16&SectionID=2 (ifyou don't see it, close your browser, re-connect)

Be sure to read the readme before diving in!

Frans Bouma | Lead developer LLBLGen Pro
free4all
User
Posts: 35
Joined: 12-Sep-2003
# Posted on: 21-Jul-2004 16:38:50   

Hi Otis,

I asked a while ago in this thread (April) about the possibility of running template sets in batch or via the command line. I’m just now finding a bit time to look into this and the new enhancements you have released. You mentioned at the time there was something coming in the new release which would allow batch processing. I’m just wondering if it made the release and if there is any documentation for it?

You also mentioned it was possible to do what I wanted by using the GeneratorCore assembly, I had a quick look and I’m not sure which properties would have to be filled and in what order. If there is no batch system in the current release could you elaborate a bit on how to use the GeneratorCore directly?

Thanks

free4all wrote:

I have a set of templates which I use to create the Business Layer and UI after the DAL. At the moment this process is a pain as I have to run 3 set of templates instead of 1. It would be great to run all 3 as a batch.

Are there any future plans for a batch or command line interface?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 21-Jul-2004 19:06:25   

There is currently no batch functionality.

There is a project called 'ProjectViewer' on the website, which illustrates how to load a project file in code. This is your starting point. Below is the code of the routine which starts the dialog and the generator.


// ...
// load all generator config files found
ArrayList generatorConfigs = generatorProcess.LoadAllGeneratorConfigFiles(Application.StartupPath, _configurationSettings.TaskPerformersRootFolder);

if(generatorConfigs.Count<=0)
{
    MessageBox.Show(this, "No generator configuration files found. Cannot continue.", "No configuration found", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}

// load all template set config files found
DatabaseDriverConfig driverConfig = (DatabaseDriverConfig)_configurationSettings.DatabaseDriverDefinitions[_currentProject.DatabaseDriverID];
string templateSetRootFolder = Path.Combine(driverConfig.FullDriverPath, driverConfig.TemplatesRootFolder);
ArrayList templateSetConfigs = DBDriverHelper.LoadAllTemplateSetConfigFiles(templateSetRootFolder);
//..

// start generation.
string destinationFolder = configurator.DestinationPath;
if(destinationFolder.StartsWith(@".\")||destinationFolder.StartsWith(@"..\"))
{
    // relative folder
    string projectPath = _currentProject.ProjectLocationPathFilename.Substring(0, _currentProject.ProjectLocationPathFilename.LastIndexOf(@"\"));
    destinationFolder = Path.Combine(projectPath, destinationFolder);
    _currentProject.DestinationFolder = destinationFolder;
}
else
{
    if(destinationFolder==".")
    {
        _currentProject.DestinationFolder = _currentProject.ProjectLocationPathFilename.Substring(0, _currentProject.ProjectLocationPathFilename.LastIndexOf(@"\"));
    }
    else
    {
        _currentProject.DestinationFolder = destinationFolder;
    }
}

// create destination folder if not present
if(!Directory.Exists(_currentProject.DestinationFolder))
{
    // create it
    Directory.CreateDirectory(_currentProject.DestinationFolder);
}

_currentProject.RootNameSpace = configurator.RootNamespace;
_currentProject.LastUsedTemplateSet = configurator.LastUsedTemplateSet;

generatorProcess.Entities = configurator.Entities;
generatorProcess.TypedLists = configurator.TypedLists;
generatorProcess.TypedViews = configurator.TypedViews;
generatorProcess.ActionProcedures = configurator.ActionProcedures;
generatorProcess.RetrievalProcedures = configurator.RetrievalProcedures;

ProgresViewerStarter progressViewerWindow = new ProgresViewerStarter();
try
{
    progressViewerWindow.Show();

    generatorProcess.SubTaskProgressInitHandler = progressViewerWindow.SubTaskProgressInitHandler;
    generatorProcess.SubTaskProgressTaskCompletedHandler = progressViewerWindow.SubTaskProgressTaskCompletedHandler;
    generatorProcess.SubTaskProgressTaskStartHandler = progressViewerWindow.SubTaskProgressTaskStartHandler;
    generatorProcess.TaskProgressInitHandler = progressViewerWindow.TaskProgressInitHandler;
    generatorProcess.TaskProgressTaskCompletedHandler = progressViewerWindow.TaskProgressTaskCompletedHandler;
    generatorProcess.TaskProgressTaskStartHandler = progressViewerWindow.TaskProgressTaskStartHandler;
    generatorProcess.LogLineHandler = new LogLineInApplicationOutputCallBack(_applicationOutputWindow.LogLine);

    generatorProcess.Start(configurator.GeneratorConfigSelected.Tasks, _currentProject, configurator.TemplateSetSelected, _configurationSettings);
    progressViewerWindow.Close();
    MessageBox.Show(this, "The generator process was completed succesfully!", "Generator process result.", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch(GeneratorAbortException ex)
{
    progressViewerWindow.Close();
    // some task aborted the generation of the tasks.
    DialogResult result = MessageBox.Show(this, "Task '" + ex.AbortingTask.Name + "' aborted the process.\n\nClick 'Yes' if you want to see the detailed exception data.\nClick 'No' to simply leave the process.",
        "Fatal exception caught during task execution.", MessageBoxButtons.YesNo, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
    if(result==DialogResult.Yes)
    {
        ExceptionViewer viewer = new ExceptionViewer(ex);
        viewer.ShowDialog(this);
    }
}
catch(Exception ex)
{
    progressViewerWindow.Close();
    // other exception. Show the exception viewer
    ExceptionViewer viewer = new ExceptionViewer(ex);
    viewer.ShowDialog(this);
}

_currentProject.DestinationFolder = configurator.DestinationPath;

You should probably not show the progress viewer simple_smile

The config dialog selects the template set and config of choice, these objects are available to you at the beginning of the code snippet, where the configs are loaded.

This should get you started simple_smile Basicly it's creating a generator instance and start it.

Frans Bouma | Lead developer LLBLGen Pro
free4all
User
Posts: 35
Joined: 12-Sep-2003
# Posted on: 22-Jul-2004 17:16:28   

Thanks I have tried that out!

I have managed to load a project via the code in the project viewer download. I have then loaded the generator config files but I'm becoming stuck with filling the generator properties:

generatorProcess.Entities = configurator.Entities;
generatorProcess.TypedLists = configurator.TypedLists;
generatorProcess.TypedViews = configurator.TypedViews;
generatorProcess.ActionProcedures = configurator.ActionProcedures;
generatorProcess.RetrievalProcedures = configurator.RetrievalProcedures;

I'm not sure what the "configurator" does although it’s a mighty impressive name! I think I have this info in the loaded project object but the generator process is expecting and Array list and the project.Entities etc are TypedViewContainer. How would I convert these across?

I'm hoping to skip the processviewerwindow all together and just start the generator and wait for it to complete with the line:

generatorProcess.Start(configurator.GeneratorConfigSelected.Tasks, _currentProject, configurator.TemplateSetSelected, _configurationSettings);

How do I fill in the missing "Configurator" blanks:

configurator.GeneratorConfigSelected.Tasks
configurator.TemplateSetSelected

Is there a helper method which will fill an "ApplicationConfiguration" object which I'll need for the _configurationSettings paramaeter?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 23-Jul-2004 10:53:21   

free4all wrote:

Thanks I have tried that out!

I have managed to load a project via the code in the project viewer download. I have then loaded the generator config files but I'm becoming stuck with filling the generator properties:

generatorProcess.Entities = configurator.Entities;
generatorProcess.TypedLists = configurator.TypedLists;
generatorProcess.TypedViews = configurator.TypedViews;
generatorProcess.ActionProcedures = configurator.ActionProcedures;
generatorProcess.RetrievalProcedures = configurator.RetrievalProcedures;

I'm not sure what the "configurator" does although it’s a mighty impressive name! I think I have this info in the loaded project object but the generator process is expecting and Array list and the project.Entities etc are TypedViewContainer. How would I convert these across?

You can just fill these with the collections in your project simple_smile configurator is the dialog object you configurate your generation process with. On it is a button which opens a treeview in which you can select which objects to include in the generation process. So if you want just entities, keep the others empty.

I'm hoping to skip the processviewerwindow all together and just start the generator and wait for it to complete with the line:

generatorProcess.Start(configurator.GeneratorConfigSelected.Tasks, _currentProject, configurator.TemplateSetSelected, _configurationSettings);

How do I fill in the missing "Configurator" blanks:

configurator.GeneratorConfigSelected.Tasks
configurator.TemplateSetSelected

Is there a helper method which will fill an "ApplicationConfiguration" object which I'll need for the _configurationSettings paramaeter?

The code to load all configs is listed at the top:


ArrayList generatorConfigs = generatorProcess.LoadAllGeneratorConfigFiles(Application.StartupPath, _configurationSettings.TaskPerformersRootFolder);

The configure window lets you select one, you can of course select that one yourself, do this by name compare for example. The generator config object is of type (GeneratorCore assembly) GeneratorConfig.

The code to load all template sets is also listed in the code. As well as with the generator configs, you have to select one by hand. Again, do this by comparing names. Templatesets are of type (ApplicationCore assembly) TemplateSetDefinition.

So the tasks are passed (task objects, see generator core assembly) and a complete templateset object. So most of the work is loading a template set config and a generator config.

Loading a generator config: GeneratorConfig newConfig = GeneratorConfig.LoadGeneratorConfigFile(configFile); where configFile is the full path + filename. (types are defined in generatorcore assembly)

Loading a templateset config: TemplateSetDefinition newConfig = TemplateSetDefinition.LoadTemplateSetConfigFile(configFile);

(types are defined in application core assembly). The individual routines need absolute paths but if you know them, it's of course ok. Otherwise use the load all routines and select a config.

Frans Bouma | Lead developer LLBLGen Pro