1.1 - Release Notes

Topic updated 11-10-2007

GenWise v1.1 - Release Notes

 

COMPLETELY NEW MODULES

For more details : Help Topic

Source Code Synchronization

There is a “new” feature that allows better integration with other IDEs (like VS.NET, etc) .

 

 

The main idea behind it is very simple : synchronize back to the project system changes which have been made manually in the file.

 

 

Source Control Support (new!)

For more details : Help Topic

 

We have started with ways to improve sharing / controlling version of a project. Therefore we have added this new important Module to GenWise.

Vault Provider : GenWise.SourceControl.Vault.dll

Source Safe Providers : GenWise.SourceControl.VSS.dll

 

Please notice that it currently only works at the “project” level and not at the item (as you might be used to if worked in vs.net).

 

General

IDE + Framework

ERS#4068 : Symbol Editor , fixed exception if KeyDown or up was used after editing a symbol.
ERS#2027 : Symbol Editor , improved order of nodes.
ERS#4045 : Sometime you could get exception when deleting the Item Template from the Template Tree.
ERS#4038 : If a validation was added or changed to a column, this was not detected as a change (Dirty was not set ) and therefore when closing you could lose the work since it was not suggesting to save.
ERS#3999 : Added progress bar while saving project.
ERS#3967 : Class Builder now generates correctly if Singleton pattern is requested.
ERS#3745 : Class Builder now allows to generate an interface.
ERS#3943 : Using column inheritance could give some errors under certain specific situations.
ERS#3839 : Sometimes the “move up” (in the template tree) just got stuck and would not move template up no more.
ERS#3821 : Some template types could not nicely override the Template designer.
ERS#3745 : Deletion of orphaned Codeblocks was not working.

 

 

Web Form Designer

ERS#3998 : copy/paste control could corrupt designer
ERS#3996 : Browse inside a formview did not worked caused by a  incorrect loading of the design surface.

 

Source Editor

Intellisense Support for XML files (by supporting XSD)
Faster intellisense: there is a new config to configure how fast should intelliprompt appear.
ERS#4012 : avoid showing IntelliPrompt when typing }
ERS#3991 : FindReplace, if open and sourceui was closed à exception.
ERS#3750 : Nullable types now show Intelliprompt members correctly.
ERS#3747 : When typing order à was replaced incorrectly with Orders. The memberlist should have been case sensitive.
ERS#3207 : HMTL <br> affecting indentation.
ERS#3001 : Source Font configuration (from Main menu Options) now used to change default font in editor.
ERS#2950 : Go to template could cause error.
ERS#2873 : Class members where not sorted (in dropdown inside editor)

 

 

Compare Schema

ERS#4035 : there was a problem when resolving Key Differences. It could raise an exception and it was not correctly detecting different cases.
ERS#3995 : Wrong order of compare. Sometimes the compare did not worked correctly because the order for resolving the differences was not ok.
ERS#2782 : If Primary Key changed name? could cause exception.

 

Project System

 

User can set the “main” project Item

Feature: now the user can set whats the main/root/primary Item for each project.

 

This allows the templates to use this information as they want to. For example: ASP.NET templates uses the main item as the default/home page. Therefore if you ask to “run” the project and you are not standing on a specific “page item” then it will run and use the main item page as the default page. In the past this worked exactly the same but with the fact that the page “Default” was hardcoded. If the user deleted that “default” page there was no way to set another item (or another item with different) name as the main item.

 

 

Fallback in case Assembly not Found

ERS#4133

When loading a project it might happen that the “exact” assembly is not found. If this happens you will be informed that a different assembly was loaded and will replace your invalid project Reference.

 

 

Assembly Replaced: The Assembly [System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] was previously (tip: another machine?) in the GAC but can't be found now in the GAC.

 

The following Assembly [C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll] will be now used in the project replacing the previous version.

 

Improved References Resolution

There have been several changes in the way we try to resolve project references.

If reference not found à search in GAC (ERS#4133)
oThis was already done by genwise but we only included references which “previously” where also known as GAC references. Now, we also use this technique for non-gac.
References with FullPath (ERS#4134)
oWhen sharing a gwapp file between different developers/computers AND specially when using Source Control it might happen that the Target directories dont match (between machines)
oThe Reference contains all the assembly Info required to restore the reference using a different directory, but the problem is that when loading the Generation Directory does not exist. This can be corrected in the User interface but this is too LATE for the loading process.

 

Generation Directory [Folder selection]
oTo fix the previous point, when you open a GWAPP file which is referencing a not found Directory GenWise will immediately prompt for a new Location using the following dialog:

 

 

 

 

 

In order to simplify local assemblies (= assemblies not in GAC) the project system will now include the following directory in the SearchPaths().
o[Generation Directory] + “.\bin “
oThis means for example that if somebody adds an assembly to the .\bin and adds a reference to it, it will be automatically resolved back without needing to specify manually a different path/location.

 

 

Template System

Installer now copies files needed for Writing Templates outside GenWise. (vs.net)

 

New Template Type (Entity Action Template)

This allows to very easily create templates that should apply to different IEntity types

 

ScoreLevel and Default Tpl Selection

The template factory now was an improved way to detect what should be the default Template.
This technique off course only applies in the case there are >1 template that can be used for a given property.
There is a “score” technique where each template can return a score indicating how well they (the template) are suited to implement that case.
This technique is used for example for determining that “big strings” / memo fields are better implemented if the TextProperty template is used instead of the BoundPropertyTemplate.

Symbol Generator

Fixes : ERS#4091, ERS#4090, ERS#4089

 

New Templates Shipped

Vs.Net Extensions
Database repository Updater
And some other new templates inside the asp.net Template.

 

 

 

 

Database Repository

Check Script

ERS#4206 : CheckScript fails if the datastore contains a custom view.

 

SQL Script

ERS#4206 : Was broken and showed empty SQL editor without the expect script for all tables inside the datastore. 

 

Database Providers

SQL Express

ERS#4008 : SQLExpress - Catalog null bug

Postgres

ERS#4024 : Postgres bug w/import Keys

 

mySQL

ERS#4015: They changed, in version 3.51.19  how keys are retrieved (meta-data exposes is different) therefore we had to adapt provider.

 

Oracle Provider

 

Fixed: Better detection of valid Oracle Versions
oYou could get this error even if Oracle 9 was not installed:

Oracle Configuration Error: OracleConnectionbuilder.GetOracle9Homes(). Oracle Windows Registry entries for Oracle 9 Homes not found (IDx inside ALL_HOMES). Are you sure you have Oracle 9 client installed ?

 

When detecting possible Oracle version we use 1 technique that was not doing deep enough. Oracle8 and Oracle9 were added to my list of versions although i did not have them. the reason is that for been sure we need to check if we have existing Homes. A version without at least 1 home is not a valid scenario.

 

Fixed : Nvarchar2 and nchar imported double length (ERS#3863)

 

NHibernate Templates

We changed the default for the SessionScope, before it was SessionScope.Factory scope now its SessionScope.SessionFactory.
The Validate Cascadability warning is now ON by default, this is to show users when their model is not going to work correctly with cascade actions.

 

POCO Class

ERS#3976 : fixed problem with List validations not working correctly with columns where datatype != string. (example:decimal)

 

DataSource Objects

ERS#3979 : Custom properties (added at source editor, thus not generated) could expose an incorrect datatype.

NHibernate XML file

ERS#3961: XML check was not working correctly under NHibernate 1.2 since they changed the namespace.
ERS#4040: Added user CB to so the order-by property could be inserted.
ERS#4043: Missing XSD? You could get hundreds of message boxes, changed into a Validation warning now.
ERS#4113: When using “foreign generators” and using a non-default naming convention the casing of the Property could be wrong causing mapping errors.
ERS#4112: Cascade attribute was not generated for one-to-one tags.
Feature (ERS#4111): Added several User CodeBlocks to allow better customization of certain tags.
Important performance improvement (ERS# 4148): When using “simplified access property” à the code was always a fetch to the database. This was due to the fact that ICriteria does not reuse from the session cache. Therefore the code was changed to use (new) Get method in the factory instead of Fetch.
Fix (ERS#4176) : When using composite keys where its components are FKs (Composite FK PK case) the simplified property access could cause “stack overflow“ exception when inserting transient instances.
Feature: new Get method that its very similar to the Fetch with the difference that it uses Session.Get instead of ICriteria. This method can only be generated for non-composite keys.
Fix  (ERS#4190): In NHibernate v1.2 they changed the default and we only generated the Lazy attribute if it was true, therefore we can never got it to generate=false.
Feature (ERS#4177) : Support for Client Autonumbering

If the column is manually marked (import could and will never detect this since its user decision) as AutoNumber == Client , we are now generating the “increment” generator which will use a select max() based on that column.

 

Feature: Morphological Utils

Normally databases tables use plural nouns like "Cars", "Employees", etc. GenWise was creating Project Items whose name was basically the same as the table name.

 

This meant that the user would need to go to each created project item and rename it to "singular" so the POCO (add link) would reflect 1 singular instance object .Example:  Car myCar = new Car();

 
But this is not enough, Item names where also used for "relationships" and here we also have a singular/plural problem.

1:Many relations --> should be named plural

many:1 relations --> should be singular named.

 

Therefore the BO-Layer now has an option [] Use Morphological Utils that automatically converts singular to plural and vise versa.

 

Note: This only applies to English language; if you are using a different language in your Database Repository Entities à please turn this option OFF.

Where can you find this Template Option?

 

 

 

Feature: Generate Property Helper

 

The idea behind this simple technique is to be able to detect errors at compile time (instead of at runtime).

Therefore, instead of writing the filters using strings (which cant be traps at compile time) like this:

 

criteria.CreateCriteria("Categories").Add(Expression.Lt("Description", "Category 2"));

 

We could write the same code using the enums:

           criteria.CreateCriteria(BooksProperties.Categories)

.Add(Expression.Lt(CategoriesProperties.Description, "Category 2"));

 

Whats the generated Code?

For each Template that has this option turned ON it generates a struct with static field that can be used (as a replacement of using the strings).

 

public struct BooksProperties{

       public static string ISBNNumber = "ISBNNumber";

       public static string Title = "Title";

       public static string DatePurchased_Date = "DatePurchased_Date";

       public static string DatePurchased_Time = "DatePurchased_Time";

       public static string DatePurchased = "DatePurchased";

       public static string NumberOfPages = "NumberOfPages";

       public static string CategoryID = "CategoryID";

       public static string SubCategoryID = "SubCategoryID";

 

Note: The fields contain and return a string, so this avoids any casting error. (That for example could be caused if an “enum” type was used).

 

Fix : Data Source (link with column was lost)

All DbProjects expose an object model which can be viewed in the

“Data Source” option. In certain scenarios where the Default naming convention was changed by the developer, it could happen the following:

 

When the option "remove" underscore is used. In other cases when "casing" difference occur, this is not a problem because the searches seem to be case insensitive in this case.

 

Basically, in a nutshell, ALL properties are exposed AS VIRTUAL. This has several undesired side-effect as: they don't really map to a column, they are not sortable, etc, etc.

Many-To-Many Support

many-to-many are not originally supported because (in our point of view) is not a very common scenario.

Quoting here from "Hibernate in Action" (excellent book by the way) :
"In a real system, we might no use a many to many association.In our experience, there is almost always other information that must be attached to each link between associated instances (for example, the date and time when an item was set ...)"

 

Example of when it's recommend to use many-to-many :

As you can see in the example, the intermediate Table has no extra properties (fields) besides the linking fields. In this case is OK to use the many-to-many since we want basically to "exclude" the intermediate (required for relation model) Table which has no interest in our Domain Model.

Anyway, in case you want to use many:many this is how it can be achieved:

 

Step#1 : Mark the Intermediate Table as a ManyToMany table


 
Note: In the future we might provide a simple Entity Action template that searches and marks this tables automatically.

 

Step #2: Make sure you don't have the Intermediate Table in the Database Object model

In the GenWise example, this would be the Table Products_Suppliers. This table is an intermediate table which can (and should in this context) be avoided. Please make sure you don't have a DbProject Item mapping this intermediate table.

 

Step #3: Check that Many-To-Many Relation has been discovered

 

Related Topics: Generated code for a Many-To-Many.

 

Many-To-Many : What's the Generated Code

 

This topic allows you to understand the different effects of having a many-to-many relationship.

 

In the POCO

Also, the AddSupplier() and RemoveSupplier() methods.

 

In the XML

The many-to-many tag

 

 

 

 

 

ASP.NET Templates

 

WebConfig Template

Improvement (ERS#4044) : Added several user CBs.

 

Page Template

Improvement (ERS#4065) : Now a Bo-Layer validation error is shown in its own line (before all errors where in just 1 bullet)
Fix (ERS#4059)  : Some event handlers generation failed because of reflection not correctly used. Therefore it was always generated fixed parameters in the event handler.
Fix (ERS#4060)  : if no Master Page is used but the user forces to use master page by changing auto-calculated option à exception. Now this is better trapped and shown as Validation error.
Fix (ERS#4088)  : Master Page was allowed to be switched to user control. This is not ok, now this is validated.
Feature (ERS#2482): Added ValidateRequest option and documented the common error where it requires this property is used A potentially dangerous Request.Form value was detected from the client”

Validation Template

ERS#3735 : header text is now a Template option.

Navigation Template

ERS#4078 : now uses the main item as return page when the stack of history is empty.
ERS#3966 : Added user cbs + basic improvements.

 

SiteMap Template

ERS#3965 : Deleteing SiteMap caused exception.
SiteMap uses new custom designer to simplify menu order, text, etc.

 

DataSource Template(s)

Note: all this items applies to all derived classes like dropdown + Browses.
Feature: We removed some limitations when filtering using related DataSource . Now almost all combinations are possible ( Browse à another browse, dropdown à dropdown, form à browse, etc)
Sorting
oERS#4101 :Custom Sorting was not working correctly.
Filters
oFeature (ERS#2482): Added 2 new filter Types [ IsNull and IsNotNull ] .
oFix: Does not Contains was not working correctly.
oFix: Not Equals was not working correctly.
oAdded extra check to make sure that the user adds the filter to the correct side of the relation : If you have 2 browses with a 1:many, the RelatedDataSource filter only makes sense if added to the many side.

 

Browse Template

ERS#3975 : Fixed that the locator button should not cause a validation. This helps when using integrated form with a browse in same page.
ERS#4126: GridView was not adapting DataKeyNames and the ObjectDataSource parameters to different naming conventions and under certain cases the page will gave a compilation error.
ERS#4121 : Column length >1000 chars à not sortable
oThis was an unnecessary rule that we have removed. The sorting capabilities are determine by the Database provider information regarding the Database Type.

 

 

DropDown Template

ERS#4110: When using Nested Dropdowns (thus 1 dropdown that depends on another dropdown) and the naming of the fields don't match there will be a compilation error on the page.
ERS#3989 : Virtual properties could not be used as Display property because they will give exception.

 

 

Form Template

Multiple instances x page

The Form Template is not longer limited to 1 instance x Page.

 

This new feature had off course an effect over the generated code, therefore it might happen that your project (If created with previous versions) does not compile in v1.1 if you have added custom source.

 

The most important changes are:

Action property does not exist anymore and now its Form1_Action (where Form1 is the template Name).
URLs do not use Action directly but use this new property name as Key, MyForm.aspx?Form1_Action=Insert.
The Primary Key fields are also pre-fixed with the Template Name: Form1_CountryID.

 

Better Binding technique

The Form Template has an option Binding Technique, where one option is RelatedTemplate. This option allows you to use another template selection as the DataSource for the Form.

Feature (ERS#4049) : Now we support insert when Binding technique == Related Template.

 

Actions improvements

 

ERS#4069 : Most actions should not cause a validation. We now changed some of the action templates to use CauseValidation=false to allow better integration between a Browse (with actions) and in the same page an editable form.
Hide some (out of context) options
oIf the Insert Action is nested inside a Browse then you dont see “After successful insert”. Otherwise, if the insert action is nested inside the Form, this option is hidden.
oThe opposite occurs to “Form Item “ since it only makes sense when its inside a Browse.

 

Insert Template

ERS#2688 : Now is the Insert Template responsible for the “After successful insert” action. (before this Template option was in the form template).
ERS#4106 : When there are 2 related DataSource Templates (Browses for example) and they have a “Related DataSource Filter” and when you try to use insert action on the child, the priming could lead to an exception in the running application.
ERS#4106 : In the same scenario as before, the property name was taken from wrong side of relation causing URLs that would not really prime the related property correctly.
When the Target FormItem is present in the “same” Item, there is no need to use Redirect. Here was improved to just change the form action to Insert.
ERS#4094 : Wizard now places Insert in UI Location = above. The previous default = inline was very confusing since it did not allowed to insert new rows on empty tables.
Improvement (ERS#4084) : when the Insert Template is used inside the Browse to call a Form, and the form is inside the “same” page (integrated form and browse) now the templates avoids a redirect and just sets the action of the form to insert.
Fix (ERS#4021) : If a Browse only contained the insert template it would give compilation error. It worked if the Update was also there.
Stay in Insert mode : Now longer uses a Redirect
oThis was a mayor problem if the page had other controls in it where state is important.

 

 

Ajax Template(s)

ERS#4098 : Fixed exception when dropping Ajax Control templates into a User Control. Now the template shows disabled (not valid context) in this case.
ERS#4071 : The ValidationSummary NEEDS to be inside the Ajax update panel,otherwise we dont correctly see the validation errors.
ERS#4061 : Fixed AJAX calendar issue with different localizations (EnableGlobalization).
ERS#4004 : Manually added Updatepanel did not worked correctly.
ERS#3993 : WebMask control removed during generation causes exception.
ERS#3181 : Deleting ajax extension was not removing the controls

 

 

Security Templates

GenWise Role provider: Simplified + Improved.

 

The previous version of this Template was asking some unnecessary questions. For example: it was asking to the user to select properties which could be calculated by the template. This was modified, not only for simplification reasons but also because the “related property” could be a lookup property ( thus, not belonging to the main/root Object).

 

 

The Templates where changed to actually automatically detecting and using lookup properties as UserName.