Click here to Skip to main content
15,892,059 members
Articles / Web Development / ASP.NET

Application Design for Cross Cutting Concerns (like Caching, Logging etc..) using DI Framework

Rate me:
Please Sign up or sign in to vote.
4.50/5 (6 votes)
27 Sep 2010CPOL4 min read 27.8K   393   19  
Ability to plugin the application's cross cutting concerns using Dependency Injection framework
  • cachingsample.zip
    • CachingSample
      • Cache.Interfaces
      • Cache.Memcached
      • CacheProviders.AspNet
      • CacheProviders.NorthScaleMemcached
      • CachingSample.sln
      • CachingSample.suo
      • CachingSample
        • App.config
        • bin
        • CachingSample.csproj
        • Program.cs
        • Properties
        • Service References
          • ServiceReference1
            • BT.disco
            • BT.xsd
            • BT1.xsd
            • BT2.xsd
            • BT3.xsd
            • BT4.xsd
            • BT5.xsd
            • BT6.xsd
            • CachingSample.ServiceReference1.Contract.datasource
            • CachingSample.ServiceReference1.EventHandlers.datasource
            • CachingSample.ServiceReference1.KCI.datasource
            • CachingSample.ServiceReference1.OSSAction.datasource
            • CachingSample.ServiceReference1.ProdAvailabilityError.datasource
            • CachingSample.ServiceReference1.ProdRules.datasource
            • CachingSample.ServiceReference1.ProductAssetValue.datasource
            • CachingSample.ServiceReference1.ProductAttributeValues.datasource
            • CachingSample.ServiceReference1.ProductCatalog.datasource
            • CachingSample.ServiceReference1.ProductCategory.datasource
            • CachingSample.ServiceReference1.ProductCeaseReasonSalesChannelMapping.datasource
            • CachingSample.ServiceReference1.ProductContractMapping.datasource
            • CachingSample.ServiceReference1.ProductDefinition.datasource
            • CachingSample.ServiceReference1.ProductDefinitionAttribute.datasource
            • CachingSample.ServiceReference1.ProductDefinitionBillingType.datasource
            • CachingSample.ServiceReference1.ProductDefinitionDependancy.datasource
            • CachingSample.ServiceReference1.ProductDefinitionFeatures.datasource
            • CachingSample.ServiceReference1.ProductDefinitionRole.datasource
            • CachingSample.ServiceReference1.ProductDefinitionStatusHistory.datasource
            • CachingSample.ServiceReference1.ProductFamilyAssociations.datasource
            • CachingSample.ServiceReference1.ProductFamilyDefinitions.datasource
            • CachingSample.ServiceReference1.ProductGroupDefinition.datasource
            • CachingSample.ServiceReference1.ProductLeadTimeOverride.datasource
            • CachingSample.ServiceReference1.ProductPrice.datasource
            • CachingSample.ServiceReference1.ProductPriceRuleMapping.datasource
            • CachingSample.ServiceReference1.ProductRiskValue.datasource
            • CachingSample.ServiceReference1.ProductSalesRelationship.datasource
            • CachingSample.ServiceReference1.RegradeOptions.datasource
            • CachingSample.ServiceReference1.ResellerProductHierarchy.datasource
            • CachingSample.ServiceReference1.RoleActionOSSMapping.datasource
            • CachingSample.ServiceReference1.SalesChannel.datasource
            • CachingSample.ServiceReference1.TermsAndConditions.datasource
            • CachingSample.ServiceReference1.UIEvents.datasource
            • CachingSample.ServiceReference1.UIModules.datasource
            • CachingSample.ServiceReference1.UIProdJourney.datasource
            • CachingSample.ServiceReference1.UIProductSteps.datasource
            • CachingSample.ServiceReference1.UISteps.datasource
            • CachingSample.ServiceReference1.UIStepsEvents.datasource
            • CachingSample.ServiceReference1.UIStepsModules.datasource
            • configuration.svcinfo
            • configuration91.svcinfo
            • ProductService.wsdl
            • Reference.cs
            • Reference.svcmap
      • Libraries
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{55BBFE3D-94EC-4A76-9B40-712A19293DED}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>CacheProviders.MemCached</RootNamespace>
    <AssemblyName>CacheProviders.MemCached</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Enyim.Caching, Version=2.4.0.0, Culture=neutral, PublicKeyToken=cec98615db04012e, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Libraries\Enyim.Caching.dll</HintPath>
    </Reference>
    <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Libraries\log4net.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MemCacheProvider.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Cache.Interfaces\CacheProviders.Interfaces.csproj">
      <Project>{1D57F48A-4109-4986-8AFE-F5267815741F}</Project>
      <Name>CacheProviders.Interfaces</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <PropertyGroup>
    <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)CachingSample\$(OutDir)" /i /d /y
xcopy "$(SolutionDir)Libraries" "$(SolutionDir)CachingSample\$(OutDir)" /i /d /y</PostBuildEvent>
  </PropertyGroup>
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
I have around 9 years of experience in Microsoft technologies, .Net 2.0,3.5, Asp.net MVC developed small to medium scale products using Silverlight 2.0, Asp.net Ajax technologie and Javascript frameworks.

Comments and Discussions