First understand
Posted in VSR | Web 2.0

RDF Metadata Following the VSR group's main idea, I spend some time in updating my personal FOAF file. The best way to understand Semantic Web is practicing it. The resource you know the most about is your person. So, FOAF provides you some neat opportunities to get in touch with W3C's RDF technology.

Posted at Friday, February 15, 2008 1:07:02 PM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

Jim Nakashima gives some insight view how the Cider adorners work [1].

[1] http://blogs.msdn.com/jnak/archive/2006/04/24/580393.aspx

Posted at Wednesday, January 23, 2008 11:16:48 AM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

Shawn Burke shows how to debug .NET source code in Visual Studio. all you need is to install the Visual Studio 2008 QFE [1] and then follow Shawn's instructions [2].

[1] https://connect.microsoft.com/VisualStudio/Downloads/...
[2] http://blogs.msdn.com/sburke/...

Posted at Friday, January 18, 2008 9:12:32 AM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

SPARQL has been finally published as W3C recommendation [1].

[1] http://www.w3.org/TR/rdf-sparql-query/

Posted at Wednesday, January 16, 2008 9:48:25 AM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

Today, Daniel helped my to solve a long standing miracle. For some unknown reason, Vista decided not to support hibernate on my Toshiba m400 anymore. So what to do:

Start the command prompt and type powercfg -H ON.

You won't see anything on the screen, but when going back to your advanced power potions you will see both, hibernate and hybrid sleep again.

 Vista Power Options

That's all - and you can send your machine to hibernate again.

Send to Hibernate

Posted at Tuesday, January 08, 2008 11:01:07 AM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

Andrew Matthews describes another interesting pattern in [1], which he called Ambient Content Pattern :

"Provide a place to store scope or context related information or functionality that automatically follows the flow of execution between execution scopes or domains."

[1] http://aabs.wordpress.com/2007/12/31/the-ambient-context-design-pattern-in-net/

Posted at Wednesday, January 02, 2008 2:38:13 PM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

Microsoft offers free copies of the following books at [1]:

Introducing Microsoft LINQ by Paolo Pialorsi
Introducing Microsoft ASP.NET AJAX by Dino Esposito
Introducing Microsoft Silverlight 1.0 by Laurence Moroney


[1] http://csna01.libredigital.com/

Posted at Wednesday, January 02, 2008 8:39:36 AM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

Since I read "Design Patterns. Elements of Reusable Object-Oriented Software" by the GoF the very first time in 1999, I am a big fan of patterns at all. Making heavy use of factory patterns such as the Factory Method or Abstract Factory I came along with a useful pattern we call a Declarative Factory. A Declarative Factory is based especially on the Attribute construct in the .NET Framework and allows you to extend new classes with factory capabilities in a zero-effort manner. The idea behind this pattern is to extend your application with new constructs in form of extensions without touching already existing code. This is possible when your extensions are provided by container objects. The key element here is about the new elements which you are not aware in your code yet.

This pattern is much like a Abstract Factory, however, there is no need  to create a concrete Factory class.
Also you add factory capabilities to  a new class by only adding the corresponding attribute.

Declarative Factory Pattern

First we have a look at the actual container object. Here we tell the container object to provide factory capabilities to create ConcretePrototype instances. The FactoryContainer can be any class we are using within our application, as example this could be a sub-class of ListViewItem in a WPF-based application.

[DeclarativeFactory(typeof(ConcretePrototype))]
public class FactoryContainer { }

The declaration of the ConcretePrototype is also straightforward. The IPrototype is the common interface for all prototypes that can be created by the Declarative Factory. If this pattern is applied to a WPF-based object this could also something like a DependencyObject or a FrameworkElement. In this case the DeclarativeFactory cold provide factory capabilities for the corresponding types.

public class ConcretePrototype : IPrototype

The attribute itself looks as following:

DeclarativeFactory Attribute

The magic now, lies in the way how to invoke the factory method provided by the Declarative Factory.

FactoryContainer container = new FactoryContainer();

DeclarativeFactoryAttribute[] a_attrib =
   (DeclarativeFactoryAttribute[]) container.GetType().GetCustomAttributes(
typeof(DeclarativeFactoryAttribute), true); IPrototype prototype = a_attrib[0].Create() as IPrototype;

You just resolve the factory attribute and call the factory method. Very easy, isn't it? However, you have to keep a few things in mind about this pattern.  First of all, it makes no sense if you already know about the class you want to instantiate. So, there is absolutely no reason to apply the Declarative Factory to the class itself. In this case you should definitely stay with common patterns such as the Factory Method. If you are going to make you project extensible where new types are provided through container objects this pattern appears to be very handy .

You can download the example source code for this pattern (under MS-Pl) at CodePlex [1].

 

[1] http://www.codeplex.com/declarativefactory

Posted at Tuesday, January 01, 2008 12:33:33 PM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 

After reading about dzone [1] in Matthias' blog [2], I signed up an account there and published my first article [3]. Having only a very quick look on this portal, it looks to me like one of those few, providing additional value.

dzone

[1] http://www.dzone.com/
[2] http://unmaintainable.wordpress.com/2007/12/22/one-year-of-blogging/
[3] http://www.dzone.com/links/wcf_net_35_and_http_request_content.html

Posted at Monday, December 31, 2007 12:31:07 PM (W. Europe Standard Time, UTC+01:00) 
Comments [1] #      | 

web.config files can be easily extended using the configSection tags.

A brief overview is given by Aaron Johnson on his blog [1], referring the original MSDN documentation [2].

[Update 12/31/2007]

Also another brief summary by Dieder Tierman [3] and a very good How-to on MSDN [4] how to write own section handlers.

[1] http://cephas.net/blog/2003/09/26/extending-webconfig-in-aspnet/
[2] http://msdn2.microsoft.com/en-us/library/0hyxd0xc(vs.71).aspx
[3] http://ms-dotnet.blogspot.com/2007/01/create-custom-configuration-section-in.html
[4] http://msdn2.microsoft.com/en-us/library/2tw134k3.aspx

Posted at Monday, December 31, 2007 9:42:34 AM (W. Europe Standard Time, UTC+01:00) 
Comments [0] #      | 
Copyright © 1995-2009 by Andreas Heil. aheil is a registered trademark of Andreas Heil. All rights reserved.
The opinions expressed herein are my own personal opinions and do not represent my employers' views in any way. Content and thoughts expressed on these pages and the weblog are subject to be changed. Out of date posts should not be considererd as my current thoughts and opinions.