(Framework              Project) by Marcelo Salvador
Introduction: The project was created to build parts of a business tier for a retail
company.

Audience:

                     Business Executives
                     Information Workers
                     IT Managers

Project Goals:

        The goal of the Framework Project was to create and test two assemblies. The
first assembly is a class library project called Foundation that contains interfaces and
base classes. The second assembly is a class library project called AppTypes where it
contains an entity, collection and exception classes used in various business processes.
(AppTypes/Foundation Projects)

(Foundation)




namespace Foundation
{
    /// <summary>
    /// Public interface with Collection
    /// </summary>
    public interface ICustomCollection
    {
        /// <summary>
        /// Adds an oject to the Collection and returns int
        /// value of the collection index for the object just added.
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        int Add(Object value);

       /// <summary>
       /// Removes all objects from the Collection.
       /// </summary>
       void Clear();

       /// <summary>
       ///Determines whether the collection contains a specific
          object.
       /// </summary>
/// <param name="value"></param>
/// <returns></returns>
bool Contains(Object value);


/// <summary>
///Determines the index of a specific object in the collection.
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
int IndexOf(Object value);

/// <summary>
/// Inserts the object in the collection at the specified index
/// </summary>
/// <param name="index"></param>
/// <param name="value"></param>
void Insert(int index,Object value);

/// <summary>
/// Removes the first occurence of the specified object from
    the collection.
/// </summary>
/// <param name="index"></param>
void Remove(object index);

/// <summary>
/// Removes the object at a specific index.
/// </summary>
/// <param name="index"></param>
void RemoveAt(int index);

///   <summary>
///   Returns the number of elements currently in the collection.
///   </summary>
int   Count { get;}

/// <summary>
/// takes in the Array of type of object where the items of the
    collection will be copied.
/// </summary>
/// <param name="value"></param>
void CopyTo(Object[] value);

/// <summary>
/// Sorts the collection using the IComparable interface of
    each member of the collection.
/// </summary>
void Sort();

/// <summary>
/// Sorts the Collection based on the supplied IComparer.
/// </summary>
/// <param name="value"></param>
void Sort(IComparer value);

/// <summary>
/// Used to retrieve or replace the object at the specified
               index.
           /// </summary>
           /// <param name="index"></param>
           /// <returns></returns>
           Object this[int index] { get;set;}


     }
}


         Specification: Project containing Interfaces consolidating required properties
for abstractions. For example, IcompanyContact, Iaddress, IcountryPhone, IcontactInfo
and IcustomCollection. The ICustomCollection interface was provided as a contract to
guarantee that certain basic collection functionality would be available in the collection
classes written.
(AppTypes)




/* ********************************************************************
 * @Programmer: Marcelo D. Salvador
 * SetFocus 2008(Q4) Project#1 - (Business Tier for Retail Company)
 * Description: Attribute class created to further document the
 * classes written. Project: AppTypes; Namespace: appTypes; Source:
 *                           DeveloperInfoAttribute.cs
 *
 *********************************************************************/

namespace AppTypes
{
    /// <summary>
    /// Developer Info Attribute class
    /// </summary>
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|
AttributeTargets.Interface|
AttributeTargets.Enum,AllowMultiple=true,Inherited=true)]
    class DeveloperInfoAttribute: Attribute
    {
        /// <summary>
        /// Protected class variable.
        /// </summary>
        protected string name;
        /// <summary>
        /// Constructor initializing protected variable.
        /// </summary>
        /// <param name="name"></param>
        public DeveloperInfoAttribute(string name)
        {
            this.name = name;

       }

       /// <summary>
       /// The GetProperty and Set property returns a property value
       /// from a Name BuiltIn or Custom property sets. The property
       /// declaration is shown below:
       /// </summary>
       public string Name
       {
           get
           {
               return name;
           }
           set
           {
               name = value;
           }
       }

       /// <summary>
       /// protected class variable
       /// </summary>
       protected string title;


       /// <summary>
       /// The GetProperty and Set property returns a property value
       /// from a Title BuiltIn or Custom property sets. The property
       /// declaration is shown below:
       /// </summary>
       public string Title
       {
           get
           {
               return title;
           }
           set
           {
               title = value;
           }
}
        /// <summary>
        /// Protected date variable
        /// </summary>
        protected string date;

        /// <summary>
        /// The GetProperty and Set property returns a property value
        /// from a Date BuiltIn or Custom property sets. The property
        /// declaration is shown below:
        /// </summary>
        public string Date
        {
            get
            {
                return date;
            }
            set
            {
                date = value;
            }
        }


    }
}

 namespace AppTypes
{
     /// <summary>
     /// Attributes
     /// </summary>
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited
= true)]

    public class CustomDescriptionAttribute : Attribute
    {
        /// <summary>
        /// constructor initializer
        /// </summary>
        /// <param name="Description"></param>
        public CustomDescriptionAttribute(string Description)
        {
            this.description = Description;

        }
        private string description;

        /// <summary>
        /// The GetProperty and Set property returns a property value
        /// from a Description BuiltIn or Custom property sets.
        /// The property declaration is shown below:
        /// </summary>
        public string Description
        {
            get { return description; }
set { this.description = value; }
         }
    }
}
        Two custom attributes DeveloperInfoAttribute and CustomDescription
Attribute were developed and used to further document the classes written. The
SupplierTypes enum is provided to insure that the type of each Supplier is limited to one
of the known types.




    (Test Program allows viewing either the summary
 results or the detail test output. Also, It will enable to
filter the output presenting results for a single section.)
Framework Project Portfolio

Framework Project Portfolio

  • 1.
    (Framework Project) by Marcelo Salvador Introduction: The project was created to build parts of a business tier for a retail company. Audience:  Business Executives  Information Workers  IT Managers Project Goals: The goal of the Framework Project was to create and test two assemblies. The first assembly is a class library project called Foundation that contains interfaces and base classes. The second assembly is a class library project called AppTypes where it contains an entity, collection and exception classes used in various business processes.
  • 2.
    (AppTypes/Foundation Projects) (Foundation) namespace Foundation { /// <summary> /// Public interface with Collection /// </summary> public interface ICustomCollection { /// <summary> /// Adds an oject to the Collection and returns int /// value of the collection index for the object just added. /// </summary> /// <param name="value"></param> /// <returns></returns> int Add(Object value); /// <summary> /// Removes all objects from the Collection. /// </summary> void Clear(); /// <summary> ///Determines whether the collection contains a specific object. /// </summary>
  • 3.
    /// <param name="value"></param> ///<returns></returns> bool Contains(Object value); /// <summary> ///Determines the index of a specific object in the collection. /// </summary> /// <param name="value"></param> /// <returns></returns> int IndexOf(Object value); /// <summary> /// Inserts the object in the collection at the specified index /// </summary> /// <param name="index"></param> /// <param name="value"></param> void Insert(int index,Object value); /// <summary> /// Removes the first occurence of the specified object from the collection. /// </summary> /// <param name="index"></param> void Remove(object index); /// <summary> /// Removes the object at a specific index. /// </summary> /// <param name="index"></param> void RemoveAt(int index); /// <summary> /// Returns the number of elements currently in the collection. /// </summary> int Count { get;} /// <summary> /// takes in the Array of type of object where the items of the collection will be copied. /// </summary> /// <param name="value"></param> void CopyTo(Object[] value); /// <summary> /// Sorts the collection using the IComparable interface of each member of the collection. /// </summary> void Sort(); /// <summary> /// Sorts the Collection based on the supplied IComparer. /// </summary> /// <param name="value"></param> void Sort(IComparer value); /// <summary>
  • 4.
    /// Used toretrieve or replace the object at the specified index. /// </summary> /// <param name="index"></param> /// <returns></returns> Object this[int index] { get;set;} } } Specification: Project containing Interfaces consolidating required properties for abstractions. For example, IcompanyContact, Iaddress, IcountryPhone, IcontactInfo and IcustomCollection. The ICustomCollection interface was provided as a contract to guarantee that certain basic collection functionality would be available in the collection classes written.
  • 5.
    (AppTypes) /* ******************************************************************** *@Programmer: Marcelo D. Salvador * SetFocus 2008(Q4) Project#1 - (Business Tier for Retail Company) * Description: Attribute class created to further document the * classes written. Project: AppTypes; Namespace: appTypes; Source: * DeveloperInfoAttribute.cs * *********************************************************************/ namespace AppTypes { /// <summary> /// Developer Info Attribute class /// </summary>
  • 6.
    [AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class| AttributeTargets.Interface| AttributeTargets.Enum,AllowMultiple=true,Inherited=true)] class DeveloperInfoAttribute: Attribute { /// <summary> /// Protected class variable. /// </summary> protected string name; /// <summary> /// Constructor initializing protected variable. /// </summary> /// <param name="name"></param> public DeveloperInfoAttribute(string name) { this.name = name; } /// <summary> /// The GetProperty and Set property returns a property value /// from a Name BuiltIn or Custom property sets. The property /// declaration is shown below: /// </summary> public string Name { get { return name; } set { name = value; } } /// <summary> /// protected class variable /// </summary> protected string title; /// <summary> /// The GetProperty and Set property returns a property value /// from a Title BuiltIn or Custom property sets. The property /// declaration is shown below: /// </summary> public string Title { get { return title; } set { title = value; }
  • 7.
    } /// <summary> /// Protected date variable /// </summary> protected string date; /// <summary> /// The GetProperty and Set property returns a property value /// from a Date BuiltIn or Custom property sets. The property /// declaration is shown below: /// </summary> public string Date { get { return date; } set { date = value; } } } } namespace AppTypes { /// <summary> /// Attributes /// </summary> [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] public class CustomDescriptionAttribute : Attribute { /// <summary> /// constructor initializer /// </summary> /// <param name="Description"></param> public CustomDescriptionAttribute(string Description) { this.description = Description; } private string description; /// <summary> /// The GetProperty and Set property returns a property value /// from a Description BuiltIn or Custom property sets. /// The property declaration is shown below: /// </summary> public string Description { get { return description; }
  • 8.
    set { this.description= value; } } } } Two custom attributes DeveloperInfoAttribute and CustomDescription Attribute were developed and used to further document the classes written. The SupplierTypes enum is provided to insure that the type of each Supplier is limited to one of the known types. (Test Program allows viewing either the summary results or the detail test output. Also, It will enable to filter the output presenting results for a single section.)