Tuesday, December 1, 2009

The Tools We Use

Recently our group at Wintellect had an email thread going about the most useful developer tools and utilities. We all shared programs, both free and fee, that have helped us become more productive and produce higher quality .NET code.

John Robbins collated the thread into a comprehensive list that is a "must-see" for anyone involved with .NET development: The Tools We Use.

Jeremy Likness

3 comments:

  1. Hi Jeremy,

    I really like the way you have implemented MVC with ASP.NET 2.0. (http://www.codeproject.com/KB/aspnet/mvcwebforms.aspx)

    The example you gave was having one Model(Keyword) and interfaces like (IDataAccess, IService, IController) all having the contracts that applies to "keyword" only. But if we have multiple Models like(Keyword, Employee, Department) then how will i use these interfaces.

    The IDataAccess is fine becuase it is likely to implement the CRUD opeartions only but what about the Service class becuase every model will have different methods in its Service class as it is acting as a Business Logic Layer and if the ServiceFactory is returning an object of type IService then methods in the Service classes will not be accessible outside and i cannot add all those methods in the Iservice interface.

    Please tell me how to implement that scenario?

    If it is possible for you, can you share some example having implementation for more than one model.

    Thanks in advance
    HItesh Aneja

    ReplyDelete
  2. Hi, thanks for writing! I will be posting on more architectural/infrastructure ideas in the future, but for now, the way I'd handle your situation is with granular contracts.

    For example, in addition to IService, I may have IEmployeeService.

    The implementation would look like:

    EmployeeService: IService<Employee>, IEmployeeService

    (or you might just have IEmployeeService be based on IService<Employee>).

    The point is, keep the common things common, then extend the interface for the specifics.

    Does that make sense?

    Hope it does!

    ReplyDelete
  3. Thanks for the reply...

    Even if i do EmployeeService: IService<Employee>, IEmployeeService

    i wont be able to access the methods specific to the EmployeeService becuase the Service controller is returning object of type IService<Employee>.

    and secondly if i keep creating the interfaces for every Model in my project, becuase my project is a very big scale project, i 'll end up with so many different interfaces... u know what i mean?

    I was so excited about the MVC framework becuase i wanted to build a portal like site where i can add a page or functionality with full-ease in future and i might also need to add different applications into my project if client says and my limitations is that i have to use .NET 3.0

    Can you please suggest ?

    Cheers
    HItesh Aneja

    ReplyDelete