Your browser may have trouble rendering this page. See supported browsers for more information.

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

Title

Quino v2.0-beta1: Configuration, services and web

Description

The summary below describes major new features, items of note and breaking changes. The <a href="https://secure.encodo.ch/jira/secure/ReleaseNote.jspa?projectId=10006&version=17403">full list of issues</a> is also available for those with access to the Encodo issue tracker. <h>Highlights</h> These are the big ones that forced a major-version change. <ul> Rewrote <b>configuration and application API</b>. (<a href="https://secure.encodo.ch/jira/browse/QNO-4666">QNO-4666</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4679">QNO-4679</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4659">QNO-4659</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4772">QNO-4772</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4663">QNO-4663</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4664">QNO-4664</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4360">QNO-4360</a>) Data-driver architecture has been consolidated. All drivers, <b>ADO, Mongo and Remote</b>, now use the same base implementation, logic and optimization. (<a href="https://secure.encodo.ch/jira/browse/QNO-4461">QNO-4461</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-2913">QNO-2913</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4683">QNO-4683</a>) Rewrote schema migration to return a list of <b>DDL commands</b> (<a href="https://secure.encodo.ch/jira/browse/QNO-4732">QNO-4732</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4726">QNO-4726</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4727">QNO-4727</a>) Also improved schema-migration and <b>mapping to database</b> (<a href="https://secure.encodo.ch/jira/browse/QNO-4708">QNO-4708</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4708">QNO-4709</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4605">QNO-4605</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4725">QNO-4725</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4605">QNO-4605</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4728">QNO-4728</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4720">QNO-4720</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4728">QNO-4728</a>) Updated the entire <b>security and access-control</b> and <b>authentication</b> API, including adding extensive support for tokens for both ASP.NET MVC and WebAPI. (<a href="https://secure.encodo.ch/jira/browse/QNO-4754">QNO-4754</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4757">QNO-4757</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4747">QNO-4747</a>>) Renamed <c>IMessageRecorder</c> to <b><c>IRecorder</c></b>, <c>IMessageStore</c> to <c>IInMemoryRecorder</c> and consolidated <c>IFilteredMessageRecorder</c> to <c>IRecorder</c>. (<a href="https://secure.encodo.ch/jira/browse/QNO-4686">QNO-4686</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4696">QNO-4696</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4750">QNO-4750</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4557">QNO-4557</a>) </ul> Some smaller, but important changes: <ul> Added support for <b><c>RunInTransaction</c></b> attribute. Specify the attribute on any <c>IMetaTestFixture</c> to wrap a test or every test in a fixture in a transaction. (<a href="https://secure.encodo.ch/jira/browse/QNO-4682">QNO-4682</a>) <b>Shared connection manager</b> is now disposed when an application is disposed. (<a href="https://secure.encodo.ch/jira/browse/QNO-4752">QNO-4752</a>) </ul> <h>Breaking changes</h> Oh yeah. You betcha. This is a major release and we've knowingly made a decision not to maintain backwards-compatibility at all costs. Good news, though, the changes to make are relatively straightforward and easy to make if you've got a tool like ReSharper that can update <c>using</c> statements automatically. <h level="3">Namespace changes</h> As we saw in <a href="{app}view_article.php?id=3058">part I</a> and <a href="{app}view_article.php?id=3064">part II</a> of the guide to using <i>NDepend</i>, Quino 2.0 has unsnarled quite a few dependency issues. A large number of classes and interfaces have been moved out of the <c>Encodo.Tools</c> namespace. Many have been moved to <c>Encodo.Core</c> but others have been scattered into more appropriate and more specific namespaces. This is one part of the larger changes, easily addressed by using ReSharper to <kbd>Alt</kbd> + <kbd>Enter</kbd> your way through the compile errors. <h level="3">Logging changes</h> Another large change is in renaming <c>IMessageRecorder</c> to <c>IRecorder</c> and <c>IMessageStore</c> to <c>IInMemoryRecorder</c>. Judicious use of search/replace or just a bit of elbow grease will get you through these as well. <h level="3">Configuration changes</h> Finally, probably the most far-reaching change is in merging <c>IConfiguration</c> into <c>IApplication</c>. In previous versions of Quino, applications would create a configuration object and pass that to a platform-dependent Quino <c>Run()</c> method. Some configuration was provided by the application and some by the platform-specific method. The example for Quino 1.13.0 below comes from the JobVortex Winform application. <code> var configuration = new JobVortexConfiguration { MainSettings = Settings.Default }; configuration.Add(new JobVortexClientConfigurationPackage()); if (!string.IsNullOrEmpty(Settings.Default.DisplayLanguage)) { configuration.DisplayLanguage = new Language(Settings.Default.DisplayLanguage); } WinformDxMetaConfigurationTools.Run( configuration, app => new MainForm(app) ); </code> In Quino 2.0, the code above has been rewritten as shown below. <code> using (IMetaApplication application = new JobVortexApplication()) { application.MainSettings = Settings.Default; application.UseJobVortexClient(); if (!string.IsNullOrEmpty(Settings.Default.DisplayLanguage)) { application.DisplayLanguage = new Language(Settings.Default.DisplayLanguage); } application.Run(app => new MainForm(app)); } </code> As you can see, instead of creating a configuration, the program creates an application object. Instead of using configuration packages mixed with extension methods named "Integrate", "Configure" and so on, the new API uses "Use" everywhere. This should be comfortable for people familiar with the OWIN/Katana configuration pattern. It does, however, mean that the <c>IConfiguration</c>, <c>ICoreConfiguration</c> and <c>IMetaConfiguration</c> don't exist anymore. Instead, use <c>IApplication</c>, <c>ICoreApplication</c> and <c>IMetaApplication</c> Again, a bit of elbow grease will be needed to get through these compile errors, but there's little to no risk or need for high-level decisions. There are a lot of these prepackaged methods to help you create common kinds of applications: <ul> <c>UseCoreConsole()</c> (a non-Quino application that uses the console) <c>UseMetaConsole()</c> (a Quino application that uses the console) <c>UseCoreWinformDx()</c> (a non-Quino application that uses Winform) <c>UseMetaWinformDx()</c> (a Quino application that uses Winform) <c>UseReporting()</c> <c>UseRemotingServer()</c> Etc. </ul> I think you get the idea. Once we have a final release for Quino 2.0, we'll write more about how to use this new pattern. <h>Looking ahead to 2.0 Final</h> This is still just an internal beta of the 2.0 final version. More changes are on the way, including but not limited to: <ul> Remove <c>IConfigurationPackage</c> and standardize the configuration API to be named "Use" everywhere (<a href="https://secure.encodo.ch/jira/browse/QNO-4771">QNO-4771</a>) <c>GenericObject</c> improvements (<a href="https://secure.encodo.ch/jira/browse/QNO-4761">QNO-4761</a>, <a href="https://secure.encodo.ch/jira/browse/QNO-4762">QNO-4762</a>) Change compile location for all projects (<a href="https://secure.encodo.ch/jira/browse/QNO-4756">QNO-4756</a>) Move a lot of properties from <c>ICoreApplication</c> and <c>IMetaApplication</c> to configuration objects in the service locator. Also improve use of and configuration of service locator (<a href="https://secure.encodo.ch/jira/browse/QNO-4659">QNO-4659</a>) More improvements to the recorders and logging (<a href="https://secure.encodo.ch/jira/browse/QNO-4688">QNO-4688</a>) Changes to how ORM objects and metadata are generated. (<a href="https://secure.encodo.ch/jira/browse/QNO-4506">QNO-4506</a>) Separate Encodo and Quino assemblies into multiple, smaller assemblies (<a href="https://secure.encodo.ch/jira/browse/QNO-4376">QNO-4376</a>) </ul> See you there!