Configuring Calipso in your Web.config

Calipso has a lot of parameters and settings that can be changed through <calipso> configuration section on regular Web.config. If Calipso is installed using NuGet package, configuration section will be extenralized into the Calipso.config file in the root of ASP.NET applicationCalipso has a lot of parameters and settings that can be changed through <calipso> configuration section on regular Web.config. If Calipso is installed using NuGet package, configuration section will be extenralized into the Calipso.config file in the root of ASP.NET application.

A default Calipso.config files looks like the next XML code:
<?xml version="1.0" encoding="utf-8" ?>
<calipso>
  <components>
    <component id="JsonSerializer" type="Comkarl.Web.Serialization.JsonSerializer, Comkarl.Web" implementation="Comkarl.Web.Serialization.DefaultJsonSerializer, Comkarl.Web"/>
    <component id="CssCompressor" type="Comkarl.Web.Compression.TextCompressor, Comkarl.Web" implementation="Comkarl.Web.Compression.CssCompressor, Comkarl.Web"/>
    <component id="JavaScriptCompressor" type="Comkarl.Web.Compression.TextCompressor, Comkarl.Web" implementation="Comkarl.Web.Compression.JavaScriptCompressor, Comkarl.Web"/>
  </components>

  <javascriptManager resourcePath="~\cache\rsc" cachePath="~\rsc\js" dependencyConventionPrefix="Dependency//" resourceConventionPrefix="Resources//" afterLoadConventionPrefix="AfterLoad//">
    <includes>
    </includes>
  </javascriptManager>

  <cssManager cachePath="~\css">
    <includes>
    </includes>

    <theming basePath="Styles" cachePath="cache\themes" baseUrl="">
      <common basePath="Common">
        <includes>
        </includes>

        <combine>
        </combine>
      </common>
      
      <themes defaultTheme="">
      </themes>
    </theming>
  </cssManager>
</calipso>

javascriptManager element

It provides basic JavaScriptManager configuration with the following attributes:
  • cachePath. The application relative virtual path to the directory where JavaScript files will be cached* cachePath. The application relative virtual path to the directory where JavaScript files will be cached.
  • setupPath. The application relative virtual path to the JavaScriptManager configuration file.

cssManager element

It provides basic CssManager configuration with the following attributes:
  • cachePath. The application relative virtual path to the directory where CSS files will be cached* cachePath. The application relative virtual path to the directory where CSS files will be cached.
  • setupPath. The application relative virtual path to the CssManager configuration file.

components element

Calipso configures some critical components using a basic inversion of control:
  • JSON serializer. It is an implementation of Comkarl.Web.Serialization.JsonSerializer abstract class. Default implementation is using JSON.NET.
  • CSS compressor. It is an implementation of Comkarl.Web.Compression.TextCompressor abstract class. Default implementation is using Microsoft AjaxMin library.
  • JavaScript compressor. It is an implementation of Comkarl.Web.Compression.TextCompressor abstract class. Default implementation is using Microsoft AjaxMin library.

In order to change an implementation, you need to modify one of available components and you cannot modify component's identifier as Calipso won't work anymore!. A component has the following attributesIn order to change an implementation, you need to modify one of available components and you cannot modify component's identifier as Calipso won't work anymore!. A component has the following attributes:
  • id. The component unique identifier. This mustn't be change* id. The component unique identifier. This mustn't be changed.
  • type. The assembly qualified name of the abstract class which represents the component's specification. *This cannot be chan

Last edited Oct 19, 2012 at 9:32 PM by MFidemraizer, version 14

Comments

No comments yet.