# Thursday, December 21, 2006

I just got "tagged" together with Steve, Don, Udi and Nicholas  by Clemens. So here are my five:

  1. The nickname "Lennybacon" was given to me by my girlfriend and is (probably) based on my middle name "Leonard" and the fact that I like bacon for breakfast.
  2. My surname is written without a "c" which is quite strange for most Germans (beside my certificate of birth about 80% of the official documents spell me the wrong way). The English way of spelling is because of my father who is an American and his forefathers who came from England.
  3. I started working with computers beside school and administered Novell and NT Networks.
  4. I programmed my first Windows application in 1996 using Delphi. At this time I still wanted to become a Carpenter. The only reason I did not become one is that in that company they started to drink alcohol at 8 o'clock (work started at 6).
  5. The oldest piece of a computer I own is a 15x15x0.5 inch disc with 4 MB storage. It was a present from a customer and given to me after finishing a project.

And the Oscar Tag goes to:

Michael, Thomas, Kenny, Bob and Craig

Thursday, December 21, 2006 5:32:33 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, November 17, 2006
Friday, November 17, 2006 4:38:47 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, November 03, 2006

DDD (developer developer developer) is back and will be held on Saturday 2nd December at the Microsoft Offices in Reading.

It is a pleasure for that I've been voted again to speak. This time I'll present "DataAccess Layers - Convenience vs. Control and Performance?" on my own and "Decoupling Service Oriented Backend Systems [with Windows Communication Foundation (WCF)]" together with my colleague Michael.

I'm looking forward to meet Craig, Barry, Oliver, Phil, Ian and all the U.K. Community.

The official DDD Site
http://www.developerday.co.uk/

The DDD Sign up
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032315483&Culture=en-GB

Michael Willers
http://staff.newtelligence.com/MichaelW/

Craig Murphy
http://www.craigmurphy.com/

Barry Dorrans
http://idunno.org/

Oliver Sturm
http://www.sturmnet.org/blog/

Phil Winstanley
http://weblogs.asp.net/plip/

Ian Cooper
http://www.dnug.org.uk/

Friday, November 03, 2006 12:56:14 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, October 31, 2006

I really like the idea Doug came up with in his latest post...

http://www.douglasp.com/blog/2006/10/31/InventingTheFuture.aspx

Tuesday, October 31, 2006 8:20:58 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, August 13, 2006

Microsoft introduces with Vista/IE7/Office2007 the Microsoft RSS Platform -

For some reasons my IE is not able to export the feeds that I read in IE7 and Outlook 2007 to OPML.

I had a look at the API and wrote this small console applictaion to export my feed list to the OPML format.

using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Xml;
 
using Microsoft.Feeds.Interop;
using System.Collections.Generic;
 
namespace RssWindowsPlatformOpmlExporter
{
    class Program
    {
        static void Main(string[] args)
        {
            string pathToExport = "D:\\temp\\feeds.opml";
            if (args.Length > 0)
            {
                pathToExport = args[0];
            }
 
            FeedsManager mgr = new FeedsManager();
            Queue<IFeedFolder> queue = new Queue<IFeedFolder>();
            queue.Enqueue(mgr.RootFolder as IFeedFolder);
 
            while (queue.Count > 0)
            {
                IFeedFolder currentFolder = queue.Dequeue();
                IFeedsEnum subFolders = (IFeedsEnum)currentFolder.Subfolders;
 
                for (int i = 0; i < subFolders.Count; i++)
                {
                    queue.Enqueue((IFeedFolder)subFolders.Item(i));
                }
 
                using (XmlWriter opml = XmlWriter.Create(pathToExport))
                {
                    opml.WriteStartDocument();
                    opml.WriteStartElement("opml");
                    opml.WriteAttributeString("version", "1.0");
 
                    IFeedsEnum feeds = (IFeedsEnum)currentFolder.Feeds;
                    for (int i = 0; i < feeds.Count; i++)
                    {
                        IFeed feed = (IFeed)feeds.Item(i);
 
                        try
                        {
                            if (!string.IsNullOrEmpty(feed.Title) 
                                && !string.IsNullOrEmpty(feed.DownloadUrl))
                            {
                                opml.WriteStartElement("outline");
                                opml.WriteAttributeString("title", feed.Title);
                                opml.WriteAttributeString("xmlUrl", feed.url);
                                opml.WriteEndElement();
                            }
                        }
                        catch (COMException e)
                        {
                            Console.WriteLine(
                                "Error getting feed: {0}", 
                                e.Message);
                        }
                    }
 
                    opml.WriteEndElement();
                    opml.WriteEndDocument();
                }
            }
        }
    }
}
C# | Misc
Sunday, August 13, 2006 3:42:42 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, August 09, 2006

I'm currently helping a customer to migrate a *really large* web application from ASP.NET 1.1 to 2.0 (round about 130 projects in the master solution...).

I always liked FxCop but enabling "Code Analysis" manually is way to complicated (or not geekish enough?!?). So I wrote this small macro this morning.

Imports System

Imports System.Diagnostics

Imports System.Text

Imports System.Windows.Forms

 

Imports EnvDTE

Imports EnvDTE80

 

Public Module CodeAnalysis

 

    Public Sub EnableFxCop()

        Dim objProj As Object()

        Dim proj As Project

 

        For i As Integer = 1 To DTE.Solution.Projects.Count

            proj = DTE.Solution.Projects.Item(i)

            EnableFxCop(proj)

        Next

    End Sub

 

    Private Sub EnableFxCop(ByVal project As Project)

 

        If project.Kind = "{66A26720-8FB5-11D2-AA7E-00C04F688DDE}" Then

            'Filter Project Folders

            For Each subProject As ProjectItem In project.ProjectItems

                EnableFxCop(subProject.SubProject)

            Next

        Else

            project.ConfigurationManager.ActiveConfiguration.Properties.Item( _

                "RunCodeAnalysis").Value = "True"

 

            project.ConfigurationManager.ActiveConfiguration.Properties.Item( _

                "CodeAnalysisRules").Value = String.Concat( _

                    "-Microsoft.Design#CA2210;", _

                    "-Microsoft.Design#CA1020;", _

                    "-Microsoft.Naming#CA1705;", _

                    "-Microsoft.Naming#CA1709")

            project.Save()

        End If

    End Sub

End Module

Wednesday, August 09, 2006 2:50:21 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [2]  | 
# Monday, July 17, 2006

thinktecture and newtelligence AG present a week of Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows Workflow Foundation (WWF): TornadoCamp WinFX.

Christian, Ingo, Michael and me will present from the 16th - 20th of october in Bad Ems in GERMAN!

C# | Event | Indigo | WCF
Monday, July 17, 2006 1:57:23 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 

I posted some Bits Michael and I wrote recently in a WCF Project:

The Constraints-Extensions let you easily define attribute based limitations for input, output and return parameters. Limitations can be set to service contracts operations as well as to data contract data member implementations. The constraints validation gets called at runtime by the WCF infrastructure and the behavior will throw a ConstraintViolationException with descriptive messages in case of a constraint gets violated/the validation fails.

The following constraint attributes have been implemented:

  • Between
  • BetweenExclusive
  • CompareAgainst
  • EarlierThanNow
  • EarlierThanToday
  • EqualTo
  • GreaterEqualTo
  • GreaterThan
  • LaterThanNow
  • LaterThanToday
  • LessEqualTo
  • LessThan
  • Match
  • MaxElements
  • MaxLength
  • MinElements
  • MinLength
  • NotBetween
  • NotEmpty
  • NotEqualTo
  • NotNull
  • Nullable
  • OneOffยท    

Data Contract Sample:

[DataContract]
class
TestClass
{
    [DataMember]
    [LessEqualTo(CompareAgainst.FieldOrProperty,"EndDate")]
    public DateTime StartDate;

    [DataMember]
    [GreaterEqualTo(CompareAgainst.FieldOrProperty, "StartDate")]
    public DateTime EndDate;

    public TestClass(DateTime startDate, DateTime endDate)
    {
        StartDate = startDate;
        EndDate = endDate;
    }
}

 

Service Contract Sample:

[ServiceContract, ConstraintsValidatorBehavior]
interface
ITestConstraints
{

    [OperationContract]
    [return:GreaterEqualTo(0)]
    int MethodA(
        [Between(0,100)]
        int a,
        [LessEqualTo(20)]
        double b,
        [NotEmpty]
        string c); 

    [OperationContract]
    int MethodB(
        [Between(0, 100)]
        int a,
        [LessEqualTo(20)]
        ref double b,
        [NotEmpty]
        out string c);

    [OperationContract]
    [return:LaterThanNow]
    DateTime MethodC(
        [GreaterThan(0)]
        int a);

 

    [OperationContract]
    void MethodD(
        [VerifyObject]
        TestClass a);
}


Download at wcf.netfx3.com

C# | Indigo | Projects | WebServices | WCF
Monday, July 17, 2006 1:43:28 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [1]  | 
# Tuesday, June 06, 2006

Developer day[1] (DDD) in Reading (U.K.) was again really a great experience. My talk together with Michael[2] went fine and we really enjoyed the great audience. And the weather was sooooo sunny - unbelievable.

It was nice to meet Melita Walton, Craig Murphy[3], Benjamin Mitchel[4], Ian Cooper, Phil Winstanley (Plip)[5], Dave Sussman[6], Guy Smith-Ferrier[7] and so on.

Take a look at the pics Plip posted http://www.flickr.com/photos/plip/sets/72157594154434387/

[1] http://www.developerday.co.uk/ddd/
[2] http://staff.newtelligence.net/michaelw/
[3] http://www.craigmurphy.com/
[4] http://benjaminm.net/
[5] http://weblogs.asp.net/plip/
[6] http://aspadvice.com/blogs/dsussman/
[7] http://www.guysmithferrier.com/

Tuesday, June 06, 2006 9:50:38 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, May 16, 2006

Two tools really useful if you work with AJAX

ASP.NET | C#
Tuesday, May 16, 2006 2:04:19 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |