ASP.NET Hosting


Archives / 2003 / December
  • Visual Studio tabbed browsing and Mozilla Firebird and extensions

    In a post from Cameron Reilly in which he was wondering whether he should give Mozilla Firebird a second look,  I said I was missing tabbed browsing à la Visual Studio in Firebird.

    Well, I asked whether this could be done, and got answered that extensions exist for that. You can try the Webpanel Enhancer and the Content Holder. They don't work exactly as with Visual Studio, but this is a start.
    The author of the Content Holder extension is Hiroshi Shimoda who is also the responsible for the must-have Tabbrowser Extensions.

    If you wonder about Firebird or are a frequent user or simply a developer, I advise you have a look to the available extensions. Many of them are very useful for web developers. Mozilla is not only a web browser, it's also a development platform...
    BTW, if you heard about XUL and want to see what can be done with it, you can try the Mozilla Amazon Browser.

    Also note that Cameron has posted a positive review of Firebird after re-evaluating it.


  • How do I mess-up my business code with ASP.NET code?

    Isn't there something that strikes you in the following sentences?

    How Do I Emit an ASP.NET Trace Statement From My Business Class?
    How Can I Access a Session State Value From My Business Class?

    Back to the spaghetti days or what? Not that every application requires true businness classes, but in that case, don't talk about "Business Classes"!
    Well, the article they come from is two years old, that's true, but this is the typical mistakes we don't want to see! This should get fixed, because people are still learning with these articles today. I found it because a developer forwarded me the link with exactly the two sentences above as the description for the article which he found just great...


  • Boosting search engine results with URL rewriting

    I don't know whether you noticed this trend that consists in masquerading URLs such as so they appear like this:

    It's done here on for example. Just look at this page's URL. ScottW and .Text do this using HTTP handlers. Another way to do this is to use the HttpContext.RewritePath method.

    I decided to give it a try with the SharpToolbox. As soon as I did, the site got a boost from Google. Two days ago, Google was only linking to the main page, but now Google also returns links to tool and category pages which is much more useful. Let's say for example you're searching for an assembly decompiler, an XAML tool, or a C# object relational database mapping tool, chances are high that you find it in the SharpToolbox thanks to Google :-)

    Update: Jason Salas has a post about this. Also read the comments there.


  • Quick survey

    Two quick questions for you readers of this weblog and

    • How would you describe shortly
    • How would you describe this weblog (Fabrice's weblog)?

    Just write what comes to your mind when you think about Think about a tagline.

    Thanks a lot, I'm so curious ;-)


  • Winamp 5 is out

    Winamp 5 is out, and you may want to try it. Although 5 is for 2+3, it cannot be compared to the lousy Winamp 3. It seems this new version is much better.
    Not too sure there is much more functionnality I need than what Winamp 2 already has...


  • Bitfield enums and the Flags attribute

    You can work with enum as bitfields if you use powers of 2 for the values.
    For example, if you have an enum like this one:

    enum Abcd {A = 1, B = 2, C = 4, D = 8}

    you can use bitwise operations such as OR to combine values.

    Maybe you noticed the Flags attribute which is part of the framework. But, what is its purpose, you may ask, since we can use enums as bitfields even if we do not add the Flags attribute. Well, this attribute is used for the ToString method for example. If you use the Flags attribute as follows:

    enum Abcd {A = 1, B = 2, C = 4, D = 8}

    then calling the ToString method on a variable of type Abcd containing A and C (myvar = Abcd.A | Abcd.C), the result will be "A, C". This is used by Visual Studio to display the value of bitfield properties, for example.

    Conclusion, if you want to use bitfield enums, use the Flags attribute and powers of 2.

    Note: VB.NET syntax:

    <Flags()> _
    Enum Abcd
      A = 1
      B = 2
      C = 4 
      D = 8
    End Enum


  • X#

    There is no such language called X# at Microsoft. There was an exterimental language developed that was data-centric, but it is gone and no longer developed and our team VS Data is responsible for helping get the good things from that research project into VB, C#, and the .NET Framework classes. You or someone should feel free to post my comments here on that Wiki page so those who read it in the future know that there is no such project at Microsoft and that the focus is on enhancing the VB and C# langauges for data as well as the .NET Framework classes.
    Ken Levy
    VS Data Product Manager


    X# is dead, but if you want to know more about it, check this out. It is not really new (Oct 2002), but still an interesting introduction if you haven't seen it.


  • Aggregation and Asynchronous Invocation Application blocks slides and demo application

    This month, I gave this presentation with Microsoft about the Applications Blocks. The session I took part in was about the Aggregation Application Block and the Asynchronous Invocation Application Block. The seminar was in French, so are the slides, but the source code for the demo is in English and commented in English. The voice recordings will be online soon, but they are in French - what would you expect? The presentation was given in Paris! :-)

    You can download the slides and the source code. Please read the included ReadMe.txt file for the instructions in order to have the demo application working.

    The WinForm demo application invokes four services (SQL Server's Northwind database, the MapPoint web service, the Google Search web service and a weather service). The services are invoked using the Aggregation block, the aggregated results are then rendered as HTML using XSLT to transform the XML data.
    The demo application can be used synchronously or asynchronously, in which case the Asynchronous Invocation block is used.

    IMHO, the demo we created is more interesting than the sample provided with the blocks. If you plan to check these blocks out, you definitely want to give a look at our demo :-)

    Thanks go to Stéphane Goudeau from Microsoft France who was my partner in crime for this presentation!

    La bande son de cette présentation devrait suivre prochainement, je vous tiens au courant.

    Les autres présentations sont également disponibles en téléchargement sur la nouvelle page des Forums Architectes organisés par Microsoft.
    L'occasion de rappeler que Microsoft France a récemment ouvert une section dédiée à l'architecture sur MSDN France.


  • Will Ward Cunningham FIT with Microsoft

    Everybody noticed that Ward Cunningham has been bought (oops, not being very politically correct here) by Microsoft. Did you notice also that, although Microsoft is integrating a lot of active tools and concepts in its own toolbox (MDA, UML, Ant with MsBuild, XUL with XAML, weblogs, refactoring, object-relational mapping, etc.), nothing has been announced regarding testing and Test-Driven Development. Or did I miss anything?

    Well Ward Cunningham joining Microsoft could change that. Ward may bring Wikis and XP with him, but we should also remember that he is also the creator of the FIT Framework (Framework for Integrated Test). BTW, a release of this framework exists for .NET and C#...

    PS: I somewhat lied to you. Microsoft already talks about testing: Testing Software Patterns.

    Note: Ward Cunningham already worked and will continue working with Microsoft's Patterns team.


  • Arab Potatoes

    Joke courtesy of Tim Bray: Joke courtesy of Carrol Cox: An old Arab man who has been living for 40 years in Idaho wanted to cultivate potatoes in his garden, but digging up the earth was getting to be too hard at his age. His only son, Ali, was studying in France, so he decided to send him an e-mail explaining the situation: “Dear Ali: I feel very disappointed because this year I'll be unable to plant my potatoes in my garden. I am too old to plow the ground. I wish you were here, then my problems would be solved, because you would remove the soil for me. I love you, Dad” “Dad: For God's sake, DO NOT remove the ground of that garden. It's there that I have hidden ‘you-know-what’. I love you, Ali” At 4 a.m. the next day the local police, plus FBI and CIA agents, along with Pentagon delegates, came in and turn the garden upside down looking for dangerous material to build bombs, anthrax or whatever. They found nothing and they left. The same day the old man received another e-mail from his son: “Dear Dad: I am sure you can plant your potatoes now. It was the best I could do in the current circumstances. I love you, Ali”


  • Cryptic C#

    Does this code compile?

    class @class
      public int
    \u0069n\u0074 = 0;
      public string @public = @"Cryptic C#";

    class \u0043 : \u0063\u006C\u0061\u0073\u0073 {}

    string @string()
      @class ç = new @class();
      return new

    Sure it does.
    Actually this is useful if you need to interact with other languages were string or int are not keyword for example. You can find more about this in the C# language specifications, (also available on the C# team page)


  • Avoiding 'deep linking'

    Interesting use of HTTP modules:

    I had a problem where someone linked to one of the images on this site (actually problem still exists), basically a 2mb+ image was being displayed on some forum (I won't include the link :-))  which used a huge amount of my bandwidth... Well, here's a solution, also a pretty nice display of using HttpModules...he also has some nice, hi-res wallpapers here (wouldn't try to deep-link them though :-P)

    [Scott Galloway]

    Scott, noticed your post ID? 666 ;-)

    Update: fixed the link to the wallpapers.


  • Prototyping a web application

    When you need to create a mock-up for a web application, how do you choose to proceed?

    This is an interesting question someone recently asked me. What's the best way to prototype a web application which will be implemented in ASP.NET in the end. Roughly I can think about two ways:

    • use plain HTML
    • use ASP.NET and ASPX files

    The choice is not that easy to make because both options have pros and cons.
    For example, using HTML is much easier for someone who masters it, while asking that same person to use Visual Studio and ASP.NET is not really possible because the learning curve is still too high.
    The prototyping phase requires the developer to be responsive, as much exchanges with the client as possible, and to go back and forth between the development and the sketching board. I feel that asking the dev to prototype in Visual Studio may add an extra burden to him/her. However, an HTML mock-up is mostly disposable, because we cannot simply rename the .html files to .aspx. To convert an HTML mock-up into an ASP.NET app requires much more work than this. Almost all the tags need to be reviewed, except of course for everything which is pure design such as tables, divs and CSS. That last point being true of course if you use CSS at the prototyping level. Otherwise you'll also have to clean-up the style stuff from the HTML tags and move it to a clean CSS file.
    This shows that the time we gain if we use HTML can be lost when the time to switch to ASP.NET comes. Mock-ups done in ASP.NET can be easily reused as a base for the real application's UI which makes that solution more valueable. Also you'd have better time using ASP.NET if you need to have at least a bit of dynamic data or dynamic behaviour. If you do that with HTML, you'd have to do a lot of tricks with Javascript which can pollute your markup a lot.
    For someone who masters ASP.NET, coding the mock-up directly with Visual Studio seems to be the best choice.

    How do YOU create your mock-ups? Who does it? Developers?

    Maybe tools like Dreamweaver MX are a good compromise for a mix between HTML and ASPX. Some experiences this way?


  • Live at Sin-é

    Today I got the Jeff Buckley Live at Sin-é pack courtesy of OÜI FM. This is a must have for Jeff's fans out there (2 CDs playing more than 2 hours, a 10 minutes DVD, a colour booklet...).

    This makes a really nice Christmas present! Thanks OÜI FM :-)


  • Week-end updates to the SharpToolbox

    If you're searching for a .NET tool, remember to check the SharpToolbox out.

    Some updates to the SharpToolbox happened this week-end. It is now possible to search in tool descriptions as well as in tool names. There is also a new Authors page which allows you to search for a tool editor.

    The counters are now at 346 tools including 58 libraries! Some additions are still in the pipe :-)


  • .NET Modules

    Something new I learnt yesterday: .NET modules
    We could almost define modules as fine grained assemblies.

    Here is how you can use them. Excerpt:

    csc /target:module foo.cs

    This generates a file called foo.netmodule. To use this when compiling an assembly:

    csc /addmodule:foo.netmodule bar.cs

    Another example.

    Note that although an assembly can be created from multiple modules, the resulting assembly still requires the modules to be deployed with it. Learn more...

    One more link.