Fabrice's weblog

Tools and Source

News

My .NET Toolbox
An error occured. See the script errors signaled by your web browser.
No tools selected yet
.NET tools by SharpToolbox.com

Read sample chapters or buy LINQ in Action now!
Our LINQ book is also available on AMAZON

.NET jobs

Emplois .NET

Tuneo

ASP.NET Hosting transatlantys

Contact

Me

Others

Selected content

Archives

December 2003 - Posts

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 http://mysite.com/Article.aspx?id=123 so they appear like this: http://mysite.com/Articles/123.aspx

It's done here on weblogs.asp.net 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 weblogs.asp.net:

  • How would you describe shortly weblogs.asp.net?
  • How would you describe this weblog (Fabrice's weblog)?

Just write what comes to your mind when you think about weblogs.asp.net. 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:

[Flags]
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

Posted: Dec 18 2003, 04:38 PM by Fabrice Marguerie | with 2 comment(s)
Filed under:
Aspect-Oriented Refactoring Series
Two interesting articles entitled "Aspect-Oriented Refactoring Series" (Part 1, Part 2) found through James Avery's .NET Nightly 72: Yeah, it's on TheServerSide, and yeah it is geared toward Java, but still a good read. 
Posted: Dec 17 2003, 11:07 PM by Fabrice Marguerie | with no comments
Filed under:
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
Microsoft

[http://dotnet.wikis.com/wc.dll?Wiki~XSharp]

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.

Posted: Dec 16 2003, 05:32 PM by Fabrice Marguerie | with 3 comment(s)
Filed under:
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.

More Posts Next page »