Details about .NET CRM Project


This project is to create a .NET CRM application using classic C/S architecture but with many latest technologies to make it extensible and easy to maintain. Relying on WCF, our client issues command, or could be called "request", to the server and server executes the business logic and send back the result in the response. This architecture seems simple but just could be served in small project. In our project, to make the system extensible and maintainable, we introduce many new concepts and implement different architecture in client and server. The team includes more than 20 people (Project Manager, Business Analyzer, Developer , Quality Assurance) and I am one of the main developers.

Development Process & Practices
Testing Tools:
  • Client
    • Rich Client: The client UI is developed using WPF. With the dependency injection container(Pico Container), our team was able to register the global objects in the container and request it from the container whenever we need for creating new objects, like new window, new panel and so on. Moreover, as our client changed requirements often, we introduced Extension Point concepts, making our system extensible. For example, right click context menu of a window needs changes very often as new functionalities always need to add a new menu item as an entry. This core platform has been developed by our team as an open source project, which could be accessed here.
    • Cache: We developed a simple framework for cache: In-memory and File cache. As our client communicates with server by issuing commands, we will cache the response for the command, and then next time when the same command issued, client just return the cached result but not go to the server. When server is not available, our system will load the file cache into the memory cache and then use the memory cache for offline mode. 
    • Replication: Some of the information will not change often, like the name of people or organisation, so we store this part of information in local replication and the replication will update asynchronously in a defined period. Using replication, our application can start without server support and load majority of information from local replication but not from server, which not only speed up significantly the start of the client, but also release the burden of server. Moreover, the Search-As-I-Type controls require quick response, which makes it not suitable to use data from server and have to use the data from local replication.

    • Reporting Service for account summary: Our client also needs to integrate the data warehouse by using Reporting Service of SQL Server. To display it in the customized window, we also need to integrate WinForm control into WPF control ,which could be solved by WinFormHost. The sample of UI could be found here.  

  • Server
    • Database Development: To make the domain objects easier to maintain, we adopt NHibernate, an Object-Relational-Mapping Tool, to map the relational table records to object instances in C#. We also introduced Party Pattern for our database design, making our database extensible and flexible. Similarly, we also introduced dependency injection container for storing the global heavy objects and inject them for objects who need them. 
    • TCP Service: Our server exposes its command/response service using WCF and binds it to TCP protocol. 
    • Web Service: To integrate other systems, we also exposes some of the services using WCF Web Service.