Logical Matrix - Software design & development

Ottawa, ON. Canada

.NET software development blog

2009/February
Met someone at work that thought XML based databases are new! I had to remind him that IBM had DL/I (Data Language I) database that I used back in 1991 that had the same hierachical schema based data storage machanism. We even had a XPath 'like' language to find/navigate and retrieve data nodes. In software, we 'forget' things and we re-invent the same thing a few decades later... but we must thank the original inventor (in this case IBM) for their contribution. IBM is one of the giants in computing...
2009/March
Learnt Microsoft's Entity Framework ORM (Object Relational Mapping) tool (with Visual Studio 2008). This is very cool. Took me no more than a day to get started. The chosen database tables are examined by the ORM tool and it creates corresponding .NET classes where we can perform CRUD (Create/Read/Update/Delete) operations against those tables. It's convienient that the relational aspects of recognized and taken care of as well. Used this for the An-Aid-To-Help foundation's application development.
2009/June
Experienced some of the pain points with Microsoft's Entity Framework ORM (Object Relational Mapping) tool. The issue is when we use n-tier applications and want change tracking on disconnected entity objects. Unfortunately the current version of the Entity Framework does not support change tracking if the entity is disconnected from it's session! Had to abandon the use of the ORM tool in a medium sized project because of this n-tier limitation issue!
2009/June
Learnt the open source nHiberate ORM (Object Relational Mapping) tool for the .NET framework. This tool requires a lot of manual configuration compared to Microsoft's Entity Framework ORM tool. It's a pain to have to describe each database table structure using their own XML schema. In addition a C# class has to be created manually for each table to match the model described in the XML schema (luckily they provide an XSD for the mapping schema). Once all the setup is done using nHibernate is not too bad. There is a significant delay at start-up though (over 1 second) when it parses and verifies the database table mappings, etc,...
2009/July
Experienced some of the pain points with nHibernate usage. There isn't enough documentation around to describe some of the processes in using a more-than-standard data model. For example, when using a composite key, the framework requires a lot more work on our part to describe the key (and wants us to create a new C# class to go with it too!). This is bit of a pain. I am wondering where the time-saving-benefit of using this ORM tool is!
2009/Oct
Found a big issue with the current nHibernate implementation. The issues in only when the ASP.NET application is configured for a web-farm and the entity objects use lazy loading for their collections and the these model objects are stored in the session collection. With this configuration, nHibernate falls flat on it's face! I spent several days figuring-out the issue. The nHibernate framework seems to use the 'decorator' design-pattern to add the run-time functionality to the 'basic' entity model classes we create. However when these 'decorator' classes are placed in the session collection, then serialized and deserialized (via state-server/SQL-Server), there is an error that results in an undefined object reference with the nHibernate code. Unfortunately there seems to be no fix (or workaround for this issue)! Unfortunately, the requirement needs lazy loading because the collection itself had many collections (so performance would be very poor without lazy loading). This is real issue for real-world enterprise level applications. So, long-story short, had to abandon nHibernate use for these 'collection' classes and write 'own flavour' of model classes with manual lazy loading implementation. It took me a while, however this works beautifully and performs way faster than nHibernate (a bonus!)
2009/Nov
Involved in finishing-up a Windows Forms C# .NET application. Switching between ASP.NET and Windows Forms isn't as much fun as one would expect! I seem to be thinking too much in terms of page life-cycles (even for Windows Forms)!
2010/Jan
OK, most of the month I was away in the beautiful tropical island of Sri Lanka. Enjoyed the hospitality and the spicy food, along with time at the warm sandy beaches of the southern coast. A perfect winter getaway destination!
2010/Jan
Finally switched over to using WPF with Visual Studio 2008. Amazed by the flexibility associated with rendering control content. The ListBox control can be made to render just about anything as an item... including graphics... simply by describing the layout/content using XAML (no need to write any .NET code in C#). This is a big improvement compared to the days of Win32 (with Visual C++) where I had to take-over the derived control's Paint method and manually paint each item on the graphics surface! Love the CSS like styles feature of WPF controls. Clients will love this.
2010/Feb
Realized that WPF (with .NET 3.5) lacks MDI window management features. This is not a big issues (since a few folks have already created a WPF based solutions), however I am waiting for the official release from Microsoft to address this requirement in a consistent manner.
2010/Mar
Happy with SQLServer management studio 2008 that finally is capable of creating SQL insert statements when exporting scripts using the 'Generate Scripts' functionality. We've all written programs that did exactly this before... individually!
2010/Jun
Had fun making changes to an ASP.NET 3.5 application. It's all coming back, dual validation, Ajax and all! I love GoDaddy's online database and data manipulation tools.
2010/Jul
Moved some Windows.NET Forms and code to a new WPF application. Data binding in WPF is such as pleasure to setup within XAML. It feels weired looking back at how databinding has to be setup in Windows Froms applications. Going forward, I'm sticking with WPF! Windows Forms is probably going to meet the same fate as Visual C++. It'll remain but will be used only for very specific applications where absoulute control or performance is needed.

Nalin D.Jayasuriya is a software architect/developer with over 25 years of software design & development experience. He holds a BS and MS in computer science.

Here's the LinkedIn page.

© Copyright 2009,2010 by LogicalMatrix - Nalin D Jayasuriya. All rights reserved. Ottawa, ON. Canada.