Sunday, December 25, 2005

XAML Designer for WPF in Visual Studio 2005 - Part 2

As I mentioned in my previous post about the December CTP of WinFX: the XAML designer (codename 'Cider') is finally there. I've been playing with it for a few days now, and one of the coolest features EVER is the coordinates that are shown when moving a control on the designer. That they had to wait until now to provide this kind of functionality. If you thought that the Windows Forms 2.0 designer was cool, then start using the XAML designer right now. I must admit, the Windows Presentation Framework is one of the coolest things that I've ever seen!! Such a huge framework and so little time :-(

Friday, December 23, 2005

A .NET Developer Christmas List

Dear Santa, I have been a very good developer this year. I've written unit tests for most of my classes and have successfully avoided any Java programming. Please bring me... WinFx... because dammit, you've teased us long enough! Lindsay Lohan... because I've always wanted to try "paired programming". A Visual Studio Premium Suite Team Edition 2005 Subscription with software... Or whatever they're calling it these days. Windows Vista CTPs in a VPC image... If I format my hard drive one more time, it's going to melt. An Enterprise Service Bus... I don't know what it is, but I've read that my business will be bankrupt without it. A Visual Studio Tools for Office Blimp... I hear there's one floating around Mexico somewhere. A Team Foundation Server... that doesn't require a PhD to Install. A browser based client side scripting framework... just like you gave me 10 years ago. A Visual Studio 2005 Service Pack... I'm not saying you shipped it too soon or anything, but... Special thanks to www.theserverside.net.

Tuesday, December 20, 2005

New Apress books

Apress is releasing two new books next year that I'm dying to read. The first one is Expert .NET 2.0 IL Assembler. This topic comes very close to my personal interests on .NET. The second book is The Career Programmer: Guerilla Tactics for an Imperfect World, Second Edition. I read the first edition, and I can't wait to read the second edition. It's NOT a book about technical stuff, but a comprehensive guide to modern software development today. Once again, a must read.

Woooohooo

The December CTP of WinFX contains a basic designer for XAML. The Visual Studio 2005 extension lets you edit and preview XAML in a visual way. Thank you Microsoft for this early Christmas present ...

Monday, December 19, 2005

View state with ASP.NET pages

The most underdeveloped area of .NET for me personally, is ASP.NET. As a child of the Win32 API, I was never involved in web projects until now. I had never written a decent Web Service either, until I changed my job earlier this year (one of the best decisions of my life so far). Now, I am trying to fill this huge gap in my knowledge about .NET. I decided that reading a good book on ASP.NET (from cover to cover) is a very good thing to begin with. So I started to read this book Programming Microsoft ASP.NET written by Dino Esposito. A very good book if you ask me. I have it's ASP.NET 2.0 successor laying around my desk at home, waiting to be read. Yesterday I read something very interesting about the view state of an ASP.NET page. Apparently it is possible to store the view state in a file on the web server or at any location where you want it to. The default storage location of the view state is in a hidden field contained by the HTML output of an ASP.NET page. There are two downsides to this default behaviour: - Security (even though the EnableViewStateMac attribute of the @Page directive takes care of this matter). - An extra footprint that is added to the resulting HTML output of an ASP.NET page. This can be a performance issue when lots of view state data is stored. Keeping the view state on the server (and therefore never expose it to the client) can be done by deriving a class from the Page class. There are two protected virtual methods that the runtime uses to deserialize and serialize the view state. These methods are named LoadPageStateFromPersistenceMedium and SavePageStateToPersistenceMedium. The view state string itself can be serialized and deserialized by the LosFormatter class. Note that when storing the view state to a file on the web server, a process needs to be developed that periodically cleans up the files that are not longer required. Maybe it can be an option to store the view state in the cache with a sliding expiration. In this case, the view state is cleaned up automatically. You can think up more scenario's that maybe usefull in some cases, I'm sure.

The New Methodology

Martin Fowler has written an article about new software methodologies (f.e. agile development). This must read article can be found here. Enjoy!

Wednesday, December 07, 2005

Cool Visual Studio Feature

I discovered a very, very cool Visual Studio feature today! Apparently it is possible to have more than one startup project in a single solution. I always thought that this was not possible. Wrong again ... Suppose you have a smart client application in a single solution: a Windows Forms project and a ASP.NET Web Service project. I used to set the Windows Forms project as the startup project. When I wanted to debug the code of the web service, I used to attach to the aspnet_wp process (using the Attach to Process option in the Tools menu). Apparently, there is a much easier way. When you right-click the solution in the Solution Explorer, you must choose the Set Startup Projects option. Here you can choose between a single startup project or multiple startup projects. For example, when you both set the Windows Forms application and the ASP.NET Web Service application to Start, both applications will be started in debug mode. You can check this by setting a breakpoint in the code of both applications. Now you can debug both applications simultaneously, without using the 'Attach to process' functionality (wich was sometimes buggy in Visual Studio 2003). The thing that most disturbed me is the fact that after using Visual Studio for so long, I didn't even notice this feature until today. Oh well, I can still blame it to the fact that I'm human.