Thursday, December 15, 2005

Smart Client frustrations

Well, I'm quite disappointed in the amount of tool support for developing Smart Clients. One my of current projects involves a Windows Forms Smart Client that uses .NET Remoting to connect to the application server. While developing on a system with local admin rights everything works okay (obviously). But as soon as you start using no-touch deployment hell breaks loose. Apparently, it is very difficult to diagnose startup problems on a system without admin rights and using no-touch deployment. In practice fixing those problems is a task of trial-and-error. We've deployed CAS policies to give all involved assemblies FullTrust rights, but only after we discovered how limited you are with a standard no-touch deployed application. One great way of finding potential issues is to include Debug.WriteLine calls and monitor those DebugView from SysInternals.

Wednesday, October 19, 2005

NHibernate and LINQ

Yesterday, two of my collegues demonstrated both NHibernate, an open-source object relational mapper, and the technology preview of LINQ, the C# 3.0 query language. I was quite impressed by the ease of use of NHibernate. Obviously, die-hard Java coders were already aware of the power of Hibernate for ages. LINQ, or Language INtegrated Query, allows .NET developers to use SQL-like keywords to query both databases an XML documents. The previous is still a bit buggy and incomplete, but the potential is obvious.

Visual Studio 2003 and 2005 side-by-side

We recently discovered that running Visual Studio 2005 Beta 2 next to Visual Studio 2003 breaks the attach to process functionality of the latter in many cases. However, it seems that this is fixed in Visual Studio 2005 Release Candidate. I still have to try it myself though.

Windows Forms key processing

If I had to name one thing in .NET that is very difficult to grasp, I would name Windows Forms key processing. There are so many methods involved it is very difficult to determine which method to overload and what to do. The newsgroup post Key Event Processing in Windows Forms provides a great overview what happens during each key processing phase, but event with that it stays a troublesome subject.

Wednesday, October 12, 2005

C# 2.0 starter

I know that the article Create Elegant Code with Anonymous Methods, Iterators, and Partical Classes is an oldie, but it still provides a comprehensive overview on what C# 2.0 really adds for the daily developer. It is written by Juval Lowy, one of Microsoft's Software Legends which I met once at a Dutch .NET meeting.

Tuesday, October 11, 2005

Lead Enterprise Architect Program

Me and some of my fellow collegues have been selected to join Microsoft's Lead Enterprise Architect Program (LEAP). Today, we received access to a dedicated portal that is used to keep us up to date on the program's presentations, reading materials, preparation guides, etc, and boy we have lots to read! As usual I have to find some spare time to get through all of this before the 28th (the first training day).

Golf clinic

Yesterday evening we had a company Golf clinic together with some of the employees of one of our customers. Octavie van Haaften, a collegue of mine, shot some snapshots and even recorded a short video of me while in action at the driving range. Check it out...

Tuesday, October 04, 2005

The Matrix meets The Sims

I know this has nothing to do with .NET, but still I wanted to share this brilliant piece of artwork to you. April Hoffmann decided to take the ideas of The Matrix to The Sims and make a series of movies out it. I love the idea...... check it out.

Better web projects in Visual Studio 2005

As a long time ASP.NET developer I've had my frustrations with how Visual Studio 2003 handles web projects. I can't even count the numerous times I had to re-add the project to the solution, or delete some painstaking DLLs that were in some of the Web Caches. And since our solutions typically contain up to 20 projects with >100 web pages, I drank quite some cups of coffee while waiting for the first page to appear in my browser.
Fortunately, if the article Microsoft Visual Studio 2005 Web Project System: What Is It and Why Did We Do It? delivers, then life will get a whole lot better.

Wednesday, September 28, 2005

Oracle .NET Developer Center

Because of positive feedback from the community, we decided to use the Oracle Data Provider instead of the one shipped with .NET. You can download the provider, including a bunch of Visual Studio add-ins from the Oracle .NET Developer Center site.

Wednesday, September 21, 2005

A guided tour of Windows Presentation Foundation

Since this year's PDC, the graphical subsystem previously referred to as Avalon is now called Windows Presentation Foundation. If you want to know more about what this means for us developers, check out this 30-page article. It provides a comprehensive overview and a lot of code examples on how it can be used best.

C# 3.0 language enhancements in action

While browsing the MSDN site, I ran into this lab that provides a surprisingly detailled hands-on experience with C# 3.0 and LINQ. I read the article, and as far as I understand it, the major features of C# 3.0 include the ability to write less code for the same constructs, and an abstract query language that may potentially elliminate SQL.
Well, you can't blame Microsoft for being slow.... Visual Studio 2005 is not even released yet...

Mono on a Nokia 770

Apparently, one of the developers of Mono (the open-source port of the .NET framework) has managed to run a console-based .NET application on a Nokia 770! Check out this site for more info.

Tuesday, September 20, 2005

Congratulations to....myself

Well, today is one of those days... I became 32 years old. Happy birthday to myself :-)

Monday, September 19, 2005

Windows Vista at the PDC

If you're into Windows Vista, and you want to prepare yourself for the hundreds of PDC presentations that Microsoft will make available in the coming days (I assume...), check out the article Lighting Up On Windows Vista. It provides an overview of the various new aspects of Vista and the corresponding PDC presentations.

Thursday, September 15, 2005

Finding the right reporting solution

Within one of our projects we are in the process of selecting a reporting solution to can match Microsoft Access's reporting functionality. A couple of weeks ago, a Microsoft product manager gave a presentation on Sql Server 2005 and its Reporting Services. Today, a representative of Business Objects, the company that bought Crystal Decisions (known by their infamous Crystal Reports), gave a demonstration of Business Objects XI (pronounced as Ex-Eye). I was quite impressed by their .NET integration. You may have seen the Crystal Reports stuff that you get for free with VS.NET, but they have taken that package to a higher level. They provide a fully documented native .NET object model, a fancy Office 2003-like report designer, support for almost any kind of data source you may need, and various client/server mixtures. I'm eager to find out how those packages deliver their promises in reality. Will be continued....

The PDC as we speak...

Maybe you've missed it, but in case you did, the 2005 Professional Developers Conference is ongoing as we speak. Check out the site and get updated on the latest Visual Studio 2005 and Longhorn articles, webcasts, and announcements. And while you're on it, ensure you assign MSDN Blogs as your start page and read what all those Microsoft developers and architects want to share with the community.

Tuesday, September 13, 2005

Visual Studio 2005 Release Candidate Available for Download

If you're lucky, and you have an MSDN subscription, then you can now download the release candidate of Visual Studio 2005. It seems that this is the last public release until the final version becomes available.

Monday, September 12, 2005

Attach to process....doesn't work

In one of my customer's VS.NET solutions, we use IIS to host a .NET Remoting object. Somehow, VS.NET fails to attach to IIS when we debug our client application (which in this case is a Windows Forms application). Luckely, James Avery's Visual Studio Hacks pointed me at a macro that allows us to attach to the ASP.NET worker process (e.g. through a keyboard shortcut). However, for me, it doesn't work. At first I got a warning that that process does not contain unmanaged code. But successive attempts did not provide any warning at all....

Visual Studio Hacks

I recently bought the book Visual Studio Hacks by James Avery (published by O'reilly). It is a great collection on tips & tricks on Visual Studio 2003. It even includes a set of tips for the upcoming Visual Studio 2005. I was also happy to see that he recomments most of the 3rd party tools I use as well (e.g. Ghostdoc, Resharper). If you really want to get the most out of your development environment, check out that book.

Thursday, September 08, 2005

.NET Remoting Security and hosting in IIS

In the last couple of days, I've suffered from some frustrating security issues related to a .NET Remoting object hosted in IIS. My current customer uses reasonably locked down development systems, and noone seems to know the real details of the security configuration. Fortunately, the article Building Secure ASP.NET Application shed some light on the .NET/IIS security model allowing me to workaround the issues.

Wednesday, September 07, 2005

Choosing an interprise integration solution

Microsoft has published the article Understanding Microsoft Integration Technologies. Once in a while I find myself having that creepy feeling when I discover that there is another Microsoft product that I don't know yet. This article provides a nice overview on MS's vision on enterprise integration, including the place of Biztalk 2006, Indigo, and SQL Server 2005.

Sunday, September 04, 2005

Enterprise Integration with BizTalk 2004

Maybe you have heard of Enterprise Integration Patterns. It's a pattern language for common solutions for integrating cross-platform application and systems. BizTalk is one of those products dedicating their lives to enterprise integration. This great article written by people from ThoughtWorks provides a nice real-life example of usage of those patterns and possible implementation using BizTalk 2004.

Expensive exceptions or not...

One of things that I've always believed in is that throwing exceptions introduces a significant performance penalty. However, according to the article Performance Implications of Exceptions in .NET, in reality it is not that bad at all. I haven't studied the exact context of the article, so take your own judgement.

Tuesday, August 23, 2005

What every developer must know about multithreaded applications

As a developer with long-time C++ experience I always felt quite comfortable with multi-threaded development. However, very often I discover that this comfortness is not shared by all developers. I lost count on how often I had to investigate some strange deadlock or race condition.
Fortunately, Vance Morrison of the MSDN Magazine published an interesting article named "What every dev must know about multithreaded apps". It is rather lenghty, but gives a nice indepth look of the advantages and disadvantages of multithreading.

Friday, August 19, 2005

Collapse the Solution Explorer in Visual Studio

Get this nifty little macro to collapse the tree-view of Visual Studio's Solution Explorer. Why didn't Microsoft think of this in the first place?

Use WS-Security with .NET Remoting

A while ago, Microsoft published an interesting article that explains how to add WS-Security support to a .NET Remoting channel. It relies on custom Remoting sinks (both client and server) that use the out-of-the-box services provided by Web Service Enhancements 1.0. By injecting those sinks into the channel configuration of your Remoting infrastructure, they will wrap the Remoting messages into SOAP envelopes and vice versa. Quite a nice idea, I must say.

Wednesday, August 17, 2005

Free Visual Studio 2005 online training

Through Alex Thissen's site, I ran into the Visual Studio 2005 E-Learning section. Apparently, Microsoft is offering its interactive learning programs for free for the time being. I've run two of the sessions (Team System introduction and new VS features), and I must admit, they are quite informative. Try it....

Tuesday, August 16, 2005

Estimation based on Use Case Metrics

At my current project, we've started to initiate a workload estimation based on Use Case Metrics. Apparently several methods exists, but we chose the Gustav Karner methodology. I'm quite impressed with how environmental and technical risks are translated into a factor that can be applied on an initial manhour estimation. Shivprasad koirala wrote a great article that clearly explains the fundamentals of this technique, and Roy Clem provided a summary. As soon as we have real-life metrics I'll update this post. Notice that Sparx System's Enterprise Architect provides full support for Use Case Metrics (including the above mentioned factors).

Friday, August 12, 2005

Asynchronous callbacks for web applications.

One of the issues that web developers are often faced with these days is dynamic behaviour on web pages. Often, falling back on Javascript is the only viable option. However, this article explains how you can support asynchronous client script callbacks that execute code-behind code without the user noticing any activity. ASP.NET 2.0 seems to support this out-of-the box. Look at the Google beta site to get a demonstration (although I doubt it is created in ASP.NET).

Wednesday, August 10, 2005

Easy searching in the Microsoft newsgroups

I've been using this shortcut for googling in the Microsoft newsgroups for ages now.

Aborting a .NET Remoting call

Today I ran into quite a frustrating .NET Remoting shortcoming. It seems to be impossible to abort a long-running .NET Remoting call. I've checked on Google to see if anybody came up with a proper solution, and I have even tried to gain access to the TCP Sink that is being used, but all failed. Eventually I decided to use an asynchronous delegate to perform the call on the ThreadPool and abandon it when a certain timeout occures. Hopefully the threads are released in time, otherwise we may have a potential memory leak.

Unit testing in .NET

As a professional software developer, you may have heard of NUnit. Or even better, like me, you may have already used it in a couple of projects. One of the things NUnit is missing is a possibility to have more flexibility on the test environment or the conditions under which a test is running. The article Unit testing with .NET provides a comprehensive overview on NUnit, MBUnit, and Visual Studio's upcoming Team System. Apparently, MBUnit is a kind of NUnit on steroids which provides a lot of the things NUnit is missing. Beware though, I haven't tried it myself yet, but I'm sure gonna...
Some more examples at The Code Project.

Monday, August 08, 2005

Alex Thissen is alive

Four years ago I took a .NET training given bij Twice IT (http://www.twice.nl). Together with my best collegue Rinie Egas, we kept in contact. The last time we met him was at the Microsoft DevDays in The Hague. Since then I never heard anything anymore, until today. It seems he left Twice and is quite active in the .NET community. Make sure you checkout his weblog at http://www.alexthissen.nl.

Architecture training

Today I had a great training on application design patterns with a focus on .NET. Tomorrow, this training will have a follow up focussing on enterprise patterns (messaging, etc). The training is provided by http://www.cibit.nl and I was quite impressed by the knowledge the trainer has.
One of the interesting new things I learned was Domain Modelling. An important aspect compared to table-oriented designs is the separation between the persistance logic and the domain model. The latter only deals with trying to get the best representation of a domain in an OO view, while the former deals with how the model must be persisted, loaded, etc. A great article on this can be found on Paul Giellens weblog: http://weblogs.asp.net/pgielens/archive/2005/07/29/420995.aspx

Friday, August 05, 2005

Voila! Automatic XML comment generation

Did you ever get bored with those obvious XML comments? Did you ever omit a comment because you were too lazy? Well, here comes GhostDoc...
I've already used NDoc (http://ndoc.sourceforge.net) for a few years, so I'm always eager to fill in the comments properly. But it is quite annoying that I have to type the documentation of an override again and again. GhostDoc adds a context-sensitive menu entry and a shortcut-key, and uses a intelligent configurable rule dictionairy to generate the comments from the definition, base-class member, etc. It even copies the documentation from the MSDN.
Check it out at http://www.roland-weigelt.de/ghostdoc.