This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

v4.0: New modeling API, expanded UI support and data improvements

Description

The summary below describes major new features, items of note and breaking changes. The full list of issues is in the release notes below and is available to those with access to the Encodo issue tracker. <ul> <a href="https://secure.encodo.ch/jira/secure/ReleaseNote.jspa?projectId=10006&version=23316">4.0-final</a> <a href="https://secure.encodo.ch/jira/secure/ReleaseNote.jspa?projectId=10006&version=23214">4.0-master3016</a> <a href="https://secure.encodo.ch/jira/secure/ReleaseNote.jspa?projectId=10006&version=22802">4.0-sprint3</a> <a href="https://secure.encodo.ch/jira/secure/ReleaseNote.jspa?projectId=10006&version=22712">4.0-sprint-move-code</a> <a href="https://secure.encodo.ch/jira/secure/ReleaseNote.jspa?projectId=10006&version=22700">4.0-sprint-remove-wrappers</a> </ul> <h>Highlights</h> <h level="3">Metadata & Modeling</h> Most of the existing metadata-building API has been deprecrated and replaced with a fluent API that is consistent and highly extensible. <ul> Improve support for <b>multi-language</b> properties (<a href="https://secure.encodo.ch/jira/browse/QNO-5437">QNO-5437</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5362">QNO-5362</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5481">QNO-5481</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5479">QNO-5479</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5477">QNO-5477</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5469">QNO-5469</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5468">QNO-5468</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5452">QNO-5452</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5290">QNO-5290</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5500">QNO-5500</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5478">QNO-5478</a>) Improve <b>metadata API</b> (<a href="https://secure.encodo.ch/jira/browse/QNO-5281">QNO-5281</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5502">QNO-5502</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-2901">QNO-2901</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5539">QNO-5539</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5508">QNO-5508</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5579">QNO-5579</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5578">QNO-5578</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5577">QNO-5577</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5575">QNO-5575</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5565">QNO-5565</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5560">QNO-5560</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5559">QNO-5559</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5545">QNO-5545</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5510">QNO-5510</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5493">QNO-5493</a>) Improve metadata-modeling for <b>expression-based</b> settings (fail fast) (<a href="https://secure.encodo.ch/jira/browse/QNO-5396">QNO-5396</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5361">QNO-5361</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5358">QNO-5358</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5355">QNO-5355</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5353">QNO-5353</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5453">QNO-5453</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-2750">QNO-2750</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5454">QNO-5454</a>) Add support for <b>auto-generated metaids</b> (<a href="https://secure.encodo.ch/jira/browse/QNO-5348">QNO-5348</a>) No longer allow setting of <c>IMetaProperty.Primary</c> (<a href="https://secure.encodo.ch/jira/browse/QNO-5400">QNO-5400</a>) Make wrapper metadata and <b>wrapper lists obsolete</b> (<a href="https://secure.encodo.ch/jira/browse/QNO-5325">QNO-5325</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5408">QNO-5408</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5256">QNO-5256</a>) Make <c>IMetaClass.Relations</c> and <c>IMetaClass.Actions</c> auto-managed and read-only sequences (<a href="https://secure.encodo.ch/jira/browse/QNO-5402">QNO-5402</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5400">QNO-5400</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5400">QNO-5400</a>) Renamed <c>IMetaBase.Identifier</c> to <c>IMetaBase.Name</c> (<a href="https://secure.encodo.ch/jira/browse/QNO-5412">QNO-5412</a>) Removed I18N module Removed <c>MetaBuilder</c> along with associated metadata builders and extension methods. </ul> <h level="3">UI</h> <ul> Use <b>layouts for all UIs</b> (Web, Winform, WPF) (<a href="https://secure.encodo.ch/jira/browse/QNO-5365">QNO-5365</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5418">QNO-5418</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5382">QNO-5382</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5379">QNO-5379</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5376">QNO-5376</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5359">QNO-5359</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5340">QNO-5340</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5335">QNO-5335</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5470">QNO-5470</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5501">QNO-5501</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4962">QNO-4962</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5413">QNO-5413</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5573">QNO-5573</a>) Added a <b>generalized WebAPI and UI</b> with a full-fledged Sandbox implementation (<a href="https://secure.encodo.ch/jira/browse/QNO-5472">QNO-5472</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5471">QNO-5471</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5411">QNO-5411</a>) Remove Winform dependency on GlobalContext (<a href="https://secure.encodo.ch/jira/browse/QNO-5050">QNO-5050</a>) Improve <b>asynchronous UI support</b> for Winform/WPF (<a href="https://secure.encodo.ch/jira/browse/QNO-5569">QNO-5569</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5563">QNO-5563</a>) </ul> <h level="3">Data</h> <ul> Make <c>GlobalContext</c> obsolete (<a href="https://secure.encodo.ch/jira/browse/QNO-5313">QNO-5313</a>) Make <c>IDataSession</c> sticky, by default (<a href="https://secure.encodo.ch/jira/browse/QNO-5018">QNO-5018</a>) Replace <c>IMetaReadable</c> and <c>IMetaWritable</c> with <c>IDataObject</c> (<a href="https://secure.encodo.ch/jira/browse/QNO-5429">QNO-5429</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5238">QNO-5238</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4737">QNO-4737</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-3043">QNO-3043</a>) Improve <b>data-seeding and generation</b> (<a href="https://secure.encodo.ch/jira/browse/QNO-5304">QNO-5304</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5546">QNO-5546</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5589">QNO-5589</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5568">QNO-5568</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5567">QNO-5567</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5566">QNO-5566</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5561">QNO-5561</a>) Add single-object saving (instead of whole graph) (<a href="https://secure.encodo.ch/jira/browse/QNO-2525">QNO-2525</a>) Remove <c>IDataSession.ActiveDataLanguages</c> (<a href="https://secure.encodo.ch/jira/browse/QNO-5476">QNO-5476</a>) Improve <b>default-value setting</b> & handling in <c>GenericObject</c> (<a href="https://secure.encodo.ch/jira/browse/QNO-5583">QNO-5583</a>) </ul> <h level="3">Code-generation</h> <ul> Improve compatibility of generated code with StyleCop/best practices (<a href="https://secure.encodo.ch/jira/browse/QNO-5252">QNO-5252</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5584">QNO-5584</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5515">QNO-5515</a>) Add support for <b>integrating interfaces</b> into generated code (<a href="https://secure.encodo.ch/jira/browse/QNO-5585">QNO-5585</a>) Finalize support for including <b>generated code in a separate assembly</b>. Generated code can now be in a separate assembly from the modeling code. Removed WinformDx code generator (<a href="https://secure.encodo.ch/jira/browse/QNO-5324">QNO-5324</a>) </ul> <h level="3">General</h> <ul> Improve <b>debugging with Quino sources</b> and Nuget packages (<a href="https://secure.encodo.ch/jira/browse/QNO-5473">QNO-5473</a>) Improve directory-services integration (<a href="https://secure.encodo.ch/jira/browse/QNO-5421">QNO-5421</a>) Reworked the plugins system (<a href="https://secure.encodo.ch/jira/browse/QNO-2525">QNO-2525</a>) Improve assembly-loading in tests and tools (<a href="https://secure.encodo.ch/jira/browse/QNO-5538">QNO-5538</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5571">QNO-5571</a>) Improve registration API for <b>external loggers</b>; integrate <i>Serilog</i> (<a href="https://secure.encodo.ch/jira/browse/QNO-5591">QNO-5591</a>) Improve schema-migration logging (<a href="https://secure.encodo.ch/jira/browse/QNO-5586">QNO-5586</a>) Allow customization of exception and message formatting (<a href="https://secure.encodo.ch/jira/browse/QNO-5551">QNO-5551</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-5550">QNO-5550</a>) </ul> <h>Breaking changes</h> <h level="3">Metadata & Modeling</h> <ul> The <c>Encodo.Quino.Builders.Extensions</c> namespace has been removed. All members were moved to <c>Encodo.Quino.Meta</c> or <c>Encodo.Quino.Builders</c> instead. The assembly <c>Quino.Meta.Standard</c> no longer exists and may have to be removed manually if Nuget does not remove it for you. Added default <c>CreateModel()</c> to <c>MetaBuilderBasedModelBuilderBase</c> Added empty constructor to <c>MetaBuilderBasedModelBuilderBase</c> <c>GetSubModules()</c> and <c>GetModules()</c> now returns <c>IMetaModule</c> instead of <c>IModuleAspect</c> Even deprecated versions of <c>AddSort()</c>, <c>AddSortOrderProperty()</c>, <c>AddEnumeratedClass()</c>, <c>AddValueListProperty()</c> all expect a parameter of type <c>IMetaExpressionFactory</c> or <c>IExpressionConstants</c> now. </ul> <h level="3">Data</h> <ul> The <c>IDataSessionAwareList</c> is used instead of <c>IMetaAwareList</c> Two constructors of <c>DataList</c> have been made private <c>GenericObject.DoSetDedicatedSession()</c> is no longer called or overridable None of the classes derived from <c>AuthenticatorBase</c> accept an <c>IApplication</c> as constructor parameters anymore. Instead, use the Application or Session to create the authenticator with <c>GetInstance<tservice>()</c>. E.g. if before you created a <c>TokenAuthenticator</c> with this call, <c>new TokenAuthenticator(Application)</c>, you should now create the <c>TokenAuthenticator</c> with <c>Application.GetInstance<tokenauthenticator>()</c>. You are free also to call the new constructor directly, but construction using the IOC is strongly recommended. The constructor for <c>DataSession</c> has changed; this shouldn't cause too many problems as applications should be using the <c>IDataSessionFactory</c> to construct instances anyway. DataGenerators have changed considerably. Implement the <c>IDataGenerator</c> interface instead of using the <c>DataGenerator</c> base class. The names of <c>ISchemaDifference</c> have changed, so the output of a migration plan will also be different. Software that depended on scraping the plan to determine outcomes may no longer work. Default values are no longer implicitly set. A default value for a required property will only be supplied if one is set in the model. Otherwise, a <c>NULL</c>-constraint violation will be thrown by the database. Existing applications will have to be updated: either set a default value in the metadata or set the property value before saving objects. </ul> <h level="3">Code-generation</h> <ul> The generated filename for builders has changed from "Extensions.cs to "Builders.cs". When you regenerate code for the V2 format, you will have include the new files and remove the old ones from your project. Data-language-specific properties are no longer generated by default because there is no guarantee that languages are available in a given application, You can still enable code-generation by calling <c>SetCodeGenerated()</c> on the multi-language or value-list property The generated MetaModelBuilder classes are no longer generated. <a href="https://secure.encodo.ch/jira/browse/QNO-5515">QNO-5515</a> </ul> <h level="3">General</h> <ul> <c>LanguageTools.GetCaption()</c> no longer defaults to <c>GetDescription()</c> because this is hardly ever what you wanted to happen. <c>CaptionExtensions</c> are now in <c>CaptionTools</c> and are no longer extension methods on <c>object</c>. <c>ReflectionExtensions</c> are now in <c>ReflectionTools</c> and are also no longer extension methods on <c>object</c>. </ul> <h level="3">Expressions</h> <ul> Redeclared <c>Operation<></c> with new method signature </ul> <h level="3">Windows-specific</h> Some Windows-specific functionality has been moved to new assemblies. These assemblies are automatically included for Winform and WPF applications (as before). Applications that want to use the Windows-specific functionality will have to reference the following packages: <ul> For <c>WindowsIdentity</c>-based code, use the <c>Encodo.Connections.Windows</c> package and call <c>UseWindowsConnectionServices()</c> For <c>ApplicationSettingsBase</c> support, use the <c>Encodo.Application.Windows</c> package and call <c>UseWindowsApplication()</c> For Directory Services support, use the <c>Encodo.Security.Windows</c> package and call <c>UseWindowsSecurityServices()</c>. </ul>