Galin Iliev's blog

Software Architecture & Development

Add-Ins for your applications

I suppose most of you are pleased when some new cool add-in is released and it adds new feature to your favorite tool/utility. Most of us - developers - know about Reflector and it's ecosystem of useful add-ins.

Have you ever wanted to be able to create such applications without having to code by hand all these add-in infrastructure classes?!

Guess what?! New System.Addin namespace is coming with VS "Orcas" to facilitates you.

SideShow Gadgets with C#

Here are components that allow creating gadgets for SideShow with our favorite c#.

Microsoft called it Windows SideShow .NET Framework Components 1.0 (link) and...  unfortunately ... must be deployed to the client. But still this is very cool

Here short description from MS:

The Windows SideShow .NET Framework Components installs the runtime and development components that are required to build and run gadgets for Windows SideShow using the .NET Framework version 2.0. This download facilitates gadget development and enables developers to build compelling applications to support Windows SideShow-compatible devices. Users are required to install this component in order to run gadgets that have been built using the component.

Developer documentation can be found in the Windows SDK.

UPDATE: I just found that this is creating of great Jeffrey Richter

Here you can find how to use these APIs (http://msdn.microsoft.com/msdnmag/issues/07/01/SideShow/default.aspx)

VS 2005 SP1 is here. Go and get it....

The SP1 for Visual Studio 2005 with over 2200 bug fixes (yay) is here, however, don't just go installing without checking out the release notes file first. It includes warnings like: the install takes a loooooooooong time, requires a lot of hard drive space and has a lot of “features” that might be a little confusing. Here are some of the points from the Release Notes, but definitely read through the entire thing  in advance of installing or like many others who just got so excited and clicked the install button only to get very frustrated, you might find yourself dragging your sorry butt to the local watering hole to ease the pain.

Quoting from the Release notes:

Service pack installation takes longer than the original product installation:
Installing Visual Studio 2005 SP1 takes longer than installing the original release version because the SP1 installation is much like a product installation, but with additional installation tasks. Installation time depends on which product is installed and the computer’s configuration.

Installation requires significant disk space:
Disk space equal to that taken by the original product installation may be needed to install a service pack. If you have more than one Visual Studio product installed, you will need disk space for each service pack installation. You can find an estimate of the required disk space on the download page for the service pack.

Visual Studio 2005 SP1 tries to install multiple times:
The service pack will run multiple times if you have multiple Visual Studio products installed on your computer. Do not start the installation more than once.

Dialog boxes are partially hidden during installation:
This problem occurs if you move the Configuring … dialog box away from the center of the screen. Subsequent dialog boxes are centered on the Configuring … dialog box. If the Configuring … dialog box is near the corner of the screen, larger dialog boxes that display later may be partially off the screen.

Visual Studio 2005 SP1 will not install immediately after a Visual Studio compilation:
You cannot install Visual Studio 2005 SP1 until the debugger service closes.
To resolve this issue, do one of the following:
• Finish compilations that are in progress and wait for the debugger service to close. This could take up to ten minutes.
• Use the Task Manager to end all instances of the mspdbsrv.exe service.

Team Foundation Server prerequisites:
You must install the update from KB article 919156 (
http://support.microsoft.com/kb/919156) before you install Visual Studio 2005 SP1. This update makes sure that the server does not process client requests during the installation of SP1.

Uninstallation of Visual Studio 2005 Web Application Projects required:
Follow these steps to install Visual Studio 2005 SP1 if you have Visual Studio 2005 Web Application Projects installed:
1. Uninstall the Visual Studio 2005 Web Application Projects (
http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx) add-in.
2. Install Visual Studio 2005 SP1.

WPF/E CTP is out

Microsoft released the first CTP for WPF/E. “WPF/E” is the Microsoft solution for delivering rich, cross-platform, interactive experiences including animation, graphics, audio, and video for the Web and beyond. Utilizing a subset of XAML (eXtensible Application Markup Language)-based Windows Presentation Foundation technology, “WPF/E” will enable the creation of content and applications that run within multiple browsers and operating systems (Windows and Macintosh) using Web standards for programmability. Consistent with Web architecture, the XAML markup is programmable using JavaScript and works well with ASP.NET AJAX. Broadly available for customers in the first half of 2007, “WPF/E” experiences will require a lightweight browser plug-in made freely available by Microsoft. The CTP contains the WPF/E plugin itself and SDK There is a Macintosh version as well Links: WPF/E Downloads WPF/E Dev Center

Demystifying C# 3.0 - Sahil Malik's series

MS MVP Sahil Malik wrote nice serie of short articles about C# 3.0

a) Demystifying C# 3.0 - Part 1: Implicitly Typed Local Variables "var"
b) Demystifying C# 3.0 - Part 2: Anonymous Types
c) Demystifying C# 3.0 - Part 3: Extension Methods
d) Demystifying C# 3.0 - Part 4: Lambda Expressions
e) Demystifying C# 3.0 - Part 5: Object and Collection Initializers
f)  Demystifying C# 3.0 - Part 6: (LINQ) Query Expression Translation (to C# 3.0)
g) Demystifying C# 3.0 - Part 7: Expression Trees

These topics are very good described. Enjoy

Layers of data driven aplication

Sahil Malik wrote a nice article were give short presentation of layers of typical data-driven application. The focus is on ADO.NET vNext CTP and it's goals. Here is the copy of it:

"

At the very heart of it, the next release of ADO.NET vNext targets to bridge the gap between the Conceptual Model and the Logical Model. But what are the various models we deal with? Well, they are;

The Physical Model: Data, on a computer lives in bits and bytes. When we are working at the physical model level, we tend to talk in terms of bits and bytes, various file system structures, paging, caching, heaps, indexes, file allocation records etc. When we used to program for mainframes, frequently your business logic would target the physical model directly. This is no longer the case when working with modern day high level languages. It is safe to assume that today we have reached a maturity level where in order to solve a business solution, you do not need to worry about the physical model for the most part.

The Logical Model: This is where today’s applications target their data. This typically is the place where data lives in rows and columns and tables and databases. You define relationships, constraints, you normalize, de normalize data. Usually the RDBMS takes care of the impedance mismatch between the logical model and the physical model, and over the last 20 years RDBMS’s have matured to a level where you need to target the physical model directly in extremely infrequent instances.

The Conceptual Model: This is what your end-client will relate to better. So instead of talking about Employee records, at this level you can talk about a concept called Employee, and a specific employee called SalesPerson, and another called CEO. These are typically referred to as entities. At this level you have various other concepts besides entities introduced, such as Entities, Values, Factories, Aggregates, Repositories, and Services.

Various concepts have been introduced over the years that help you model conceptual models. An example most of us have heard of, is UML. (I am going to reserve my judgment on UML – But I am curious, what are your thoughts on UML?)

The translation between conceptual and logical models is usually labor intensive and problematic. Various processes have been defined by management schools, typically grouped under the umbrella called “Domain Driven Development” (Here’s a good book - http://domaindrivendesign.org/ ). The problem of course is that this process is terribly time consuming, and is almost always deemed to fail because in a real world scenario it is nearly impossible to account for every use case unless you are working in a fixed requirements scenario with years of time at hand. In short, Domain Driven Development is the least worst choice in today’s world.  Some folks will argue that Domain Driven Development is the anti-thesis of SCRUM/Agile. I strongly disagree with that statement. These two are essentially unrelated to each other. If a proper Agile process helps you reduce the cost of change, then the same reduction in cost of change also applies to the domain model. So in that sense they go hand in hand.

But there is still a huge gap between the logical model and the conceptual model. There have been software approaches to bridging this gap earlier – typically in the shape of ORMs. ADO.NET vNext aims to bridge this gap as well, but ADO.NET vNext does not intend to be a sophisticated ORM. I think going forward ADO.NET will become like ASP.NET controls, where the inbuilt controls get you started and give you reusable knowledge, but if you need steroids you need to look at companies like telerik (www.telerik.com) for advanced functionality. Similarly, ADO.NET vNext will help you some, but there will be scope for third parties such as llblgen (www.llblgen.com) and deklarit (www.deklarit.com). And I feel all of these will continue to flourish and advance in a Microsoft ecosystem.

Presentation Model: Once you have your data model represented in concepts, you still need to present it to the actors. The actors can be users or external systems. In order to do so, in a well architected system you would tie your conceptual model with a presentation layer using a typical design pattern such as the MVP (Model View Presenter) or MVC (Model View Controller) design pattern etc. This gives you the utmost flexibility going forward."