Thursday, December 13, 2007

Visual Studio 2008 Installation Experience

The installation experience of Visual Studio 2008 is good. It’s pretty smooth. I choose to install all the options. It took 4.3 GB and 75 minutes to install the whole stuff excluding MSDN in my system [Pentium M 1.7 GHz with 1GB ram].

The installer didn’t ask me to restart the system in the middle. That’s one good thing. I hate re starting a system while installing software. But I had to restart the system at the end.

After installation I tried creating a Hello World web site, and it worked flawlessly. Thanks a lot for Brad [IndyNDA.org] and Microsoft for this awesome Christmas gift :-D.

Indy Vs 2008 Install Fest

WOW I can’t believe it !!!. I am installing Visual studio 2008 Professional right now!!! I was expecting to start after 6:00 PM today. Good for me ;-)

I came to the Gene B. Glick at 5:00pm thinking that I would be the first person. But there were a lot of people waiting there to my surprise!!!. The event organization is so good; I got into the conference room immediately.

Lets see how the day turns out to be.

Wednesday, December 5, 2007

Microsoft Architecture Journal Reader

Came across the new "Architecture Journal Reader" from microsoft.

This a nice offline reader for the architecture journal. The content downloaded is available offline and also searchable.

http://www.microsoft.com/downloads/details.aspx?FamilyID=dd466bbb-1b7d-438e-9f9a-954ce2058f15&DisplayLang=en

Visual Studio 2008 Install-Fest

Wow i am going to the VS 2008 Install-Fest on Dec. 13th in Indianapolis, Courtesy of Indy .NET User group. Hope I get a free copy of VS 2008.

IndyNDA [indynda.org] has restricted the number of free VS 2008 distributed to 175. I don’t see this kind of restriction in any other Install-Fest held around the country.

Also I don’t understand why Indy developers have this restriction while others around the country enjoy a free copy if they attend install-fest. Are Indy .NET developers being discriminated?

Monday, November 5, 2007

Binding a complex object to DetailsView

One of the common requirements while building an application is to bind to your domain objects. .Net has some excellent features for doing this.

Recently I was experimenting with Details view and binding it to a domain specific object. The default binding works fine if the object properties are of simple type.

What if the Object has a property that itself is an object. Assume that we have a user object which represents a user in the application [like a customer]. The user will have a name, age. So far it’s good. The default binding will bind to the objects simple properties.

But Customers will have addresses. For dealing with this usually we create an address object and expose it as a property of the User object. Now if you bind the user object to the DetailsView the default data binding skips the address property.

Ok, how to get your customers address displayed in the details view. There are a couple of was to do it.

If you are just concerned about displaying data, then the short and easy way is to override the ToString() method of the inner objects. For example if you override the ToString() method of the Address object so that it returns a string which contains all the address information, then the default binding will display the address! If you follow this path and if you are not careful your object might end up knowing all the display details.

Another way is to use and template fields in combination. But this is one way binding. We have to write up code that hooks up to proper events for editing and inserting. We can not use the Bind method for two way binding. It raises an error saying that the syntax for the binding expression is not correct.

One another approach is to create custom DataControlField object which can handle the inner object of type Address. Dino Esposito has a very good article on this @ http://msdn.microsoft.com/msdnmag/issues/06/01/CuttingEdge/. You can follow this approach if we need more specialized presentation.

Monday, September 10, 2007

Beware of String.IsNullOrEmpty

A very useful method when used with caution. Yes with caution!

Recently I was asked by our BA to use the IsNullOrEmpty method while checking for the existence of value in a string variable. Its new to me. He said that it has more performance than the usual way of doing this.

I decided to dig more about this. In the next 15 minutes i found that it has its own issues.

Yes issue, a very big one !

When used inside a loop it will crash the whole application. No error handling works here.
This is caused by JIT optimization.

Bill has a good write up about this here: http://msmvps.com/blogs/bill/archive/2006/04/04/89234.aspx

Note this happens only when you build your application in release mode with optimizations on.


Microsoft has the following page on the issue. Fix is available only in Orcas.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=113102

Well, as for me I am now fixing those IsNullOrEmpty method calls along with the rest of the team .....

One more issue to fix ................................................... ;-)

Hello World !!!

Yes .... this is my hello world in the BLog world.....


Just like starting to learn one more language...... ;-)



Saravanan Kanagaraj