none
Requirements and Interface definition RRS feed

  • Question

  • Hi All,

    what is the best way to organize interface definitions, which are resulting from requirements? I use excel for defining Store procedure interfaces for other team members.

    Is there a better way to do this?

    Tanks.

    Monday, June 20, 2011 12:22 PM

Answers

  • Your topic is really so overboard. Let's spread with this it slowly:

    I'd like to suggest that you take a look at this official knowledge base first, it is about some critical foundations for interface design in .NET Framework:
    http://msdn.microsoft.com/en-us/library/ms229022.aspx.
    And see more detailed instructions with these blogs:
    http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_interrfaces03052006095933AM/csharp_interrfaces.aspx.
    http://en.csharp-online.net/.NET_Type_Design_Guidelines%E2%80%94Interface_Design.

    >> I use excel for defining Store procedure interfaces for other team members.
    By the way, what do you mean by saying this?

    How you will design your interfaces is based on the features that you want to realize. Some work like concluding all the objects, developing use case diagrams, etc, has been completed within writing the development documents before you start to design the interfaces.
    For example, supoose here you need to develop a Library Management System, before designing the interfaces, your team have discussed and concluded that there are two objects in this system: User and Book. Just take User for demo, the Model Class to has been designed like this:

     public class User
     {
      private Int32 userId;
      private String userName;
      private Int32 userAge;
      ...
    
      public Int32 UserId
      {
       get {
        //Please add some processing logic.
        return this.userId;
       }
       set {
        //Please add some processing logic.
        this.userId = value; 
       }
      }
    
      public String UserName
      {
       get { 
        //Please add some processing logic.
        return this.userName; 
       }
       set { 
        //Please add some processing logic.
        this.userName = value; 
       }
      }
    
      public Int32 UserAge
      {
       get {
        //Please add some processing logic.
        return this.userAge;
       }
       set {
        //Please add some processing logic.
        this.userAge = value; 
       }
      }
      
      ...
     }
    


    In this system, you need to take all operations which may happen to the User in consideration, when you design the User interface. In this example, I just designed the functions related with interaction with the database(basic CURD operations):
     public interface User{
      // The returned Boolean results are used to indicate if the operations are successful.
      public Boolean CreateUser(User newUser);
      public Boolean DeleteUserWithUserId(Int32 userId);
      public Boolean DeleteUserWithUserName(String userName);
      public Boolean UpdateUserWithUserId(Int32 userId);
      public Boolean UpdateUserWithUserName(String userName);
      public User GetUserWithUserId(Int32 userId);
      public User GetUserWithUserName(String userName);
      public List<User> GetAllUsers();
      ...
     }
    

    When you implements the User Interface, write the actual database operation logics into these methods.

     


    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    -------------------------------------------------
    This response contains links reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
    Wednesday, June 22, 2011 9:29 AM
    Moderator

All replies

  • Your topic is really so overboard. Let's spread with this it slowly:

    I'd like to suggest that you take a look at this official knowledge base first, it is about some critical foundations for interface design in .NET Framework:
    http://msdn.microsoft.com/en-us/library/ms229022.aspx.
    And see more detailed instructions with these blogs:
    http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_interrfaces03052006095933AM/csharp_interrfaces.aspx.
    http://en.csharp-online.net/.NET_Type_Design_Guidelines%E2%80%94Interface_Design.

    >> I use excel for defining Store procedure interfaces for other team members.
    By the way, what do you mean by saying this?

    How you will design your interfaces is based on the features that you want to realize. Some work like concluding all the objects, developing use case diagrams, etc, has been completed within writing the development documents before you start to design the interfaces.
    For example, supoose here you need to develop a Library Management System, before designing the interfaces, your team have discussed and concluded that there are two objects in this system: User and Book. Just take User for demo, the Model Class to has been designed like this:

     public class User
     {
      private Int32 userId;
      private String userName;
      private Int32 userAge;
      ...
    
      public Int32 UserId
      {
       get {
        //Please add some processing logic.
        return this.userId;
       }
       set {
        //Please add some processing logic.
        this.userId = value; 
       }
      }
    
      public String UserName
      {
       get { 
        //Please add some processing logic.
        return this.userName; 
       }
       set { 
        //Please add some processing logic.
        this.userName = value; 
       }
      }
    
      public Int32 UserAge
      {
       get {
        //Please add some processing logic.
        return this.userAge;
       }
       set {
        //Please add some processing logic.
        this.userAge = value; 
       }
      }
      
      ...
     }
    


    In this system, you need to take all operations which may happen to the User in consideration, when you design the User interface. In this example, I just designed the functions related with interaction with the database(basic CURD operations):
     public interface User{
      // The returned Boolean results are used to indicate if the operations are successful.
      public Boolean CreateUser(User newUser);
      public Boolean DeleteUserWithUserId(Int32 userId);
      public Boolean DeleteUserWithUserName(String userName);
      public Boolean UpdateUserWithUserId(Int32 userId);
      public Boolean UpdateUserWithUserName(String userName);
      public User GetUserWithUserId(Int32 userId);
      public User GetUserWithUserName(String userName);
      public List<User> GetAllUsers();
      ...
     }
    

    When you implements the User Interface, write the actual database operation logics into these methods.

     


    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    -------------------------------------------------
    This response contains links reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
    Wednesday, June 22, 2011 9:29 AM
    Moderator
  • Hi,

    Is any progress made?
    I am looking forward to hearing from you.
    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 24, 2011 3:30 AM
    Moderator