In part 1 I talked about KiGG high level architecture. In this part I am going to talk about KiGG project structure and summarize the purpose of each project in the solution. I’ll not go into deep details of each project. I’ll save that for some other posts, just be patient with me and stay tuned.
At the time of writing this post, KiGG consist of 7 projects plus unit test projects which I am not going to cover in this post.
Figure 01 – KiGG Project Structure
Projects are as the following:
I am going to walkthrough each project, and provide a summary and describe the purpose of each project.
Core project “Kigg.Core”
This project is Kigg’s Core. It contains infrastructure and common utilities. This project is referenced by all other projects. That is why it is the Core. In this project/assembly KiGG defines common and major interfaces that will be implemented or used by other projects/assemblies. For example Core defines Domain Objects (Model) interfaces, Repository interfaces, Logging, caching and application infrastructure support interfaces and base implementation. There are many other things included in this project/assembly such as helpful extension methods for string, collection, enumerations, enumerables, date & time etc…
Enterprise Library infrastructure project “Kigg.Infrastructure.EnterpriseLibrary”
Infrastructure implementation using Enterprise Library for caching, logging and IoC. In this project we implement interfaces defined for logging, caching and IoC in Kigg.Core project.
LINQ to SQL data infrastructure & domain model project “Kigg.Infrastructure.LinqToSql”
Implementation of repository interfaces & domain object model using LINQ to SQL. Kigg v2.2 was released with LINQ to SQL implementation only.
Entity Framework data infrastructure & domain model project “Kigg.Infrastructure.EF”
Implementation of repository interfaces & domain object model using Entity Framework. This is first introduced with Kigg v2.5 along with LINQ to SQL implementation. With support of IoC/Dependency Injection, switching between Entity Framework and LINQ to SQL is as simple as plug and play.
WCF Data Services “Kigg.DataServices”
Provide read only access to stories posted on KiGG through REST-based data services. KiGG data services uses repositories to provide access to stories as read only.
Html Agility Pack “Kigg.Infrastructure.HtmlAgilityPack”
Implementing story Html content extractor using open source project HtmlAgilityPack (HAP). Interfaces for this feature is defined in Kigg.Core project.
ASP.NET MVC web project “Kigg.Web”
Presentation project built with ASP.NET MVC. The project contains Implementation of presentation models, controllers and views. This project references all other projects, however it loads specific implementation using IoC.
In this post I tried to cover projects used to build KiGG. Each of these projects hold certain responsibilities. The whole solution depends on IoC\dependency injection to load specific implementation.
KiGG application support infrastructure for caching, logging, exception handling and IoC currently uses Enterprise Library 4.1. But with the power of IoC you can use different logging framework such as log4net instead of Enterprise library logging application block.
I didn’t yet plan for my next post, but I think I should start to dig much deeper into each project and namespace to describe its responsibility and usage. Stay tuned.