Reflection IT Blog

Benieuwd naar de laatste ontwikkelingen rondom software ontwikkeling en Reflection IT? Onze slimme koppen delen regelmatig hun kennis en ervaring. Zo weet jij wat er speelt!

Fons Sonnemans Blog posts

New layout www.reflectionit.nl

30-Aug-2004

I have changed the layout of my website this weekend. A friend of my helped me with the design, thanks Loek

I'm not really finished. I still have to translate some pages to Dutch. I also want to add 'comments' to the Blog. Hope to do this soon.

Visual C# 2005 Express Edition Beta is great

14-Jul-2004

I'm testing Visual C# 2005 Express Edition Beta and I really like it. It has all of the features which I need to build Windows Forms applications. The Editor has also all new IntelliSense, Refactoring and Code Snippets features. They work great and really can boost productivity.

I have tested it on a PC with only 256Mb of ram. This is for the beta not enough. You need at least 512Mb.

I'm using the Online MSDN Help, it works OK. The looks are good but I find it difficult to get to the 'overview' of a class.

For professional development I would advise to use Visual Studio. For hobby work use the Express versions.

Second day

01-Jul-2004

After a disappointing soccer match yerterday I’m here to review the second day.

What disappoints me is that there are no sessions about Longhorn, WinFS, Xaml or Visual Studio Orca. I guess it is still so far away that it is not interesting to tell something about it. Still it is a pity. There should be new things to show after the PDC.

The overall quality of the sessions is OK, nothing special.

Tonight is the TechEd party, hope it will rock.

First Day

30-Jun-2004

This is my second day at TechEd. Yesterday was a good day. The Keynote started with a demo by a blind person (sorry I forgot his name). He demonstrated how difficult it is to surf the internet when you are blind and what we ‘developers’ should do to help him. The drum’s where very nice. It is funny to hear 6000 nerds drum. For the rest the keynote was boring.

I went to a very nice session WIN320 IIS and ASP.NET security. Not overwhelming but nice. My next session on DAT313 SQL Server 2005 Data Transformation Services was also nice. DTS has been greatly improved (at last).

The last two sessions did not really satisfy me. This could be my own fault. I was tired so I couldn’t concentrate very well.

I went to eat with my good friend Paul and some of his colleagues, Thai always good.

Today I’m going to a XP programming, InfoPath, WSE SQL 2005 session. Hope to enjoy myself. In the evening there is a big country party where we will watch the football game Portugal-The Netherlands. Hope we will win but once again I’m not very optimistic.

SmartPart for SharePoint

10-Jun-2004

Together with Jan Tielens, I have created a improved version of my User Control Container Web Part called the SmartPart for SharePoint.

Jan has written an introduction and even created a video demonstrating it in action.

We have created a GotDotNet Workspace for the SmartPart. Over there you can download an installation package that will install the SmartPart, the source code and an example user control. At this point there isn’t very much documentation, but I will work on that. :-) There are a lot of cool ideas which (I hope) will be added to the SmartPart (for example a connectable SmartPart). I’ve IM-ed with Patrick today and he has another cool idea which he discussed in one of his latest posts: using the User Interface Process block together with web parts. Anyway, some nice ideas are waiting to be implemented!

I will be at TechEd 2004 Amsterdam

12-May-2004

This will be my 6th TechED (97 and 98 in Nice, 99 and 2000 in Amsterdam, 2002 in Barcelona).

It is a great event in which I learn a lot and get lot's of inspiration. It's not cheap but it is worth every peny!

InitialFocus on a ASP.NET WebForm

28-Apr-2004

The PageUtil class has a static method SetInitialFocus(control) which can be used to generate a JavaScript for an ASP.NET page (WebForm), which sets the focus on a (given) control.

        private voidPage_Load(objectsender, System.EventArgs e)
        {
            // Set the InitialFocus on TextBox1
            ReflectionIT.Web.PageUtil.SetInitialFocus(TextBox1);
        }

TextBox1: 

String Array Sorting

27-Apr-2004

It took me today some time to figure out how to sort an array of strings case-sensitively. The default behavior of the Array.Sort() uses an default Comparer object which should be case-sensitive. When I tested this I found out that I had misinterpreted the definition of 'case-sensitive'. What I wanted was 'Oridinal' sorting. So I created an OrdinalStringComparer class which implements IComparer and I got what I wanted.

using System;
using System.Collections;

namespace ReflectionIT.Test {

   &nbspclass Class1{

   &nbsp   &nbsp[STAThread]
   &nbsp   &nbspstaticvoid Main(string[]args){

   &nbsp   &nbsp   &nbspTest(new CaseInsensitiveComparer());
   &nbsp   &nbsp   &nbspTest(Comparer.Default);   &nbsp   &nbsp
   &nbsp   &nbsp   &nbspTest(new OridinalStringComparer());
   &nbsp   &nbsp
   &nbsp   &nbsp   &nbspConsole.ReadLine();
   &nbsp   &nbsp}

   &nbsp   &nbspprivatestaticvoid Test(IComparer comparer){

   &nbsp   &nbsp   &nbspstring[]words=newstring[]{"c","a","A","aB","ab","Ab"};

   &nbsp   &nbsp   &nbspArray.Sort(words,comparer);
   &nbsp   &nbsp
   &nbsp   &nbsp   &nbspConsole.WriteLine(comparer.GetType().Name +":");
   &nbsp   &nbsp   &nbspforeach(stringwordinwords){
   &nbsp   &nbsp   &nbsp   &nbspConsole.WriteLine(word);
   &nbsp   &nbsp   &nbsp}
   &nbsp   &nbsp   &nbspConsole.WriteLine();
   &nbsp   &nbsp}
   &nbsp   &nbsp
   &nbsp}
   &nbsp   &nbsp
   &nbsppublicclass OridinalStringComparer : IComparer {
   &nbsp   &nbsp
   &nbsp   &nbspint IComparer.Compare(object x,object y ){
   &nbsp   &nbsp   &nbspreturnstring.CompareOrdinal((string)x,(string)y);
   &nbsp   &nbsp}
   &nbsp   &nbsp
   &nbsp}
   &nbsp   &nbsp
}

And when you run this program you get the following output:

CaseInsensitiveComparer:
A
a
Ab
ab
aB
c

Comparer:
a
A
ab
aB
Ab
c

OridinalStringComparer:
A
Ab
a
aB
ab
c

User Control Container Web Part

20-Apr-2004

SharePoint is a great product. In this article I will demonstrate this by creating a Web Part which acts like a container for normal ASP.NET User Controls (.ascx files). This makes it very easy to customize a portal page by adding normal ASP.NET User Controls to it.

Get in touch

Met dit formulier kunt u informatie over een In-Company of Small-Group training aanvragen. U kunt in het bericht aangeven welke training u wilt, voor hoeveel personen, wanneer deze verzorgd moet worden en op welke locatie. Wij nemen vervolgens contact met u op.

U kunt ons ook bereiken via telefoonnummer +31 (0)493-688810 of per mail training@reflectionit.nl.