Tuesday, June 20, 2006
Code Review: Relius Conduit
Intro:
Relius Conduit is a small application that synchronises data in an exchange contacts folder (“Relius/People”) and an Sql Server database.
After a short review, we came up with a couple of "concerns"
Upnext is PG (Pivotal G, not parental guardian :) ) team on some sazzy web stuff...Effectively using divs/css and eliminating table Kung-fus in web page designs.
Relius Conduit is a small application that synchronises data in an exchange contacts folder (“Relius/People”) and an Sql Server database.
After a short review, we came up with a couple of "concerns"
Product version: This was hard coded on the command line. The AssemblyInfo.cs file holds version info. A direct reference could not be made to the version info but an indirect way of doing this will be creating a reference to System.Windows.Forms. After this, developers will be able to make calls to Application.ProductVersion.
Connection polling, Extensive use of DataReader. A DataReader requires an open connection; instances exist where an SqlDataReader was opened while another was still open. A solution would be using DataTables in this situation and in the particular case of Relius Exchange; a disconnected Dataset will be very appropriate.
Hard coded values in code e.g. "Relius/People", Configuration files exist for situations like this..
Very large numbers imput parameter to a function,
e.g. ret = x.CreateContactInPublicSubfolder("Relius/People", person["ID"].ToString(), person["FRIENDLYNAME"].ToString(), person["TITLE"].ToString(), person["ORGANIZATION"].ToString(), person["TELEPHONENUMBER"].ToString(), person["HOMEPHONE"].ToString(), person["FAXNUMBER"].ToString(), person["STREET"].ToString(), person["CITY"].ToString(), person["STATE"].ToString(), person["POSTALCODE"].ToString(), person["COUNTRY"].ToString(), person["HOMESTREET"].ToString(), person["HOMECITY"].ToString(), person["HOMESTATE"].ToString(), person["HOMEPOSTALCODE"].ToString(), person["HOMECOUNTRY"].ToString(), person["EMAIL1"].ToString(), person["EMAIL2"].ToString(), person["DEPARTMENT"].ToString(), person["PROFESSION"].ToString(), DateTime.MinValue, person["TEXTDESCRIPTION"].ToString(), true);
Passing structs and classes will suffice
Upnext is PG (Pivotal G, not parental guardian :) ) team on some sazzy web stuff...Effectively using divs/css and eliminating table Kung-fus in web page designs.