# Monday, August 20, 2012

The OpenNETCF ORM has supported SQLite for a while now – ever since I needed an ORM for Android – but somehow I’d overlooked addeing SQLite support for the Compact Framework.  That oversight has been addressed and support is now in the latest change set (99274).  I’ve not yet rolled it into the Release as it doesn’t support Dynamic Entities yet, but that’s on the way.

Monday, August 20, 2012 12:07:50 PM (Central Daylight Time, UTC-05:00)  #     | 
# Tuesday, August 14, 2012

One limitation with using the SmartClientApplication as a basic for your IoC application is that it locks you in to the type of Form that’s going to be displayed when your app starts up.  In most cases that’s really not an issue, but sometimes you’d like to decide at runtime what UI to display.  You might even want that UI to come from a dynamically loaded DLL.

Well I just added a new capability to the SmartClientApplication.  During the startup process, the framework now looks in the Services collection to see if you’ve already registered a Form deriving from the new ShellReplacement base class.  If it finds one, that form will be shown instead of the type passed into the SmartClientApplication.  The effectively gives you a “default” main shell form, with the ability to dynamically load a different one based on whatever criteria you want.  We’re using it to support vertical-specific UIs for the Solution Engine, meaning that if you have the HVAC module installed you’ll get one UI but if you have the Telematics module installed you’ll get another.

The implementation details are as trivial as I could think of making them.  First, create your new shell Form like this:

   1: public partial class HVACMainView : ShellReplacement
   2: {
   3:     public HVACMainView()
   4:     {
   5:         InitializeComponent();
   6:     }
   7: }

Then register it as the replacement when your Module loads:

   1: public class Module : ModuleInit
   2: {
   3:     public override void AddServices()
   4:     {
   5:         RootWorkItem.Services.AddNew<HVACMainView, ShellReplacement>();
   6:     }
   7: }

That’s all there is to it.  You can disable the feature by using the EnableShellReplacement property (defaults to true) of the SmartClientApplication.  Get the latest change set (69942 or later) to try out the new feature.

Tuesday, August 14, 2012 3:05:29 PM (Central Daylight Time, UTC-05:00)  #     | 
# Wednesday, August 08, 2012

I’ve released version 1.0.12221 of the OpenNETCF IoC framework.  Not a whole lot new going on – it was primarily bug fixes – but binaries for all supported Platforms (Full framework, Compact Framework, Windows Phone and Mono for Android) are included.  If you’re using it, how about showing me some love and rating it (other than “Have not used it yet” – what kind of review is that?).

http://ioc.codeplex.com/releases/view/82674#ReviewsAnchor

Wednesday, August 08, 2012 10:38:34 AM (Central Daylight Time, UTC-05:00)  #     | 
# Tuesday, July 24, 2012

The Data Collector feature in our Solution Family product line is one of the oldest (if not the oldest) sections of code, and as such it's in need of a refactor to improve how it works.  We've updated just about everything else that uses data storage to use the OpenNETCF ORM framework, but Data Collectors have languished, largely because they are complex.  The Data Collector lets a user create an ad-hoc data collection definition that translates into a SQL Compact Table at run time.  The problem with migrating to ORM is that the ORM requires compile-time definitions of all Entities.  At least that was the problem until today.

I just checked in a new change set that supports the concept of a DynamicEntity (along with all of the old goodness that is ORM).  Now you can create and register a DynamicEntityDefinition with your IDataStore at run time and it will generate a table for you in the back end.  New overloads for all of the typical CRUD commands (Select, Update, Insert, Delete) allow you to just ask for the DynamicEntity by name and it returns an array of DynamicEntity instances that hold the field names and data values.

It's in a "beta" state right now, but there's a test method in the change set that shows general usage of all CRUD operations.  Give it a spin, and if you find any bad behavior, report it on Codeplex.

Tuesday, July 24, 2012 2:27:45 PM (Central Daylight Time, UTC-05:00)  #     | 
# Friday, June 15, 2012

It was easy to miss, but Microsoft publicly announced that Smart Device development projects will, in fact, be released in Visual Studio 2012 in Q1 of 2013.  It’s not news to me, but it is to most, and it’s way, way past due.

Friday, June 15, 2012 9:50:07 AM (Central Daylight Time, UTC-05:00)  #     |