Friday, June 14, 2013

BrownField Code Adventure

Yippee, I have inherited an application which the customer has asked me to "tweak".  This is an .Net C# application which began life in VS 2005 on IIS 6.  We need to get it too VS 2010 SP1 IIS 7.5.
Here is what I have experienced so far:

1.) This was a website solution vice a web application which is my preference when working with these types of applications.  I tried to copy and paste the files over and was reminded of this pit fall.
  • Designer pages which contains all the globals for the controls is not present in a website solution.
  • Markup Header files use the CodeFile vice CodeBehind keyword
  • Namespace was not aligned with the web project name but can be fixed.  That means patch each class with the new namespace for the application.
2.) String handling using the namespace Microsoft.VisualBasic.Strings!  What happened? String is part of the System namespace most classes inherit the string from the System namespace.

Here is what I found:
return Path.Combine(TraceLogsPath, "TraceLog." + Strings.Format(DateTime.Now, "yyyy.MM.dd") + ".xml");

No comments:

Post a Comment