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"



  1. 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.


  2. 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.


  3. Hard coded values in code e.g. "Relius/People", Configuration files exist for situations like this..


  4. 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.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?