Skip to content
Browse files

Merge branch 'master' of https://github.com/ServiceStack/ServiceStack…

  • Loading branch information...
2 parents c8a5702 + 5bc34b6 commit a306d3a388a4249f533c80ea7b193cbb7ce12673 @mythz mythz committed Dec 12, 2012
Showing with 4,940 additions and 4,900 deletions.
  1. +181 −181 src/Docs/Docs.csproj
  2. +4 −0 src/Docs/Docs.gpState
  3. +45 −42 src/Docs/Docs.sln
  4. +154 −124 src/Docs/default.htm
  5. +68 −68 src/Docs/framework/accessing-ihttprequest.md
  6. +84 −84 src/Docs/framework/caching-options.md
  7. +84 −84 src/Docs/framework/csv-format.md
  8. +83 −83 src/Docs/framework/history-of-webservices.md
  9. +82 −82 src/Docs/framework/json-report-format.md
  10. +67 −67 src/Docs/framework/nuget.md
  11. +268 −268 src/Docs/framework/overview.md
  12. +616 −616 src/Docs/framework/release-notes.md
  13. +45 −45 src/Docs/logging/logging-overview.md
  14. +44 −44 src/Docs/markdown/about.md
  15. +78 −78 src/Docs/markdown/markdown-features.md
  16. +416 −416 src/Docs/markdown/markdown-razor.md
  17. +503 −503 src/Docs/ormlite/ormlite-overview.md
  18. +128 −128 src/Docs/redis-client/distributed-locking-with-redis.md
  19. +235 −235 src/Docs/redis-client/redis-client.md
  20. +379 −379 src/Docs/redis-client/schemaless-nosql-migrations.md
  21. +184 −184 src/Docs/text-serializers/json-csv-jsv-serializers.md
  22. +233 −233 src/ServiceStack.Examples/ServiceStack.Examples.Clients/ServiceStack.Examples.Clients.csproj
  23. +612 −612 src/ServiceStack.Examples/ServiceStack.Examples.Clients/default.htm
  24. +63 −65 src/ServiceStack.Examples/ServiceStack.Examples.Host.Web/AppHost.cs
  25. +35 −35 src/ServiceStack.Examples/ServiceStack.Examples.Host.Web/Properties/AssemblyInfo.cs
  26. +160 −159 src/ServiceStack.Examples/ServiceStack.Examples.Host.Web/ServiceStack.Examples.Host.Web.csproj
  27. +43 −43 src/ServiceStack.Examples/ServiceStack.Examples.ServiceInterface/Properties/AssemblyInfo.cs
  28. +42 −42 src/ServiceStack.Examples/ServiceStack.Examples.ServiceModel/Properties/AssemblyInfo.cs
  29. +4 −0 src/ServiceStack.Examples/ServiceStack.Examples.gpState
Sorry, we could not display the entire diff because it was too big.
View
362 src/Docs/Docs.csproj
@@ -1,182 +1,182 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>
- </ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}</ProjectGuid>
- <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Docs</RootNamespace>
- <AssemblyName>Docs</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <UseIISExpress>false</UseIISExpress>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\</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\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="ServiceStack, Version=3.9.11.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\ServiceStack.3.9.11\lib\net35\ServiceStack.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.Common, Version=3.9.9.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\ServiceStack.Common.3.9.11\lib\net35\ServiceStack.Common.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.Interfaces, Version=3.9.9.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\ServiceStack.Common.3.9.11\lib\net35\ServiceStack.Interfaces.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.OrmLite.SqlServer">
- <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.9\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.Redis">
- <HintPath>..\packages\ServiceStack.Redis.3.9.11\lib\net35\ServiceStack.Redis.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\ServiceStack.3.9.11\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.Text, Version=3.9.11.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\ServiceStack.Text.3.9.11\lib\net35\ServiceStack.Text.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Configuration" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="default.shtml" />
- <Content Include="css\default.css" />
- <Content Include="css\styles.css" />
- <Content Include="Global.asax" />
- <Content Include="default.htm" />
- <Content Include="img\arr-2.gif" />
- <Content Include="img\boat.jpg" />
- <Content Include="img\date.png" />
- <Content Include="img\favicon.bmp" />
- <Content Include="favicon.ico" />
- <Content Include="img\field.gif" />
- <Content Include="img\has_dropdown-hover.png" />
- <Content Include="img\ico-rss-2.png" />
- <Content Include="img\ico-rss.png" />
- <Content Include="img\main-bg.jpg" />
- <Content Include="img\main-bot.jpg" />
- <Content Include="img\main-top.jpg" />
- <Content Include="img\meta-bg.gif" />
- <Content Include="img\meta-bot.gif" />
- <Content Include="img\meta-comments-num.gif" />
- <Content Include="img\meta-top.gif" />
- <Content Include="img\nav-dd-arr.gif" />
- <Content Include="img\post-bg.gif" />
- <Content Include="img\searchform-field.gif" />
- <Content Include="img\sidebar-list-arr.gif" />
- <Content Include="img\textarea.gif" />
- <Content Include="img\widgettitle.jpg" />
- <Content Include="js\fn.js" />
- <Content Include="Web.config">
- <SubType>Designer</SubType>
- </Content>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Global.asax.cs">
- <DependentUpon>Global.asax</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="App_Data\" />
- <Folder Include="obj\Debug\TempPE\" />
- </ItemGroup>
- <ItemGroup>
- <None Include="contrib\servicestack-contrib.md" />
- <None Include="examples\servicestack-examples.md" />
- <None Include="framework\accessing-ihttprequest.md" />
- <None Include="framework\caching-options.md" />
- <None Include="framework\history-of-webservices.md" />
- <None Include="framework\csv-format.md" />
- <None Include="framework\home.md" />
- <None Include="framework\json-report-format.md" />
- <None Include="framework\nuget.md" />
- <None Include="framework\overview.md" />
- <None Include="framework\release-notes.md" />
- <None Include="logging\logging-overview.md" />
- <None Include="markdown\about.md" />
- <None Include="markdown\markdown-razor.md" />
- <None Include="markdown\markdown-features.md" />
- <None Include="obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache" />
- <None Include="ormlite\ormlite-overview.md" />
- <Content Include="packages.config" />
- <None Include="Pages.json" />
- <None Include="redis-admin-ui\redis-admin-ui-overview.md" />
- <None Include="redis-client\designing-nosql-database.md" />
- <None Include="redis-client\distributed-locking-with-redis.md" />
- <None Include="redis-client\iredisclient-api.md" />
- <None Include="redis-client\iredisnativeclient-api.md" />
- <None Include="redis-client\iredistransaction-api.md" />
- <None Include="redis-client\iredistypedclient-api.md" />
- <None Include="redis-client\redis-client.md" />
- <None Include="redis-client\redis-overview.md" />
- <None Include="redis-client\redis-pubsub.md" />
- <None Include="redis-client\redis-release-notes.md" />
- <None Include="redis-client\redis-transactions.md" />
- <None Include="redis-client\schemaless-nosql-migrations.md" />
- <None Include="redis-client\useful-redis-links.md" />
- <None Include="text-serializers\json-csv-jsv-serializers.md" />
- <None Include="text-serializers\jsv-format.md" />
- <None Include="Views\Category.md" />
- <None Include="Views\Search.md" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="Docs.Logic\Docs.Logic.csproj">
- <Project>{2A606EB5-47BD-47B1-97EB-8C208DF63ABF}</Project>
- <Name>Docs.Logic</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <UseIIS>True</UseIIS>
- <AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>5416</DevelopmentServerPort>
- <DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>http://localhost/docs</IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- <UseCustomServer>False</UseCustomServer>
- <CustomServerUrl>
- </CustomServerUrl>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- 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>
- -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Docs</RootNamespace>
+ <AssemblyName>Docs</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <UseIISExpress>false</UseIISExpress>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</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\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ServiceStack, Version=3.9.11.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\ServiceStack.3.9.11\lib\net35\ServiceStack.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Common, Version=3.9.9.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\ServiceStack.Common.3.9.11\lib\net35\ServiceStack.Common.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Interfaces, Version=3.9.9.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\ServiceStack.Common.3.9.11\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.OrmLite.SqlServer">
+ <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.9\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Redis">
+ <HintPath>..\packages\ServiceStack.Redis.3.9.11\lib\net35\ServiceStack.Redis.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\ServiceStack.3.9.11\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Text, Version=3.9.11.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\ServiceStack.Text.3.9.11\lib\net35\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="default.shtml" />
+ <Content Include="css\default.css" />
+ <Content Include="css\styles.css" />
+ <Content Include="Global.asax" />
+ <Content Include="default.htm" />
+ <Content Include="img\arr-2.gif" />
+ <Content Include="img\boat.jpg" />
+ <Content Include="img\date.png" />
+ <Content Include="img\favicon.bmp" />
+ <Content Include="favicon.ico" />
+ <Content Include="img\field.gif" />
+ <Content Include="img\has_dropdown-hover.png" />
+ <Content Include="img\ico-rss-2.png" />
+ <Content Include="img\ico-rss.png" />
+ <Content Include="img\main-bg.jpg" />
+ <Content Include="img\main-bot.jpg" />
+ <Content Include="img\main-top.jpg" />
+ <Content Include="img\meta-bg.gif" />
+ <Content Include="img\meta-bot.gif" />
+ <Content Include="img\meta-comments-num.gif" />
+ <Content Include="img\meta-top.gif" />
+ <Content Include="img\nav-dd-arr.gif" />
+ <Content Include="img\post-bg.gif" />
+ <Content Include="img\searchform-field.gif" />
+ <Content Include="img\sidebar-list-arr.gif" />
+ <Content Include="img\textarea.gif" />
+ <Content Include="img\widgettitle.jpg" />
+ <Content Include="js\fn.js" />
+ <Content Include="Web.config">
+ <SubType>Designer</SubType>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Global.asax.cs">
+ <DependentUpon>Global.asax</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="App_Data\" />
+ <Folder Include="obj\Debug\TempPE\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="contrib\servicestack-contrib.md" />
+ <None Include="examples\servicestack-examples.md" />
+ <None Include="framework\accessing-ihttprequest.md" />
+ <None Include="framework\caching-options.md" />
+ <None Include="framework\history-of-webservices.md" />
+ <None Include="framework\csv-format.md" />
+ <None Include="framework\home.md" />
+ <None Include="framework\json-report-format.md" />
+ <None Include="framework\nuget.md" />
+ <None Include="framework\overview.md" />
+ <None Include="framework\release-notes.md" />
+ <None Include="logging\logging-overview.md" />
+ <None Include="markdown\about.md" />
+ <None Include="markdown\markdown-razor.md" />
+ <None Include="markdown\markdown-features.md" />
+ <None Include="obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache" />
+ <None Include="ormlite\ormlite-overview.md" />
+ <Content Include="packages.config" />
+ <None Include="Pages.json" />
+ <None Include="redis-admin-ui\redis-admin-ui-overview.md" />
+ <None Include="redis-client\designing-nosql-database.md" />
+ <None Include="redis-client\distributed-locking-with-redis.md" />
+ <None Include="redis-client\iredisclient-api.md" />
+ <None Include="redis-client\iredisnativeclient-api.md" />
+ <None Include="redis-client\iredistransaction-api.md" />
+ <None Include="redis-client\iredistypedclient-api.md" />
+ <None Include="redis-client\redis-client.md" />
+ <None Include="redis-client\redis-overview.md" />
+ <None Include="redis-client\redis-pubsub.md" />
+ <None Include="redis-client\redis-release-notes.md" />
+ <None Include="redis-client\redis-transactions.md" />
+ <None Include="redis-client\schemaless-nosql-migrations.md" />
+ <None Include="redis-client\useful-redis-links.md" />
+ <None Include="text-serializers\json-csv-jsv-serializers.md" />
+ <None Include="text-serializers\jsv-format.md" />
+ <None Include="Views\Category.md" />
+ <None Include="Views\Search.md" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="Docs.Logic\Docs.Logic.csproj">
+ <Project>{2A606EB5-47BD-47B1-97EB-8C208DF63ABF}</Project>
+ <Name>Docs.Logic</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>5416</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>http://localhost/docs</IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- 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>
+ -->
</Project>
View
4 src/Docs/Docs.gpState
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<GuidancePackagesState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/pag/gax-gpstate">
+ <Packages />
+</GuidancePackagesState>
View
87 src/Docs/Docs.sln
@@ -1,42 +1,45 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Docs", "Docs.csproj", "{19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Docs.Logic", "Docs.Logic\Docs.Logic.csproj", "{2A606EB5-47BD-47B1-97EB-8C208DF63ABF}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Any CPU.Build.0 = Release|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|x86.ActiveCfg = Release|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|x86.ActiveCfg = Debug|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Any CPU.Build.0 = Release|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|x86.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Docs", "Docs.csproj", "{19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Docs.Logic", "Docs.Logic\Docs.Logic.csproj", "{2A606EB5-47BD-47B1-97EB-8C208DF63ABF}"
+EndProject
+Global
+ GlobalSection(CodealikeProperties) = postSolution
+ SolutionGuid = 7cca7660-0007-4068-9d9e-a86e9f73ef00
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {19ADDEEC-EAF9-4B42-8EEC-86CD389D834F}.Release|x86.ActiveCfg = Release|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {2A606EB5-47BD-47B1-97EB-8C208DF63ABF}.Release|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
278 src/Docs/default.htm
@@ -1,12 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ServiceStack Docs</title>
-
<link rel='index' title='ServiceStack Docs' href='docs/' />
<meta name="generator" content="Razor Markdown" />
-
<link rel="stylesheet" href="css/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/styles.css" type="text/css" media="all" />
</head>
@@ -17,20 +15,20 @@
<div id="header">
<!-- Logo -->
<div id="logo">
- <h1>
- <a href="default.htm">ServiceStack Docs</a></h1>
+ <h1><a href="default.htm">ServiceStack Docs</a></h1>
<div class="description">
ServiceStack project docs in one place</div>
</div>
<!-- END Logo -->
<!-- Main Navigation -->
<div id="nav">
<ul>
- <li class=""><a href="markdown/about"><span>About</span></a></li>
+ <li class="">
+ <a href="markdown/about">
+ <span>About</span></a></li>
</ul>
</div>
<script type="text/javascript" charset="utf-8">
-
</script>
<!-- END Main Navigation -->
<div class="cl">
@@ -48,99 +46,120 @@
<!-- Content -->
<div id="content">
<div class="post-19 post type-post status-publish format-standard hentry category-uncategorized tag-boat tag-lake">
- <h2 id="title">
- Welcome to ServiceStack Docs</h2>
+ <h2 id="title">Welcome to ServiceStack Docs</h2>
<div class="date">
<div class="bg">
- <span class="day">04</span> <span>Jun</span>
+ <span class="day">04</span>
+ <span>Jun</span>
</div>
</div>
<div class="entry">
<p>
- ServiceStack docs is a collection of all documentation found in the README.md and
- wiki pages that are in amongst all of ServiceStack's GitHub Open Source projects.
+ ServiceStack docs is a collection of all documentation found in the README.md and wiki pages that are in amongst all of ServiceStack's GitHub Open Source projects.
</p>
<div id="about-section">
- <h3>About this website</h3>
+ <h3>About this web site</h3>
<ul>
- <li><a href="markdown/about">About Docs</a></li>
- <li><a href="markdown/markdown-features">Markdown Features</a></li>
- <li><a href="markdown/markdown-razor">Markdown Razor</a></li>
+ <li>
+ <a href="markdown/about">About Docs</a></li>
+ <li>
+ <a href="markdown/markdown-features">Markdown Features</a></li>
+ <li>
+ <a href="markdown/markdown-razor">Markdown Razor</a></li>
</ul>
</div>
- <h2>
- REST and RPC Web Services Framework</h2>
+ <h2>REST and RPC Web Services Framework</h2>
<ul>
- <li><a href="framework/overview">ServiceStack Overview</a></li>
- <li><a href="framework/release-notes">Release Notes</a></li>
- <li><a href="framework/home">Wiki Home</a></li>
- <li><a href="framework/nuget">NuGet</a></li>
- <li><a href="framework/json-report-format">JSON Report Format</a></li>
- <li><a href="framework/caching-options">Caching Options</a></li>
- <li><a href="framework/accessing-ihttprequest">Accessing IHttpRequest</a></li>
+ <li>
+ <a href="framework/overview">ServiceStack Overview</a></li>
+ <li>
+ <a href="framework/release-notes">Release Notes</a></li>
+ <li>
+ <a href="framework/home">Wiki Home</a></li>
+ <li>
+ <a href="framework/nuget">NuGet</a></li>
+ <li>
+ <a href="framework/json-report-format">JSON Report Format</a></li>
+ <li>
+ <a href="framework/caching-options">Caching Options</a></li>
+ <li>
+ <a href="framework/accessing-ihttprequest">Accessing IHttpRequest</a></li>
</ul>
- <h2>
- C# Redis Client</h2>
+ <h2>C# Redis Client</h2>
<ul>
- <li><a href="redis-client/redis-client">Redis Client</a></li>
- <li><a href="redis-client/redis-overview">Redis Overview</a></li>
- <li><a href="redis-client/useful-redis-links">Useful Redis Links</a></li>
- <li><a href="redis-client/redis-release-notes">Redis Release Notes</a></li>
- <li><a href="redis-client/designing-nosql-database">Designing NoSQL Database</a></li>
- <li><a href="redis-client/schemaless-nosql-migrations">Schemaless NoSQL Migrations</a></li>
- <li><a href="redis-client/distributed-locking-with-redis">Distributed Locking with Redis</a></li>
- <li><a href="redis-client/redis-pubsub">Redis Pub/Sub</a></li>
- <li><a href="redis-client/redis-transactions">Redis Transactions</a></li>
- <li><a href="redis-client/iredisclient-api">IRedisClient API</a></li>
- <li><a href="redis-client/iredistypedclient-api">IRedisTypedClient API</a></li>
- <li><a href="redis-client/iredisnativeclient-api">IRedisNativeClient API</a></li>
- <li><a href="redis-client/iredistransaction-api">IRedisTransaction API</a></li>
+ <li>
+ <a href="redis-client/redis-client">Redis Client</a></li>
+ <li>
+ <a href="redis-client/redis-overview">Redis Overview</a></li>
+ <li>
+ <a href="redis-client/useful-redis-links">Useful Redis Links</a></li>
+ <li>
+ <a href="redis-client/redis-release-notes">Redis Release Notes</a></li>
+ <li>
+ <a href="redis-client/designing-nosql-database">Designing NoSQL Database</a></li>
+ <li>
+ <a href="redis-client/schemaless-nosql-migrations">Schemaless NoSQL Migrations</a></li>
+ <li>
+ <a href="redis-client/distributed-locking-with-redis">Distributed Locking with Redis</a></li>
+ <li>
+ <a href="redis-client/redis-pubsub">Redis Pub/Sub</a></li>
+ <li>
+ <a href="redis-client/redis-transactions">Redis Transactions</a></li>
+ <li>
+ <a href="redis-client/iredisclient-api">IRedisClient API</a></li>
+ <li>
+ <a href="redis-client/iredistypedclient-api">IRedisTypedClient API</a></li>
+ <li>
+ <a href="redis-client/iredisnativeclient-api">IRedisNativeClient API</a></li>
+ <li>
+ <a href="redis-client/iredistransaction-api">IRedisTransaction API</a></li>
</ul>
- <h2>
- Redis Admin UI and Redis WebServices</h2>
+ <h2>Redis Admin UI and Redis Web Services</h2>
<ul>
- <li><a href="redis-admin-ui/redis-admin-ui-overview">Redis Admin UI Overview</a></li>
+ <li>
+ <a href="redis-admin-ui/redis-admin-ui-overview">Redis Admin UI Overview</a></li>
</ul>
- <h2>
- ServiceStack.Text JSON, CSV and JSV Serializers</h2>
+ <h2>ServiceStack.Text JSON, CSV and JSV Serializers</h2>
<ul>
- <li><a href="text-serializers/json-csv-jsv-serializers">JSON, CSV, JSV Serializers</a></li>
- <li><a href="text-serializers/jsv-format">The JSV Format</a></li>
- <li><a href="text-serializers/override-mvc-jsonresult">Override MVCs JsonResult</a></li>
+ <li>
+ <a href="text-serializers/json-csv-jsv-serializers">JSON, CSV, JSV Serializers</a></li>
+ <li>
+ <a href="text-serializers/jsv-format">The JSV Format</a></li>
+ <li>
+ <a href="text-serializers/override-mvc-jsonresult">Override MVCs JsonResult</a></li>
</ul>
- <h2>
- ServiceStack Example projects and Starter Templates</h2>
+ <h2>ServiceStack Example projects and Starter Templates</h2>
<ul>
- <li><a href="examples/servicestack-examples">ServiceStack Examples</a></li>
+ <li>
+ <a href="examples/servicestack-examples">ServiceStack Examples</a></li>
</ul>
- <h2>
- OrmLite - Fast, Lite Orm for Sqlite and SqlServer</h2>
+ <h2>OrmLite - Fast, Lite Orm for Sqlite and SqlServer</h2>
<ul>
- <li><a href="ormlite/ormlite-overview">OrmLite Overview</a></li>
+ <li>
+ <a href="ormlite/ormlite-overview">OrmLite Overview</a></li>
</ul>
- <h2>
- Contrib - Complementary libraries and Utils for developing WebServices</h2>
+ <h2>Contrib - Complementary libraries and Utils for developing web services</h2>
<ul>
- <li><a href="contrib/servicestack-contrib">ServiceStack Contrib</a></li>
+ <li>
+ <a href="contrib/servicestack-contrib">ServiceStack Contrib</a></li>
</ul>
- <h2>
- ServiceStack.Logging - Dependency-free logging interface</h2>
+ <h2>ServiceStack.Logging - Dependency-free logging interface</h2>
<ul>
- <li><a href="logging/logging-overview">Logging Overview</a></li>
+ <li>
+ <a href="logging/logging-overview">Logging Overview</a></li>
</ul>
<div class="cl">
&nbsp;</div>
</div>
<div class="meta">
<div class="bg">
- <span class="comments-num"><span>Comments Off</span></span>
+ <span class="comments-num">
+ <span>Comments Off</span></span>
<p>
Posted
<!-- by Theme Admin -->
- in
- <a href="category/Framework" title="View all posts in Framework"
- rel="category">Framework</a>
- </p>
+ in <a href="category/Framework" title="View all posts in Framework" rel="category">Framework</a>
+ </p>
</div>
<div class="bot">
&nbsp;</div>
@@ -159,66 +178,78 @@ <h2 id="title">
<ul>
<li>
<form action="search" id="searchform" method="GET">
- <label for="Query" class="screen-reader-text">Search</label>
- <div class="field-place">
- <input type="text" class="field" id="Query" name="Query" value="" />
- <input type="submit" class="button" value="Search" id="searchsubmit" />
- </div>
+ <label for="Query" class="screen-reader-text">Search</label>
+ <div class="field-place">
+ <input type="text" class="field" id="Query" name="Query" value="" />
+ <input type="submit" class="button" value="Search" id="searchsubmit" />
+ </div>
</form>
</li>
</ul>
<ul role="navigation">
<li class="pagenav">
- <h2>
- Pages</h2>
-
-<ul>
-<li><b><a href='category/Markdown'>Markdown</a></b> (3)
-<ul class='children'>
-<li><a href='markdown/about'>About Docs</a></li>
-<li><a href='markdown/markdown-features'>Markdown Features</a></li>
-<li><a href='markdown/markdown-razor'>Markdown Razor</a></li>
-</ul>
-</li>
-<li><a href='category/Framework'>Framework</a> (9)
-</li>
-<li><a href='category/Redis Client'>Redis Client</a> (13)
-</li>
-<li><a href='category/Redis Admin UI'>Redis Admin UI</a> (1)
-</li>
-<li><a href='category/Text Serializers'>Text Serializers</a> (3)
-</li>
-<li><a href='category/Examples'>Examples</a> (1)
-</li>
-<li><a href='category/OrmLite'>OrmLite</a> (1)
-</li>
-<li><a href='category/Contrib'>Contrib</a> (1)
-</li>
-<li><a href='category/Logging'>Logging</a> (1)
-</li>
-</ul>
-
- </li>
-
- </ul>
-
-
+ <h2>Pages</h2>
+ <ul>
+ <li>
+ <b><a href='category/Markdown'>Markdown</a></b> (3)
+ <ul class='children'>
+ <li>
+ <a href='markdown/about'>About Docs</a></li>
+ <li>
+ <a href='markdown/markdown-features'>Markdown Features</a></li>
+ <li>
+ <a href='markdown/markdown-razor'>Markdown Razor</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href='category/Framework'>Framework</a> (9)
+ </li>
+ <li>
+ <a href='category/Redis Client'>Redis Client</a> (13)
+ </li>
+ <li>
+ <a href='category/Redis Admin UI'>Redis Admin UI</a> (1)
+ </li>
+ <li>
+ <a href='category/Text Serializers'>Text Serializers</a> (3)
+ </li>
+ <li>
+ <a href='category/Examples'>Examples</a> (1)
+ </li>
+ <li>
+ <a href='category/OrmLite'>OrmLite</a> (1)
+ </li>
+ <li>
+ <a href='category/Contrib'>Contrib</a> (1)
+ </li>
+ <li>
+ <a href='category/Logging'>Logging</a> (1)
+ </li>
+ </ul>
</li>
- </li>
+ </ul>
+ </li> </ul> </li> </ul>
+ <ul>
<li>
<h2>Meta</h2>
<ul>
-
- </li>
- </ul>
-
- <ul>
- <li>
- <h2>Meta</h2>
+ <li>
+ <a href="http://twitter.com/ServiceStack">@ServiceStack</a></li>
+ <li>
+ <a href="http://groups.google.com/group/servicestack">Google Group</a></li>
+ <li>
+ <a href="http://www.servicestack.net/mythz_blog/">Developer Blog</a></li>
+ <li>
+ <a href="http://www.servicestack.net/showcase/">Showcase</a></li>
+ <li>
+ <a href="http://www.servicestack.net/ServiceStack.Hello/">Hello World</a></li>
+ <li>
+ <a href="https://docs.google.com/present/view?id=dg3mcfb_213gsvvmmfk">REST Tutorial</a></li>
+ <li>
+ <a href="https://github.com/ServiceStack/">GitHub</a></li>
</ul>
</li>
</ul>
- <li><a href="http://www.servicestack.net/mythz_blog/">Developer Blog</a></li>
</div>
<!-- END Sidebar -->
<div class="cl">
@@ -238,15 +269,14 @@ <h2 id="title">
<!-- END Footer -->
</div>
<!-- END Page -->
- ChocoTheme by <a href="http://cssmayo.com">.css{mayo}</a> | powered by WordPress</p>
- <p>
- Copyright © 2011 Liquidbit Ltd. All rights reserved.
- </p>
- </div>
- <!-- END Footer -->
- </div>
- <!-- END Page -->
-
-<script type="text/javascript">
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-7722718-7");
+ pageTracker._trackPageview();
+ } catch (err) { }</script>
</body>
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</html>
View
136 src/Docs/framework/accessing-ihttprequest.md
@@ -1,69 +1,69 @@
-# Access the HTTP Request in Web Services
-
-By default ServiceStack provides a clean, dependency-free IService<T> to implement your Web Services logic in. The philosophy behind this approach is that the less dependencies you have on your environment and its request context, the more testable and re-usable your services become.
-
-### Advantages for living without it
-If you don't need to access the HTTP Request context there is nothing stopping you from having your same IService<T> implementation processing requests from a message queue which we've done for internal projects (which incidentally is the motivation behind the **asynconeway** endpoint, to signal requests that are safe for deferred execution).
-
-## Injecting the IRequestContext into your Service
-Although working in a clean-room can be ideal ideal from re-usability and testability point of view, you stand the chance of missing out a lot of the features present in HTTP. So not wanting to limit your web services usefulness, this feature of accessing the RequestContext has been present in ServiceStack from early on however because it hasn't been well documented its not very well-known (An issue this wiki page hopes to correct :)
-
-Just like using built-in Funq IOC container, the way to tell ServiceStack to inject the request context is by implementing the [IRequiresRequestContext](https://github.com/ServiceStack/ServiceStack.Interfaces/blob/master/src/ServiceStack.ServiceHost/IRequiresRequestContext.cs) interface which will get the [IRequestContext](https://github.com/ServiceStack/ServiceStack.Interfaces/blob/master/src/ServiceStack.ServiceHost/IRequestContext.cs) inject before each request.
-
- public interface IRequestContext : IDisposable
- {
- T Get<T>() where T : class;
-
- string IpAddress { get; }
-
- IDictionary<string, Cookie> Cookies { get; }
-
- EndpointAttributes EndpointAttributes { get; }
-
- IRequestAttributes RequestAttributes { get; }
-
- string MimeType { get; }
-
- string CompressionType { get; }
-
- string AbsoluteUri { get; }
-
- IFile[] Files { get; }
- }
-
-
-This will allow your services to inspect any Cookies or download any Files that were sent with the request.
-Note: to set Response Cookies or Headers, return the [HttpResult](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Common/Web/HttpResult.cs) object.
-
-## Accessing the IHttpRequest and IHttpResponse using filters
-A recent addition to ServiceStack is the ability to register custom Request and Response filters. These should be registered in your AppHost.Configure() onload script:
-
-* The Request Filters are applied before the service gets called and accepts:
-_([IHttpRequest](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpRequest.cs), [IHttpResponse](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpResponse.cs), RequestDto)_ e.g:
-
- //Add a request filter to check if the user has a session initialized
- this.RequestFilters.Add((httpReq, httpReq, requestDto) =>
- {
- var sessionId = httpReq.GetCookieValue("user-session");
- if (sessionId == null)
- {
- httpReq.ReturnAuthRequired();
- }
- });
-
-
-* The Response Filters are applied after your service is called and accepts:
-_([IHttpRequest](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpRequest.cs), [IHttpResponse](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpResponse.cs), ResponseDto)_ e.g:
-
- //Add a response filter to add a 'Content-Disposition' header so browsers treat it as a native .csv file
- this.ResponseFilters.Add((req, res, dto) =>
- {
- if (req.ResponseContentType == ContentType.Csv)
- {
- res.AddHeader(HttpHeaders.ContentDisposition,
- string.Format("attachment;filename={0}.csv", req.OperationName));
- }
- });
-
-
+# Access the HTTP Request in Web Services
+
+By default ServiceStack provides a clean, dependency-free IService<T> to implement your Web Services logic in. The philosophy behind this approach is that the less dependencies you have on your environment and its request context, the more testable and re-usable your services become.
+
+### Advantages for living without it
+If you don't need to access the HTTP Request context there is nothing stopping you from having your same IService<T> implementation processing requests from a message queue which we've done for internal projects (which incidentally is the motivation behind the **asynconeway** endpoint, to signal requests that are safe for deferred execution).
+
+## Injecting the IRequestContext into your Service
+Although working in a clean-room can be ideal ideal from re-usability and testability point of view, you stand the chance of missing out a lot of the features present in HTTP. So not wanting to limit your web services usefulness, this feature of accessing the RequestContext has been present in ServiceStack from early on however because it hasn't been well documented its not very well-known (An issue this wiki page hopes to correct :)
+
+Just like using built-in Funq IOC container, the way to tell ServiceStack to inject the request context is by implementing the [IRequiresRequestContext](https://github.com/ServiceStack/ServiceStack.Interfaces/blob/master/src/ServiceStack.ServiceHost/IRequiresRequestContext.cs) interface which will get the [IRequestContext](https://github.com/ServiceStack/ServiceStack.Interfaces/blob/master/src/ServiceStack.ServiceHost/IRequestContext.cs) inject before each request.
+
+ public interface IRequestContext : IDisposable
+ {
+ T Get<T>() where T : class;
+
+ string IpAddress { get; }
+
+ IDictionary<string, Cookie> Cookies { get; }
+
+ EndpointAttributes EndpointAttributes { get; }
+
+ IRequestAttributes RequestAttributes { get; }
+
+ string MimeType { get; }
+
+ string CompressionType { get; }
+
+ string AbsoluteUri { get; }
+
+ IFile[] Files { get; }
+ }
+
+
+This will allow your services to inspect any Cookies or download any Files that were sent with the request.
+Note: to set Response Cookies or Headers, return the [HttpResult](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Common/Web/HttpResult.cs) object.
+
+## Accessing the IHttpRequest and IHttpResponse using filters
+A recent addition to ServiceStack is the ability to register custom Request and Response filters. These should be registered in your AppHost.Configure() onload script:
+
+* The Request Filters are applied before the service gets called and accepts:
+_([IHttpRequest](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpRequest.cs), [IHttpResponse](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpResponse.cs), RequestDto)_ e.g:
+
+ //Add a request filter to check if the user has a session initialized
+ this.RequestFilters.Add((httpReq, httpReq, requestDto) =>
+ {
+ var sessionId = httpReq.GetCookieValue("user-session");
+ if (sessionId == null)
+ {
+ httpReq.ReturnAuthRequired();
+ }
+ });
+
+
+* The Response Filters are applied after your service is called and accepts:
+_([IHttpRequest](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpRequest.cs), [IHttpResponse](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceHost/IHttpResponse.cs), ResponseDto)_ e.g:
+
+ //Add a response filter to add a 'Content-Disposition' header so browsers treat it as a native .csv file
+ this.ResponseFilters.Add((req, res, dto) =>
+ {
+ if (req.ResponseContentType == ContentType.Csv)
+ {
+ res.AddHeader(HttpHeaders.ContentDisposition,
+ string.Format("attachment;filename={0}.csv", req.OperationName));
+ }
+ });
+
+
[<Wiki Home](~/framework/home)
View
168 src/Docs/framework/caching-options.md
@@ -1,84 +1,84 @@
-A myriad of different, pluggable options are included in Service Stack for the most popular cache providers.
-
-# Introduction
-
-As caching is an essential technology in the development of high-performance web services, Service Stack has a number of different caching options available that each share the same
-[common client interface](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/CacheAccess/ICacheClient.cs)
-for the following cache providers:
-
-# Live Example and code
-
-A live demo of the ICacheClient is available in [The ServiceStack.Northwind's example project](http://servicestack.net/ServiceStack.Northwind/). Here are some requests to cached services:
-
- * [/customers](http://servicestack.net/ServiceStack.Northwind/cached/customers)
- * [/customers/ALFKI](http://servicestack.net/ServiceStack.Northwind/cached/customers/ALFKI)
- * [/customers/ALFKI/orders](http://servicestack.net/ServiceStack.Northwind/cached/customers/ALFKI/orders)
-
-Which are simply existing web services wrapped using **ICacheClient** that are contained in [CachedServices.cs](https://github.com/ServiceStack/ServiceStack.Examples/blob/master/src/ServiceStack.Northwind/ServiceStack.Northwind.ServiceInterface/CachedServices.cs)
-
-# Cache Providers
-
- * [Memcached](https://github.com/ServiceStack/ServiceStack/tree/master/src/ServiceStack.CacheAccess.Memcached/) - The tried and tested most widely used cache provider.
- * [Redis](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/src/ServiceStack.Redis/RedisClient.ICacheClient.cs) - A very fast key-value store that has non-volatile persistent storage and support for rich data structures such as lists and sets.
- * [In Memory Cache](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.CacheAccess.Providers/MemoryCacheClient.cs) - Useful for single host web services and enabling unit tests to run without needing access to a cache server.
- * [FileAndCacheTextManager](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.CacheAccess.Providers/FileAndCacheTextManager.cs) - A two-tiered cache provider that caches using one of the above cache clients as well as a compressed XML or JSON serialized backup cache on the file system.
-
-## ICacheClient the Common Interface
-
-
- //A common interface implementation that is implemeneted by most cache providers
- public interface ICacheClient
- : IDisposable
- {
- //Removes the specified item from the cache.
- bool Remove(string key);
-
- //Removes the cache for all the keys provided.
- void RemoveAll(IEnumerable<string> keys);
-
- //Retrieves the specified item from the cache.
- T Get<T>(string key);
-
- //Increments the value of the specified key by the given amount.
- //The operation is atomic and happens on the server.
- //A non existent value at key starts at 0
- long Increment(string key, uint amount);
-
- //Increments the value of the specified key by the given amount.
- //The operation is atomic and happens on the server.
- //A non existent value at key starts at 0
- long Decrement(string key, uint amount);
-
- //Adds a new item into the cache at the specified cache key only if the cache is empty.
- bool Add<T>(string key, T value);
-
- //Sets an item into the cache at the cache key specified regardless if it already exists or not.
- bool Set<T>(string key, T value);
-
-
- //Replaces the item at the cachekey specified only if an items exists at the location already.
- bool Replace<T>(string key, T value);
-
- bool Add<T>(string key, T value, DateTime expiresAt);
- bool Set<T>(string key, T value, DateTime expiresAt);
- bool Replace<T>(string key, T value, DateTime expiresAt);
-
- bool Add<T>(string key, T value, TimeSpan expiresIn);
- bool Set<T>(string key, T value, TimeSpan expiresIn);
- bool Replace<T>(string key, T value, TimeSpan expiresIn);
-
-
- //Invalidates all data on the cache.
- void FlushAll();
-
- //Retrieves multiple items from the cache.
- //The default value of T is set for all keys that do not exist.
- IDictionary<string, T> GetAll<T>(IEnumerable<string> keys);
-
-
- //Sets multiple items to the cache.
- void SetAll<T>(IDictionary<string, T> values);
- }
-
-
-[<Wiki Home](~/framework/home)
+A myriad of different, pluggable options are included in Service Stack for the most popular cache providers.
+
+# Introduction
+
+As caching is an essential technology in the development of high-performance web services, Service Stack has a number of different caching options available that each share the same
+[common client interface](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/CacheAccess/ICacheClient.cs)
+for the following cache providers:
+
+# Live Example and code
+
+A live demo of the ICacheClient is available in [The ServiceStack.Northwind's example project](http://servicestack.net/ServiceStack.Northwind/). Here are some requests to cached services:
+
+ * [/customers](http://servicestack.net/ServiceStack.Northwind/cached/customers)
+ * [/customers/ALFKI](http://servicestack.net/ServiceStack.Northwind/cached/customers/ALFKI)
+ * [/customers/ALFKI/orders](http://servicestack.net/ServiceStack.Northwind/cached/customers/ALFKI/orders)
+
+Which are simply existing web services wrapped using **ICacheClient** that are contained in [CachedServices.cs](https://github.com/ServiceStack/ServiceStack.Examples/blob/master/src/ServiceStack.Northwind/ServiceStack.Northwind.ServiceInterface/CachedServices.cs)
+
+# Cache Providers
+
+ * [Memcached](https://github.com/ServiceStack/ServiceStack/tree/master/src/ServiceStack.CacheAccess.Memcached/) - The tried and tested most widely used cache provider.
+ * [Redis](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/src/ServiceStack.Redis/RedisClient.ICacheClient.cs) - A very fast key-value store that has non-volatile persistent storage and support for rich data structures such as lists and sets.
+ * [In Memory Cache](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.CacheAccess.Providers/MemoryCacheClient.cs) - Useful for single host web services and enabling unit tests to run without needing access to a cache server.
+ * [FileAndCacheTextManager](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.CacheAccess.Providers/FileAndCacheTextManager.cs) - A two-tiered cache provider that caches using one of the above cache clients as well as a compressed XML or JSON serialized backup cache on the file system.
+
+## ICacheClient the Common Interface
+
+
+ //A common interface implementation that is implemented by most cache providers
+ public interface ICacheClient
+ : IDisposable
+ {
+ //Removes the specified item from the cache.
+ bool Remove(string key);
+
+ //Removes the cache for all the keys provided.
+ void RemoveAll(IEnumerable<string> keys);
+
+ //Retrieves the specified item from the cache.
+ T Get<T>(string key);
+
+ //Increments the value of the specified key by the given amount.
+ //The operation is atomic and happens on the server.
+ //A non existent value at key starts at 0
+ long Increment(string key, uint amount);
+
+ //Increments the value of the specified key by the given amount.
+ //The operation is atomic and happens on the server.
+ //A non existent value at key starts at 0
+ long Decrement(string key, uint amount);
+
+ //Adds a new item into the cache at the specified cache key only if the cache is empty.
+ bool Add<T>(string key, T value);
+
+ //Sets an item into the cache at the cache key specified regardless if it already exists or not.
+ bool Set<T>(string key, T value);
+
+
+ //Replaces the item at the cachekey specified only if an items exists at the location already.
+ bool Replace<T>(string key, T value);
+
+ bool Add<T>(string key, T value, DateTime expiresAt);
+ bool Set<T>(string key, T value, DateTime expiresAt);
+ bool Replace<T>(string key, T value, DateTime expiresAt);
+
+ bool Add<T>(string key, T value, TimeSpan expiresIn);
+ bool Set<T>(string key, T value, TimeSpan expiresIn);
+ bool Replace<T>(string key, T value, TimeSpan expiresIn);
+
+
+ //Invalidates all data on the cache.
+ void FlushAll();
+
+ //Retrieves multiple items from the cache.
+ //The default value of T is set for all keys that do not exist.
+ IDictionary<string, T> GetAll<T>(IEnumerable<string> keys);
+
+
+ //Sets multiple items to the cache.
+ void SetAll<T>(IDictionary<string, T> values);
+ }
+
+
+[<Wiki Home](~/framework/home)
View
168 src/Docs/framework/csv-format.md
@@ -1,84 +1,84 @@
-#ServiceStack's CSV Format
-
-The [CSV format](http://en.wikipedia.org/wiki/Comma-separated_values) is now a first-class supported format which means all your existing web services can automatically take advantage of the new format without any config or code changes. Just drop the latest ServiceStack.dlls (v1.77+) and you're good to go!
-
-### Importance of CSV
-CSV is an important format for transferring, migrating and quickly visualizing data as all spreadsheets support viewing and editing CSV files directly whilst its supported by most RDBMS support exporting and importing data. Compared with other serialization formats, it provides a compact and efficient way to transfer large datasets in an easy to read text format.
-
-### Speed
-The CSV Serializer used was developed using the same tech that makes [ServiceStack's JSV and JSON serializers fast](http://www.servicestack.net/benchmarks/NorthwindDatabaseRowsSerialization.100000-times.2010-08-17.html) (i.e. no run-time reflection, static delegate caching, etc), which should make it the fastest CSV serializer available for .NET.
-
-### Downloadable Separately
-The CsvSerializer is maintained in the [ServiceStack.Text](~/text-serializers/json-csv-jsv-serializers) project and is available as a [separate download](https://github.com/ServiceStack/ServiceStack.Text/downloads) for use in your own .NET projects.
-
-### How to register your own custom format with ServiceStack
-What makes the 'CSV' format different is its the first format added using the new extensions API. The complete code to register the CSV format is:
-
- //Register the 'text/csv' content-type and serializers (format is inferred from the last part of the content-type)
- this.ContentTypeFilters.Register(ContentType.Csv,
- CsvSerializer.SerializeToStream, CsvSerializer.DeserializeFromStream);
-
- //Add a response filter to add a 'Content-Disposition' header so browsers treat it natively as a .csv file
- this.ResponseFilters.Add((req, res, dto) =>
- {
- if (req.ResponseContentType == ContentType.Csv)
- {
- res.AddHeader(HttpHeaders.ContentDisposition,
- string.Format("attachment;filename={0}.csv", req.OperationName));
- }
- });
-
-
-Note: **ServiceStack already does this for you** though it still serves a good example to show how you can plug-in your own custom format. If you wish, you can remove all custom formats with (inside AppHost.Configure()):
- this.ContentTypeFilters.ClearCustomFilters();
-
-The ability to automatically to register another format and provide immediate value and added functionality to all your existing web services (without any code-changes or configuration) we believe is a testament to ServiceStack's clean design of using strongly-typed 'message-based' DTOs to let you develop clean, testable and re-usable web services. No code-gen or marshalling is required to bind to an abstract method signature, every request and calling convention maps naturally to your webservices DTOs.
-
-
-## Usage
-The CSV format is effectively a first-class supported format so everything should work as expected, including being registered as an available format on ServiceStack's metadata index page:
-
-* [/servicestack/metadata](http://www.servicestack.net/ServiceStack.MovieRest/servicestack/metadata)
-
-And being able to preview the output of a service:
-
-* [/servicestack/csv/metadata?op=Movie](http://www.servicestack.net/ServiceStack.MovieRest/servicestack/csv/metadata?op=Movie)
-
-By default they are automatically available using ServiceStack's standard calling conventions, e.g:
-
-* [/csv/syncreply/Movies](http://www.servicestack.net/ServiceStack.MovieRest/csv/syncreply/Movies)
-
-### REST Usage
-CSV also works just as you would expect with user-defined REST-ful urls, i.e. you can append ?format=csv to specify the format in the url e.g:
-
-* [/movies?format=csv](http://www.servicestack.net/ServiceStack.MovieRest/movies?format=csv)
-
-This is how the above web service output looks when opened up in [google docs](https://spreadsheets.google.com/pub?key=0AjnFdBrbn8_fdDBwX0Rha04wSTNWZDZlQXctcmp2bVE&hl=en_GB&output=html)
-
-
-Alternative in following with the HTTP specification you can also specify content-type `"text/csv"` in the *Accept* header of your HttpClient, e.g:
-
- var httpReq = (HttpWebRequest)WebRequest.Create("http://servicestack.net/ServiceStack.MovieRest/movies");
- httpReq.Accept = "text/csv";
- var csv = new StreamReader(httpReq.GetResponse().GetResponseStream()).ReadToEnd();
-
-
-## Limitations
-As most readers familiar with the CSV format will know there are some inherent limitations with CSV-format namely it is a flat-structured tabular data format that really only supports serialization of a single resultset.
-This limitation remains, although as the choice of what to serialize is based on the following conventions:
-
-* If you only return one result in your DTO it will serialize that.
-* If you return multiple results it will pick the first IEnumerable<> property or if it doesn't exist picks the first property.
-* Non-enumerable results are treated like a single row.
-
-Basically if you only return 1 result it should work as expected otherwise it will chose the best candidate based on the rules above.
-
-The second major limitation is that it doesn't yet include a CSV Deserializer (currently on the TODO list), so while you can view the results in CSV format you can't post data to your web service in CSV and have it automatically deserialize for you. You can however still upload a CSV file and parse it manually yourself.
-
-#Features
-Unlike most CSV serializers that can only serialize rows of primitive values, the CsvSeriliaizer uses the [JSV Format](~/text-serializers/jsv-format) under the hood so even [complex types](https://spreadsheets.google.com/pub?key=0AjnFdBrbn8_fdG83eWdGM1lnVW9PMlplcmVDYWtXeVE&hl=en_GB&output=html) will be serialized in fields in a easy to read format - no matter how deep its heirachy.
-
-
-Feel free to discuss or find more about any of these features at the [Service Stack Google Group](https://groups.google.com/forum/#!forum/servicestack)
-
-[<Wiki Home](~/framework/home)
+#ServiceStack's CSV Format
+
+The [CSV format](http://en.wikipedia.org/wiki/Comma-separated_values) is now a first-class supported format which means all your existing web services can automatically take advantage of the new format without any config or code changes. Just drop the latest ServiceStack.dlls (v1.77+) and you're good to go!
+
+### Importance of CSV
+CSV is an important format for transferring, migrating and quickly visualizing data as all spreadsheets support viewing and editing CSV files directly whilst its supported by most RDBMS support exporting and importing data. Compared with other serialization formats, it provides a compact and efficient way to transfer large datasets in an easy to read text format.
+
+### Speed
+The CSV Serializer used was developed using the same tech that makes [ServiceStack's JSV and JSON serializers fast](http://www.servicestack.net/benchmarks/NorthwindDatabaseRowsSerialization.100000-times.2010-08-17.html) (i.e. no run-time reflection, static delegate caching, etc), which should make it the fastest CSV serializer available for .NET.
+
+### Downloadable Separately
+The CsvSerializer is maintained in the [ServiceStack.Text](~/text-serializers/json-csv-jsv-serializers) project and is available as a [separate download](https://github.com/ServiceStack/ServiceStack.Text/downloads) for use in your own .NET projects.
+
+### How to register your own custom format with ServiceStack
+What makes the 'CSV' format different is its the first format added using the new extensions API. The complete code to register the CSV format is:
+
+ //Register the 'text/csv' content-type and serializers (format is inferred from the last part of the content-type)
+ this.ContentTypeFilters.Register(ContentType.Csv,
+ CsvSerializer.SerializeToStream, CsvSerializer.DeserializeFromStream);
+
+ //Add a response filter to add a 'Content-Disposition' header so browsers treat it natively as a .csv file
+ this.ResponseFilters.Add((req, res, dto) =>
+ {
+ if (req.ResponseContentType == ContentType.Csv)
+ {
+ res.AddHeader(HttpHeaders.ContentDisposition,
+ string.Format("attachment;filename={0}.csv", req.OperationName));
+ }
+ });
+
+
+Note: **ServiceStack already does this for you** though it still serves a good example to show how you can plug-in your own custom format. If you wish, you can remove all custom formats with (inside AppHost.Configure()):
+ this.ContentTypeFilters.ClearCustomFilters();
+
+The ability to automatically to register another format and provide immediate value and added functionality to all your existing web services (without any code-changes or configuration) we believe is a testament to ServiceStack's clean design of using strongly-typed 'message-based' DTOs to let you develop clean, testable and re-usable web services. No code-gen or marshalling is required to bind to an abstract method signature, every request and calling convention maps naturally to your web services DTOs.
+
+
+## Usage
+The CSV format is effectively a first-class supported format so everything should work as expected, including being registered as an available format on ServiceStack's metadata index page:
+
+* [/servicestack/metadata](http://www.servicestack.net/ServiceStack.MovieRest/servicestack/metadata)
+
+And being able to preview the output of a service:
+
+* [/servicestack/csv/metadata?op=Movie](http://www.servicestack.net/ServiceStack.MovieRest/servicestack/csv/metadata?op=Movie)
+
+By default they are automatically available using ServiceStack's standard calling conventions, e.g:
+
+* [/csv/syncreply/Movies](http://www.servicestack.net/ServiceStack.MovieRest/csv/syncreply/Movies)
+
+### REST Usage
+CSV also works just as you would expect with user-defined RESTful urls, i.e. you can append ?format=csv to specify the format in the url e.g:
+
+* [/movies?format=csv](http://www.servicestack.net/ServiceStack.MovieRest/movies?format=csv)
+
+This is how the above web service output looks when opened up in [google docs](https://spreadsheets.google.com/pub?key=0AjnFdBrbn8_fdDBwX0Rha04wSTNWZDZlQXctcmp2bVE&hl=en_GB&output=html)
+
+
+Alternative in following with the HTTP specification you can also specify content-type `"text/csv"` in the *Accept* header of your HttpClient, e.g:
+
+ var httpReq = (HttpWebRequest)WebRequest.Create("http://servicestack.net/ServiceStack.MovieRest/movies");
+ httpReq.Accept = "text/csv";
+ var csv = new StreamReader(httpReq.GetResponse().GetResponseStream()).ReadToEnd();
+
+
+## Limitations
+As most readers familiar with the CSV format will know there are some inherent limitations with CSV-format namely it is a flat-structured tabular data format that really only supports serialization of a single result set.
+This limitation remains, although as the choice of what to serialize is based on the following conventions:
+
+* If you only return one result in your DTO it will serialize that.
+* If you return multiple results it will pick the first IEnumerable<> property or if it doesn't exist picks the first property.
+* Non-enumerable results are treated like a single row.
+
+Basically if you only return 1 result it should work as expected otherwise it will chose the best candidate based on the rules above.
+
+The second major limitation is that it doesn't yet include a CSV deserializer (currently on the TODO list), so while you can view the results in CSV format you can't post data to your web service in CSV and have it automatically deserialize for you. You can however still upload a CSV file and parse it manually yourself.
+
+#Features
+Unlike most CSV serializers that can only serialize rows of primitive values, the CsvSeriliaizer uses the [JSV Format](~/text-serializers/jsv-format) under the hood so even [complex types](https://spreadsheets.google.com/pub?key=0AjnFdBrbn8_fdG83eWdGM1lnVW9PMlplcmVDYWtXeVE&hl=en_GB&output=html) will be serialized in fields in a easy to read format - no matter how deep its hierarchy.
+
+
+Feel free to discuss or find more about any of these features at the [Service Stack Google Group](https://groups.google.com/forum/#!forum/servicestack)
+
+[<Wiki Home](~/framework/home)
View
166 src/Docs/framework/history-of-webservices.md
@@ -1,83 +1,83 @@
-A summary of Service Stack's available and recommended Web Service end points.
-
-# Available web service endpoints
-As different endpoints have advantages in different scenarios, Service Stack supports the following endpoints out of the box:
-
- * XML (+ REST GET urls) - Faster than JSON. Most standards compliant and interoperable format (Most Recommended).
- * JSON (+ REST GET urls) - More compact but slower than XML (Recommended for use in Ajax applications).
- * JSV (+ REST GET urls) - Fast, compact, resilient serialization format (Recommended for .NET to .NET web services).
- * SOAP 1.1/1.2 - Utilizes WCF SOAP web services under the covers. (Recommended for corporate Intranet environments where maximum performance is not a priority or if you have a preference WSDL tooling support e.g. IDE integration and auto-generated client proxies, etc).
-
-If you're interested for a more background information on the history of the different formats and the advantages and disadvantages of each read on below...
-
-# Service Stack's view on the history of Web Services
-
-The W3C defines a "web service" as "a software system designed to support interoperable machine-to-machine interaction over a network.
-
-The key parts of this definition are that it should be interoperable and that it facilitates communication over a network. Unfortunately over the years different companies have had different ideas on what the most ideal interoperable protocol should be, leaving a debt-load of legacy binary and proprietary protocols in its wake.
-
-## HTTP the defacto web services transport protocol
-HTTP the Internet's protocol is the undisputed champ and will be for the foreseeable future. It's universally accepted, can be proxied and is pretty much the only protocol allowed through most firewalls which is the reason why Service Stack (and most other Web Service frameworks) support it. Note: the future roadmap will also support the more optimized HTML5 'Web Sockets' standard.
-
-## XML the winning serialization format?
-Out of the ashes another winning format looking to follow in HTTP's success, is the XML text serialization format. Some of the many reasons why it has reigned supreme include:
-
- * Simple, Open, self-describing text-based format
- * Human and Computer readable and writeable
- * Verifiable
- * Provides a rich set of common data types
- * Can define higher-level custom types
-XML doesn't come without its disadvantages which currently are centred around it being verbose and being slow to parse resulting wasted CPU cycles.
-
-## REST vs SOAP
-Despite the win, all is not well in XML camp. It seems that two teams are at odds looking to branch the way XML is used in web services. On one side, I'll label the REST camp (despite REST being more than just XML) approach to developing web services is centred around resources and prefers to err on simplicity and convention choosing to re-use the other existing HTTP metaphors where they're semantically correct. E.g. calling GET on the URL `http://host/customers` will most likely return a list of customers, whilst PUT'ing a 'Customer' against the same url will, if supported append the 'Customer' to the existing list of customers.
-
-The URL's used in REST-ful web services also form a core part of the API, it is normally logically formed and clearly describes the type of data that is expected, e.g. viewing a particular customers order would look something like:
-
- * GET `http://location/customers/mythz/orders/1001` - would return details about order '1001' which was placed by the customer 'mythz'.
-The benefit of using a logical URL scheme is that other parts of your web services API can be inferred, e.g.
-
- * GET `http://location/customers/mythz/orders` - would return all of 'mythz' orders
- * GET `http://location/customers/mythz` - would return details about the customer 'mythz'
- * GET `http://location/customers` - would return a list of all customers
-If supported, you may have access to different operations on the same resources via the other HTTP methods: POST, PUT and DELETE. One of the limitations of having a REST-ful web services API is that although the API may be conventional and inferable by humans, it isn't friendly to computers and likely requires another unstructured document accompanying the web services API identifying the list, schema and capabilities of each service. This makes it a hard API to provide rich tooling support for or to be able to generate a programmatic API against.
-
-NOTE: If you're interested in learning more about REST one of the articles I highly recommend is [http://tomayko.com/writings/rest-to-my-wife](http://tomayko.com/writings/rest-to-my-wife)
-
-### Enter SOAP
-SOAP school discards this HTTP/URL nonsense and teaches that there is only one true METHOD - the HTTP 'POST' and there is only one url / end point you need to worry about - which depending on the technology chosen would look something like `http://location/CustomerService.svc`. Importantly nothing is left to the human imagination, everything is structured and explicitly defined by the web services WSDL which could be also obtained via a url e.g. `http://location/CustomerService.svc?wsdl`. Now the WSDL is an intimately detailed beast listing everything you would ever want to know about the definition of your web services. Unfortunately it's detailed to the point of being unnecessarily complex where you have layers of artificial constructs named messages, bindings, ports, parts, input and output operations, etc. most of which remains un-utilized which a lot of REST folk would say is too much info that can be achieved with a simple GET request :)
-
-What it does give you however, is a structured list of all the operations available, including the schema of all the custom types each operation accepts. From this document tools can generate a client proxy into your preferred programming language providing a nice strongly-typed API to code against. SOAP is generally favoured by a lot of enterprises for internal web services as in a lot of cases if the code compiles then there's a good chance it will just work.
-
-Ultimately on the wire, SOAP services are simply HTTP POSTs to the same endpoint where each payload (usually of the same as the SOAP-Action) is wrapped inside the body of a 'SOAP' envelope. This layer stops a lot of people from accessing the XML payload directly and have to resort to using a SOAP client library just to access the core data.
-
-This complexity is not stopping the Microsoft's and IBM's behind the SOAP specification any-time soon. Nope they're hard at work finishing their latest creations that are adding additional layers on top of SOAP (i.e. WS-Security, WS-Reliability, WS-Transaction, WS-Addressing) which is commonly referred to as the `WS-*` standards. Interestingly the `WS-*` stack happens to be complex enough that they happen to be the only companies able to supply the complying software and tooling to support it, which funnily enough works seamlessly with their expensive servers.
-
-It does seem that Microsoft, being the fashionable technology company they are don't have all their eggs in the `WS-*` bucket. Realizing the current criticisms on their current technology stack, they have explored a range of other web service technologies namely WCF Data Services, WCF RIA Services and now their current favourite OData. The last of which I expect to see all their previous resource efforts in `WS-*` to be transferred into promoting this new Moniker. On the surface OData seems to be a very good 'enabling technology' that is doing a good job incorporating every good technology BUZZ-word it can (i.e. REST, ATOM, JSON). It is also being promoted as 'clickbox driven development' technology (which I'll be eagerly awaiting to see the sticker for :).
-
-Catering for drag n' drop developers and being able to create web services with a checkbox is a double-edged sword which I believe encourages web service development anti-patterns that run contra to SOA-style (which I will cover in a separate post). Just so everyone knows the latest push behind OData technology is to give you more reasons to use Azure (Microsoft's cloud computing effort).
-
-## POX to the rescue?
-For the pragmatic programmer it's becoming a hard task to follow the `WS-*` stack and still be able to get any work done. For what appears to be a growing trend, a lot of developers have taken the best bits from SOAP and WSDL and combined them in what is commonly referred to as POX or REST+POX. Basically this is Plain Old Xml over HTTP and REST-like urls. In this case a lot of the cruft inside a WSDL can be reduced to a simple XSD and a url. The interesting part about POX is that although there seems to be no formal spec published, a lot of accomplished web service developers have ultimately ended up at the same solution. The advantages this has over SOAP are numerous many of which are the same reasons that have made HTTP+XML ubiquitous. It is a lot simpler, smaller and faster at both development and runtime performance - while at the same time retaining a strongly-typed API (which is one of the major benefits of SOAP). Even though it's lacking a formal API, it can be argued that POX is still more interoperable than SOAP as clients no longer require a SOAP client to consume the web service and can access it simply with a standard Web Client and XML parser present in most programming environments, even most browsers.
-
-## And then there was JSON
-One of the major complaints of XML is that it's too verbose, which given a large enough dataset consumes a lot of bandwidth. It is also a lot stricter than a lot of people would like and given the potential for an XML document to be composed from many different namespaces and for a type to have both elements and attributes - it is not an ideal fit for most programming models. As a result of this, parsing XML can be quite cumbersome especially inside of a browser. A popular format which is seeking to overcome both of these problems and is now the preferred serialization format for AJAX applications is JSON. It is very simple to parse and maps perfectly to a Java Script object, it is also safe format which is the reason why it's chosen over pure Java Script. It's also a more 'dynamic' and resilient format than XML meaning that adding new or renaming existing elements or their types will not break the de-serialization routine as there is no formal spec to adhere to which is both and advantage and disadvantage. Unfortunately even though it's a smaller, more simple format it is actually deceptively slower to de/serialize than XML using the available .NET libraries based on the available benchmarks. This performance gap is more likely due to the amount of effort Microsoft has put into their XML DataContractSerializer than a deficiency of the format itself as my effort of developing a JSON-like serialization format is both smaller than JSON and faster than XML - the best of both worlds.
-
-## Service Stack's new JSV Format
-The latest endpoint to be added to Service Stack, is JSV the serialization format of Service Stack's POCO TypeSerializer. It's a JSON inspired format that uses CSV-style escaping for the least overhead and optimal performance.
-
-With the interest of creating high-performance web services and not satisfied with the performance or size of existing XML and JSON serialization formats, TypeSerializer was created with a core goal to create the most compact and fastest text-serializer for .NET. In this mission, it has succeeded as it is now both 5.3x quicker than the leading .NET JSON serializer whilst being 2.6x smaller than the equivalent XML format.
-
-TypeSerializer was developed from experience taking the best features of serialization formats it looks to replace. It has many other features that sets it apart from existing formats which makes it the best choice for serializing any .NET POCO object.
-
- * Fastest and most compact text-serializer for .NET
- * Human readable and writeable, self-describing text format
- * Non-invasive and configuration-free
- * Resilient to schema changes (focused on deserializing as much as possible without error)
- * Serializes / De-serializes any .NET data type (by convention)
- * Supports custom, compact serialization of structs by overriding `ToString()` and `static T Parse(string)` methods
- * Can serialize inherited, interface or 'late-bound objects' data types
- * Respects opt-in `DataMember` custom serialization for `DataContract` DTO types.
-
-For these reasons it is the preferred choice to transparently store complex POCO types for OrmLite (in text blobs), POCO objects with
-[Service Stack's C# Redis Client](https://github.com/mythz/ServiceStack.Redis) or the optimal serialization format in .NET to .NET web services.
+A summary of Service Stack's available and recommended Web Service end points.
+
+# Available web service endpoints
+As different endpoints have advantages in different scenarios, Service Stack supports the following endpoints out of the box:
+
+ * XML (+ REST GET urls) - Faster than JSON. Most standards compliant and interoperable format (Most Recommended).
+ * JSON (+ REST GET urls) - More compact but slower than XML (Recommended for use in Ajax applications).
+ * JSV (+ REST GET urls) - Fast, compact, resilient serialization format (Recommended for .NET to .NET web services).
+ * SOAP 1.1/1.2 - Utilizes WCF SOAP web services under the covers. (Recommended for corporate Intranet environments where maximum performance is not a priority or if you have a preference WSDL tooling support e.g. IDE integration and auto-generated client proxies, etc).
+
+If you're interested for a more background information on the history of the different formats and the advantages and disadvantages of each read on below...
+
+# Service Stack's view on the history of Web Services
+
+The W3C defines a "web service" as "a software system designed to support interoperable machine-to-machine interaction over a network.
+
+The key parts of this definition are that it should be interoperable and that it facilitates communication over a network. Unfortunately over the years different companies have had different ideas on what the most ideal interoperable protocol should be, leaving a debt-load of legacy binary and proprietary protocols in its wake.
+
+## HTTP the de facto web services transport protocol
+HTTP the Internet's protocol is the undisputed champ and will be for the foreseeable future. It's universally accepted, can be proxied and is pretty much the only protocol allowed through most firewalls which is the reason why Service Stack (and most other Web Service frameworks) support it. Note: the future roadmap will also support the more optimized HTML5 'Web Sockets' standard.
+
+## XML the winning serialization format?
+Out of the ashes another winning format looking to follow in HTTP's success, is the XML text serialization format. Some of the many reasons why it has reigned supreme include:
+
+ * Simple, Open, self-describing text-based format
+ * Human and Computer readable and writeable
+ * Verifiable
+ * Provides a rich set of common data types
+ * Can define higher-level custom types
+XML doesn't come without its disadvantages which currently are centered around it being verbose and being slow to parse resulting wasted CPU cycles.
+
+## REST vs. SOAP
+Despite the win, all is not well in XML camp. It seems that two teams are at odds looking to branch the way XML is used in web services. On one side, I'll label the REST camp (despite REST being more than just XML) approach to developing web services is centred around resources and prefers to err on simplicity and convention choosing to re-use the other existing HTTP metaphors where they're semantically correct. E.g. calling GET on the URL `http://host/customers` will most likely return a list of customers, whilst PUT'ing a 'Customer' against the same url will, if supported append the 'Customer' to the existing list of customers.
+
+The URL's used in RESTful web services also form a core part of the API, it is normally logically formed and clearly describes the type of data that is expected, e.g. viewing a particular customers order would look something like:
+
+ * GET `http://location/customers/mythz/orders/1001` - would return details about order '1001' which was placed by the customer 'mythz'.
+The benefit of using a logical URL scheme is that other parts of your web services API can be inferred, e.g.
+
+ * GET `http://location/customers/mythz/orders` - would return all of 'mythz' orders
+ * GET `http://location/customers/mythz` - would return details about the customer 'mythz'
+ * GET `http://location/customers` - would return a list of all customers
+If supported, you may have access to different operations on the same resources via the other HTTP methods: POST, PUT and DELETE. One of the limitations of having a RESTful web services API is that although the API may be conventional and inferable by humans, it isn't friendly to computers and likely requires another unstructured document accompanying the web services API identifying the list, schema and capabilities of each service. This makes it a hard API to provide rich tooling support for or to be able to generate a programmatic API against.
+
+NOTE: If you're interested in learning more about REST one of the articles I highly recommend is [http://tomayko.com/writings/rest-to-my-wife](http://tomayko.com/writings/rest-to-my-wife)
+
+### Enter SOAP
+SOAP school discards this HTTP/URL nonsense and teaches that there is only one true METHOD - the HTTP 'POST' and there is only one url / end point you need to worry about - which depending on the technology chosen would look something like `http://location/CustomerService.svc`. Importantly nothing is left to the human imagination, everything is structured and explicitly defined by the web services WSDL which could be also obtained via a url e.g. `http://location/CustomerService.svc?wsdl`. Now the WSDL is an intimately detailed beast listing everything you would ever want to know about the definition of your web services. Unfortunately it's detailed to the point of being unnecessarily complex where you have layers of artificial constructs named messages, bindings, ports, parts, input and output operations, etc. most of which remains un-utilized which a lot of REST folk would say is too much info that can be achieved with a simple GET request :)
+
+What it does give you however, is a structured list of all the operations available, including the schema of all the custom types each operation accepts. From this document tools can generate a client proxy into your preferred programming language providing a nice strongly-typed API to code against. SOAP is generally favoured by a lot of enterprises for internal web services as in a lot of cases if the code compiles then there's a good chance it will just work.
+
+Ultimately on the wire, SOAP services are simply HTTP POSTs to the same endpoint where each payload (usually of the same as the SOAP-Action) is wrapped inside the body of a 'SOAP' envelope. This layer stops a lot of people from accessing the XML payload directly and have to resort to using a SOAP client library just to access the core data.
+
+This complexity is not stopping the Microsoft's and IBM's behind the SOAP specification any-time soon. Nope they're hard at work finishing their latest creations that are adding additional layers on top of SOAP (i.e. WS-Security, WS-Reliability, WS-Transaction, WS-Addressing) which is commonly referred to as the `WS-*` standards. Interestingly the `WS-*` stack happens to be complex enough that they happen to be the only companies able to supply the complying software and tooling to support it, which funnily enough works seamlessly with their expensive servers.
+
+It does seem that Microsoft, being the fashionable technology company they are don't have all their eggs in the `WS-*` bucket. Realizing the current criticisms on their current technology stack, they have explored a range of other web service technologies namely WCF Data Services, WCF RIA Services and now their current favourite OData. The last of which I expect to see all their previous resource efforts in `WS-*` to be transferred into promoting this new Moniker. On the surface OData seems to be a very good 'enabling technology' that is doing a good job incorporating every good technology BUZZ-word it can (i.e. REST, ATOM, JSON). It is also being promoted as 'clickbox driven development' technology (which I'll be eagerly awaiting to see the sticker for :).
+
+Catering for drag n' drop developers and being able to create web services with a checkbox is a double-edged sword which I believe encourages web service development anti-patterns that run contra to SOA-style (which I will cover in a separate post). Just so everyone knows the latest push behind OData technology is to give you more reasons to use Azure (Microsoft's cloud computing effort).
+
+## POX to the rescue?
+For the pragmatic programmer it's becoming a hard task to follow the `WS-*` stack and still be able to get any work done. For what appears to be a growing trend, a lot of developers have taken the best bits from SOAP and WSDL and combined them in what is commonly referred to as POX or REST+POX. Basically this is Plain Old Xml over HTTP and REST-like urls. In this case a lot of the cruft inside a WSDL can be reduced to a simple XSD and a url. The interesting part about POX is that although there seems to be no formal spec published, a lot of accomplished web service developers have ultimately ended up at the same solution. The advantages this has over SOAP are numerous many of which are the same reasons that have made HTTP+XML ubiquitous. It is a lot simpler, smaller and faster at both development and runtime performance - while at the same time retaining a strongly-typed API (which is one of the major benefits of SOAP). Even though it's lacking a formal API, it can be argued that POX is still more interoperable than SOAP as clients no longer require a SOAP client to consume the web service and can access it simply with a standard Web Client and XML parser present in most programming environments, even most browsers.
+
+## And then there was JSON
+One of the major complaints of XML is that it's too verbose, which given a large enough dataset consumes a lot of bandwidth. It is also a lot stricter than a lot of people would like and given the potential for an XML document to be composed from many different namespaces and for a type to have both elements and attributes - it is not an ideal fit for most programming models. As a result of this, parsing XML can be quite cumbersome especially inside of a browser. A popular format which is seeking to overcome both of these problems and is now the preferred serialization format for AJAX applications is JSON. It is very simple to parse and maps perfectly to a Java Script object, it is also safe format which is the reason why it's chosen over pure Java Script. It's also a more 'dynamic' and resilient format than XML meaning that adding new or renaming existing elements or their types will not break the de-serialization routine as there is no formal spec to adhere to which is both and advantage and disadvantage. Unfortunately even though it's a smaller, more simple format it is actually deceptively slower to de/serialize than XML using the available .NET libraries based on the available benchmarks. This performance gap is more likely due to the amount of effort Microsoft has put into their XML DataContractSerializer than a deficiency of the format itself as my effort of developing a JSON-like serialization format is both smaller than JSON and faster than XML - the best of both worlds.
+
+## Service Stack's new JSV Format
+The latest endpoint to be added to Service Stack, is JSV the serialization format of Service Stack's POCO TypeSerializer. It's a JSON inspired format that uses CSV-style escaping for the least overhead and optimal performance.
+
+With the interest of creating high-performance web services and not satisfied with the performance or size of existing XML and JSON serialization formats, TypeSerializer was created with a core goal to create the most compact and fastest text-serializer for .NET. In this mission, it has succeeded as it is now both 5.3x quicker than the leading .NET JSON serializer whilst being 2.6x smaller than the equivalent XML format.
+
+TypeSerializer was developed from experience taking the best features of serialization formats it looks to replace. It has many other features that sets it apart from existing formats which makes it the best choice for serializing any .NET POCO object.
+
+ * Fastest and most compact text-serializer for .NET
+ * Human readable and writeable, self-describing text format
+ * Non-invasive and configuration-free
+ * Resilient to schema changes (focused on deserializing as much as possible without error)
+ * Serializes / De-serializes any .NET data type (by convention)
+ * Supports custom, compact serialization of structs by overriding `ToString()` and `static T Parse(string)` methods
+ * Can serialize inherited, interface or 'late-bound objects' data types
+ * Respects opt-in `DataMember` custom serialization for `DataContract` DTO types.
+
+For these reasons it is the preferred choice to transparently store complex POCO types for OrmLite (in text blobs), POCO objects with
+[Service Stack's C# Redis Client](https://github.com/mythz/ServiceStack.Redis) or the optimal serialization format in .NET to .NET web services.
View
164 src/Docs/framework/json-report-format.md
@@ -1,83 +1,83 @@
-#New JavaScript HTML5 Report Format
-
-##New HTML5 + JSON Report Format - [Released in 1.82](~/framework/release-notes)
-
-These examples are simply links to existing ServiceStack web services, which based on your browsers user-agent (i.e. Accept: 'text/html') provides this HTML format instead of the other serialization formats.
-
- - **Nortwind Database: ** [All Customers](http://servicestack.net/ServiceStack.Northwind/customers), [Customer Detail](http://servicestack.net/ServiceStack.Northwind/customers/ALFKI), [Customer Orders](http://servicestack.net/ServiceStack.Northwind/orders)
- - **RedisStackOverflow: ** [Latest Questions](http://servicestack.net/RedisStackOverflow/questions) and [Site Stats](http://servicestack.net/RedisStackOverflow/stats)
- - **RestMovies: ** [All Movie listings](http://servicestack.net/ServiceStack.MovieRest/movies)
- - **RestFiles: ** [Root Directory](http://servicestack.net/RestFiles/files)
-
-[![HTML5 Report Format](http://servicestack.net/img/HTML5Format.png)](http://servicestack.net/ServiceStack.Northwind/customers/ALFKI)
-
-To see it in action, **view the source** in your browser. Webkit and Firefox users can simply go to the url below:
-
- view-source:http://servicestack.net/ServiceStack.Northwind/customers/ALFKI
-
-Note: To view the web services in a different format simply append **?format=[json|xml|html|csv|jsv]** to the query string.
-
-
-The primary focus for the HTML Format is to provide a readable and semantic HTML layout letting you visualize all the data returned by your web service with a single glance.
-Features include:
-
-### Human Friendly output
-Based on convention, it generates a recursive and cascading view of your data using a combination of different sized definition lists and tables where appropriate.
-After it's rendered convenience behaviour is applied allowing you to sort your tabular data, view the embedded JSON contents as well as providing links back to the original web service that generated the report including links to the other formats supported.
-
-### Completely self-contained
-The report does not have any external CSS, JavaScript or Images which also helps achieve its super-fast load-time and rendering speed.
-
-### Embeds the complete snapshot of your web services data
-The report embeds a complete, unaltered version of your 'JSON webservice' capturing a snapshot of the state of your data at a given point in time.
-It's perfect for backups with the same document containing a human and programatic access to the data.
-The JSON data is embedded inside a valid and well-formed document, making it programatically accessible using a standard XML/HTML parser.
-The report also includes an interface to allow humans to copy it from a textbox.
-
-### It's Fast
-Like the other web services, the HTML format is just a raw C# IHttpHandler using
-[.NET's fastest JSON Serializer](http://www.servicestack.net/mythz_blog/?p=344)
-to serialize the response DTO to a JSON string which is embedded inside a **static HTML string template**.
-No other .aspx page or MVC web framework is used to get in the way to slow things down.
-High performance JavaScript techniques are also used to start generating the report at the earliest possible time.
-
-### Well supported in all modern browsers
-It's tested and works equally well on the latest versions of Chrome, Firefox, Safari, Opera and IE9.
-[v1.83](https://github.com/ServiceStack/ServiceStack/downloads) Now works in IE8 but needs internet connection to download json2.js. (not tested in <=IE7)
-
-### It Validates (as reported by validator.w3.org)
-This shouldn't be important but as the technique of using JavaScript to generate the entire report is likely to ire the semantic HTML police, I thought I'd make this point. Personally I believe this style of report is more useful since it caters for both human and scripted clients.
-
-# How it works - 'view-source' reveals all :)
-
-This is a new type of HTML5 report that breaks the normal conventional techniques of generating a HTML page.
-Instead of using a server programming and template language to generate the HTML on the server, the data is simply embedded as JSON, unaltered inside the tag:
-
- <script id="dto" type="text/json">{jsondto}</script>
-
-Because of the browser behaviour of the script tag, you can embed any markup or javascript unescaped.
-Unless it has none or a 'javascript' type attribute, the browser doesn't execute it letting you to access the contents with:
-
- document.getElementById('dto').innerHTML
-
-From there, javascript invoked just before the closing body tag (i.e. the fastest time to run DOM-altering javascript) which takes the data,
-builds up a html string and injects the generated markup in the contents of the page.
-
-After the report is rendered, and because JavaScript can :) UX-friendly behaviours are applied to the document allowing the user to sort the table data on each column as well as providing an easy way to take a copy of the JSON datasource.
-
-For what it does, the JavaScript is very terse considering no JavaScript framework was used. In most cases the JSON payload is a lot larger than the entire JavaScript used to render the report :)
-
-### Advantages of a strong-typed, code-first web service framework
-
-Although hard to believe, most of the above web service examples were developed before ServiceStack's CSV and HTML format existed.
-No code-changes were required in order to take advantage of the new formats, they were automatically available after replacing the ServiceStack.dlls with the latest version (v1.81+)
-
-Being able to generically provide new features like this shows the advantage of ServiceStack's strong-typed, code-first approach to developing web services that lets you focus on your app-specific logic as you only need to return C#/.NET objects or throw C#/.NET exceptions which gets automatically handled, and hosted on a number of different endpoints in a variety of different formats.
-
-Out of the box REST, RPC and SOAP endpoints types are automatically provided, in JSON, XML, CSV, JSV and now the new HTML report format above.
-
-Follow [@demisbellot](http://twitter.com/demisbellot) and [@ServiceStack](http://twitter.com/ServiceStack) for twitter updates
-
-
-
+#New JavaScript HTML5 Report Format
+
+##New HTML5 + JSON Report Format - [Released in 1.82](~/framework/release-notes)
+
+These examples are simply links to existing ServiceStack web services, which based on your browsers user-agent (i.e. Accept: 'text/html') provides this HTML format instead of the other serialization formats.
+
+ - **Northwind Database: ** [All Customers](http://servicestack.net/ServiceStack.Northwind/customers), [Customer Detail](http://servicestack.net/ServiceStack.Northwind/customers/ALFKI), [Customer Orders](http://servicestack.net/ServiceStack.Northwind/orders)
+ - **RedisStackOverflow: ** [Latest Questions](http://servicestack.net/RedisStackOverflow/questions) and [Site Stats](http://servicestack.net/RedisStackOverflow/stats)
+ - **RestMovies: ** [All Movie listings](http://servicestack.net/ServiceStack.MovieRest/movies)
+ - **RestFiles: ** [Root Directory](http://servicestack.net/RestFiles/files)
+
+[![HTML5 Report Format](http://servicestack.net/img/HTML5Format.png)](http://servicestack.net/ServiceStack.Northwind/customers/ALFKI)
+
+To see it in action, **view the source** in your browser. Webkit and Firefox users can simply go to the url below:
+
+ view-source:http://servicestack.net/ServiceStack.Northwind/customers/ALFKI
+
+Note: To view the web services in a different format simply append **?format=[json|xml|html|csv|jsv]** to the query string.
+
+
+The primary focus for the HTML Format is to provide a readable and semantic HTML layout letting you visualize all the data returned by your web service with a single glance.
+Features include:
+
+### Human Friendly output
+Based on convention, it generates a recursive and cascading view of your data using a combination of different sized definition lists and tables where appropriate.
+After it's rendered convenience behavior is applied allowing you to sort your tabular data, view the embedded JSON contents as well as providing links back to the original web service that generated the report including links to the other formats supported.
+
+### Completely self-contained
+The report does not have any external CSS, JavaScript or Images which also helps achieve its super-fast load-time and rendering speed.
+
+### Embeds the complete snapshot of your web services data
+The report embeds a complete, unaltered version of your 'JSON web service' capturing a snapshot of the state of your data at a given point in time.
+It's perfect for backups with the same document containing a human and programmatic access to the data.
+The JSON data is embedded inside a valid and well-formed document, making it programmatically accessible using a standard XML/HTML parser.
+The report also includes an interface to allow humans to copy it from a textbox.
+
+### It's Fast
+Like the other web services, the HTML format is just a raw C# IHttpHandler using
+[.NET's fastest JSON Serializer](http://www.servicestack.net/mythz_blog/?p=344)
+to serialize the response DTO to a JSON string which is embedded inside a **static HTML string template**.
+No other .aspx page or MVC web framework is used to get in the way to slow things down.
+High performance JavaScript techniques are also used to start generating the report at the earliest possible time.
+
+### Well supported in all modern browsers
+It's tested and works equally well on the latest versions of Chrome, Firefox, Safari, Opera and IE9.
+[v1.83](https://github.com/ServiceStack/ServiceStack/downloads) Now works in IE8 but needs internet connection to download json2.js. (not tested in <=IE7)
+
+### It Validates (as reported by validator.w3.org)
+This shouldn't be important but as the technique of using JavaScript to generate the entire report is likely to ire the semantic HTML police, I thought I'd make this point. Personally I believe this style of report is more useful since it caters for both human and scripted clients.
+
+# How it works - 'view-source' reveals all :)
+
+This is a new type of HTML5 report that breaks the normal conventional techniques of generating a HTML page.
+Instead of using a server programming and template language to generate the HTML on the server, the data is simply embedded as JSON, unaltered inside the tag:
+
+ <script id="dto" type="text/json">{jsondto}</script>
+
+Because of the browser behavior of the script tag, you can embed any markup or javascript unescaped.
+Unless it has none or a 'javascript' type attribute, the browser doesn't execute it letting you to access the contents with:
+
+ document.getElementById('dto').innerHTML
+
+From there, javascript invoked just before the closing body tag (i.e. the fastest time to run DOM-altering javascript) which takes the data,
+builds up a html string and injects the generated markup in the contents of the page.
+
+After the report is rendered, and because JavaScript can :) UX-friendly behaviors are applied to the document allowing the user to sort the table data on each column as well as providing an easy way to take a copy of the JSON data source.
+
+For what it does, the JavaScript is very terse considering no JavaScript framework was used. In most cases the JSON payload is a lot larger than the entire JavaScript used to render the report :)
+
+### Advantages of a strong-typed, code-first web service framework
+
+Although hard to believe, most of the above web service examples were developed before ServiceStack's CSV and HTML format existed.
+No code-changes were required in order to take advantage of the new formats, they were automatically available after replacing the ServiceStack.dlls with the latest version (v1.81+)
+
+Being able to generically provide new features like this shows the advantage of ServiceStack's strong-typed, code-first approach to developing web services that lets you focus on your app-specific logic as you only need to return C#/.NET objects or throw C#/.NET exceptions which gets automatically handled, and hosted on a number of different endpoints in a variety of different formats.
+
+Out of the box REST, RPC and SOAP endpoints types are automatically provided, in JSON, XML, CSV, JSV and now the new HTML report format above.
+
+Follow [@demisbellot](http://twitter.com/demisbellot) and [@ServiceStack](http://twitter.com/ServiceStack) for twitter updates
+
+
+
[<Wiki Home](~/framework/home)
View
134 src/Docs/framework/nuget.md
@@ -1,67 +1,67 @@
-# Install ServiceStack Web Service Framework via NuGet
-
-To make it easier for developers to get started we're now maintaining NuGet packages for ServiceStack and its components.
-
-So if you have [NuGet](http://nuget.org) installed, the easiest way to get started is to create a new ASP.NET Web Application and install the **ServiceStack** package:
-
-![Install-Pacakage ServiceStack](http://servicestack.net/img/nuget-servicestack.png)
-
-This automates the following manual steps:
-
-* Add the ServiceStack dlls to your standard VS.NET ASP.NET Web Application
-* Register the ServiceStack handler in your Web.Config
-* Configure your AppHost
-* Create a **[Hello](http://servicestack.net/ServiceStack.Hello/)** web service
-* Create a **[TODO](http://servicestack.net/Backbone.Todos/)** REST-ful web service
-
-Although we believe this to be a popular starting point, it is not the only one as we have examples of Windows Services, Stand-alone Console Hosts, Hosting together with an existing web framework at a Custom Path - Templates available in the **/StarterTemplates** folder in the [ServiceStack.Examples project](https://github.com/ServiceStack/ServiceStack.Examples/downloads).
-
-## NuGet ServiceStack.Text
-
-Downloadable separately from ServiceStack itself is it's string powers. Inside [ServiceStack.Text](~/text-serializers/json-csv-jsv-serializers) are some of .NET's fastest Text Serializers:
-
-* [JsonSerializer](http://www.servicestack.net/mythz_blog/?p=344)
-* [TypeSerializer (JSV-Format)](~/text-serializers/jsv-format)
-* CsvSerializer
-* [T.Dump extension method](http://www.servicestack.net/mythz_blog/?p=202)
-* StringExtensions - Xml/Json/Csv/Url encoding, BaseConvert, Rot13, Hex escape, etc.
-* Stream, Reflection, List, DateTime, etc extensions and utils
-
-![Install-Pacakage ServiceStack.Text](http://servicestack.net/img/nuget-servicestack.text.png)
-
-## NuGet ServiceStack.Redis
-
-With a hope to introduce more .NET developers to the high-performance and productive NoSQL worlds, we also include a full-featured [C# Redis client](~/redis-client/redis-client) allowing you to build [complete apps with it](http://servicestack.net/RedisStackOverflow/). [Redis](http://redis.io/) is the fastest NoSQL database in the world that is capable of achieving [about 110000 SETs and 81000 GETs per second](http://redis.io/topics/benchmarks).
-
-The C# Redis Client features:
-
-* High-level [Redis](~/redis-client/iredisclient-api), [RedisTypedClient](~/redis-client/iredistypedclient-api) as well as [RedisNativeClient](~/redis-client/iredisnativeclient-api) for raw byte access.
-* Thread-safe Basic and Pooled Redis clients managers
-* [Creating Transactions and custom Atomic Operations](~/redis-client/redis-transactions)
-* [Fast, efficient distributed locking with Redis](https://github.com/ServiceStack/ServiceStack.Redis/wiki/RedisLocks)
-* [Publish/Subscribe messaging patterns](~/redis-client/redis-pubsub)
-
-For .NET developers new to Redis, we invite you to check out the following tutorials:
-
-* [Designing a NoSQL Database using Redis](~/redis-client/designing-nosql-database)
-* [Painless data migrations with schema-less NoSQL datastores](~/redis-client/schemaless-nosql-migrations)
-
-![Install-Pacakage ServiceStack.Redis](http://servicestack.net/img/nuget-servicestack.redis.png)
-
-## NuGet ServiceStack.OrmLite
-
-When you're developing small to medium systems and you don't need the features of an advanced heavy-weight ORM, you're sometimes better off with a fast, light-weight POCO ORM. OrmLite fills this niche, where it's just a set of lightweight extension methods on .NET's ADO.NET System.Data interfaces that non-invasively works off POCO's.
-
-It's primary feature over other ORMs is its auto-support for blobs where any complex property is automatically persisted in a schema-less text blob using ServiceStack.Text's fast TypeSerializer. This allows you to persist most web service requests and responses directly into an RDBMS as-is without the tedious tasks of configuring tables, ORM and mapping files.
-
-Currently OrmLite comes in SQLite and SQL Server RDBMS's flavours and each are downloadable separately via NuGet:
-
-![Install-Pacakage ServiceStack.OrmLite.SqlServer](http://servicestack.net/img/nuget-servicestack.ormlite.sqlserver.png)
-
-For Sqlite 32 and 64bit embedded .NET libraries are available:
-
-![Install-Pacakage ServiceStack.OrmLite.Sqlite32](http://servicestack.net/img/nuget-servicestack.ormlite.sqlite32.png)
-
-![Install-Pacakage ServiceStack.OrmLite.Sqlite64](http://servicestack.net/img/nuget-servicestack.ormlite.sqlite64.png)
-
-
+# Install ServiceStack Web Service Framework via NuGet
+
+To make it easier for developers to get started we're now maintaining NuGet packages for ServiceStack and its components.
+
+So if you have [NuGet](http://nuget.org) installed, the easiest way to get started is to create a new ASP.NET Web Application and install the **ServiceStack** package:
+
+![Install-Package ServiceStack](http://servicestack.net/img/nuget-servicestack.png)
+
+This automates the following manual steps:
+
+* Add the ServiceStack dlls to your standard VS.NET ASP.NET Web Application
+* Register the ServiceStack handler in your Web.Config
+* Configure your AppHost
+* Create a **[Hello](http://servicestack.net/ServiceStack.Hello/)** web service
+* Create a **[TODO](http://servicestack.net/Backbone.Todos/)** RESTful web service
+
+Although we believe this to be a popular starting point, it is not the only one as we have examples of Windows Services, Stand-alone Console Hosts, Hosting together with an existing web framework at a Custom Path - Templates available in the **/StarterTemplates** folder in the [ServiceStack.Examples project](https://github.com/ServiceStack/ServiceStack.Examples/downloads).
+
+## NuGet ServiceStack.Text
+
+Downloadable separately from ServiceStack itself is it's string powers. Inside [ServiceStack.Text](~/text-serializers/json-csv-jsv-serializers) are some of .NET's fastest Text Serializers:
+
+* [JsonSerializer](http://www.servicestack.net/mythz_blog/?p=344)
+* [TypeSerializer (JSV-Format)](~/text-serializers/jsv-format)
+* CsvSerializer
+* [T.Dump extension method](http://www.servicestack.net/mythz_blog/?p=202)
+* StringExtensions - Xml/Json/Csv/Url encoding, BaseConvert, Rot13, Hex escape, etc.
+* Stream, Reflection, List, DateTime, etc extensions and utils
+
+![Install-Package ServiceStack.Text](http://servicestack.net/img/nuget-servicestack.text.png)
+
+## NuGet ServiceStack.Redis
+
+With a hope to introduce more .NET developers to the high-performance and productive NoSQL worlds, we also include a full-featured [C# Redis client](~/redis-client/redis-client) allowing you to build [complete apps with it](http://servicestack.net/RedisStackOverflow/). [Redis](http://redis.io/) is the fastest NoSQL database in the world that is capable of achieving [about 110000 SETs and 81000 GETs per second](http://redis.io/topics/benchmarks).
+
+The C# Redis Client features:
+
+* High-level [Redis](~/redis-client/iredisclient-api), [RedisTypedClient](~/redis-client/iredistypedclient-api) as well as [RedisNativeClient](~/redis-client/iredisnativeclient-api) for raw byte access.
+* Thread-safe Basic and Pooled Redis clients managers
+* [Creating Transactions and custom Atomic Operations](~/redis-client/redis-transactions)
+* [Fast, efficient distributed locking with Redis](https://github.com/ServiceStack/ServiceStack.Redis/wiki/RedisLocks)
+* [Publish/Subscribe messaging patterns](~/redis-client/redis-pubsub)
+
+For .NET developers new to Redis, we invite you to check out the following tutorials:
+
+* [Designing a NoSQL Database using Redis](~/redis-client/designing-nosql-database)
+* [Painless data migrations with schema-less NoSQL datastores](~/redis-client/schemaless-nosql-migrations)
+
+![Install-Package ServiceStack.Redis](http://servicestack.net/img/nuget-servicestack.redis.png)
+
+## NuGet ServiceStack.OrmLite
+
+When you're developing small to medium systems and you don't need the features of an advanced heavy-weight ORM, you're sometimes better off with a fast, light-weight POCO ORM. OrmLite fills this niche, where it's just a set of lightweight extension methods on .NET's ADO.NET System.Data interfaces that non-invasively works off POCO's.
+
+It's primary feature over other ORMs is its auto-support for blobs where any complex property is automatically persisted in a schema-less text blob using ServiceStack.Text's fast TypeSerializer. This allows you to persist most web service requests and responses directly into an RDBMS as-is without the tedious tasks of configuring tables, ORM and mapping files.
+
+Currently OrmLite comes in SQLite and SQL Server RDBMS's flavors and each are downloadable separately via NuGet:
+
+![Install-Package ServiceStack.OrmLite.SqlServer](http://servicestack.net/img/nuget-servicestack.ormlite.sqlserver.png)
+
+For Sqlite 32 and 64bit embedded .NET libraries are available:
+
+![Install-Package ServiceStack.OrmLite.Sqlite32](http://servicestack.net/img/nuget-servicestack.ormlite.sqlite32.png)
+
+![Install-Package ServiceStack.OrmLite.Sqlite64](http://servicestack.net/img/nuget-servicestack.ormlite.sqlite64.png)
+
+
View
536 src/Docs/framework/overview.md
@@ -1,268 +1,268 @@
-[Join the new google group](http://groups.google.com/group/servicestack) or
-follow [@demisbellot](http://twitter.com/demisbellot) and [@ServiceStack](http://twitter.com/servicestack)
-for twitter updates.
-
-Service Stack is a high-performance .NET web services framework _(including a number of high-performance sub-components: see below)_
-that simplifies the development of XML, JSON, JSV and WCF SOAP [Web Services](~/framework/history-of-webservices).
-For more info check out [servicestack.net](http://www.servicestack.net).
-
-Simple REST service example
-===========================
-
- //Web Service Host Configuration
- public class AppHost : AppHostBase
- {
- public AppHost() : base("Backbone.js TODO", typeof(TodoService).Assembly) {}
-
- public override void Configure(Funq.Container container)
- {
- //Register Web Service dependencies
- container.Register(new TodoRepository());
-
- //Register user-defined REST-ful routes
- Routes
- .Add<Todo>("/todos")
- .Add<Todo>("/todos/{Id}");
- }
- }
-
-
- //REST Resource DTO
- public class Todo
- {
- public long Id { get; set; }
- public string Content { get; set; }
- public int Order { get; set; }
- public bool Done { get; set; }
- }
-
- //Todo REST Service implementation
- public class TodoService : RestServiceBase<Todo>
- {
- public TodoRepository Repository { get; set; } //Injected by IOC
-
- public override object OnGet(Todo request)
- {
- if (request.Id != default(long))
- return Repository.GetById(request.Id);
-
- return Repository.GetAll();
- }
-
- //Called for both new and updated TODOs
- public override object OnPost(Todo todo)
- {
- return Repository.Store(todo);
- }
-
- public override object OnDelete(Todo request)
- {
- Repository.DeleteById(request.Id);
- return null;
- }
- }
-
-
-### Calling the above TODO REST service from any C#/.NET Client
- //no code-gen required, can re-use above DTO's
-
- var restClient = new JsonServiceClient("http://localhost/Backbone.Todo");
- var all = restClient.Get<List<Todo>>("/todos"); // Count = 0
-
- var todo = restClient.Post<Todo>("/todos", new Todo { Content = "New TODO", Order = 1 }); //todo.Id = 1
- all = restClient.Get<List<Todo>>("/todos"); // Count = 1
-
- todo.Content = "Updated TODO";
- todo = restClient.Post<Todo>("/todos", todo); // todo.Content = Updated TODO
-
- restClient.Delete<Todo>("/todos/" + todo.Id);
- all = restClient.Get<List<Todo>>("/todos"); // Count = 0
-
-
-### Calling the TODO REST service from jQuery
-
- $.getJSON("http://localhost/Backbone.Todo/todos", function(todos) {
- alert(todos.length == 1);
- });
-
-
-That's all the application code required to create a simple REST web service.
-
-##Live Demo of Backbone TODO app (running on Linux/MONO):
-
-**[http://www.servicestack.net/Backbone.Todos/](http://www.servicestack.net/Backbone.Todos/)**
-
-Preview links using just the above code sample with (live demo running on Linux):
-
-ServiceStack's strong-typed nature allows it to infer a greater intelligence of your web services and is able to provide a
-host of functionality for free, out of the box without any configuration required:
-
- * Host on different formats and endpoints: [XML](http://www.servicestack.net/Backbone.Todos/todos?format=xml),
- [JSON](http://www.servicestack.net/Backbone.Todos/todos?format=json), [JSV](http://www.servicestack.net/Backbone.Todos/todos?format=jsv),
- [CSV](http://www.servicestack.net/Backbone.Todos/todos?format=csv)
-
- * [A HTML5 Report format to view your webservics data in a human-friendly view](http://www.servicestack.net/Backbone.Todos/todos?format=html)
-
- * [An auto generated api metadata page, with links to your web service XSD's and WSDL's](http://www.servicestack.net/Backbone.Todos/metadata)
-
-
-
-Download
-========
-
-To start developing web services with Service Stack we recommend starting with the ServiceStack.Examples project (includes ServiceStack.dlls):
-
- * **[ServiceStack.Examples/downloads/](https://github.com/ServiceStack/ServiceStack.Examples/downloads)**
-
-If you already have ServiceStack and just want to download the latest release binaries get them at:
-
- * **[ServiceStack/downloads/](https://github.com/ServiceStack/ServiceStack/downloads)**
-
-Alternatively if you want keep up with the latest version you can always use the power of Git :)
-
- git clone git://github.com/ServiceStack/ServiceStack.git
-
-[Release notes for major releases](~/framework/release-notes)
-
-## Getting Started
-Online tutorials that walks you through developing and calling web services is available here:
-
- * **[Read the documentation on the ServiceStack Wiki](~/framework/home)**
- * [Creating a Hello World Web service](http://www.servicestack.net/ServiceStack.Hello/)
- * [Calling Web Services from MonoTouch](http://www.servicestack.net/monotouch/remote-info/)
-
-
-# Features of a modern web services framework
-
- Developed in the modern age, Service Stack provides an alternate, cleaner POCO-driven way of creating web services, featuring:
-
-### A DRY, strongly-typed 'pure model' REST Web Services Framework
-Unlike other web services frameworks ServiceStack let's you develop web services using strongly-typed models and DTO's.
-This lets ServiceStack and other tools to have a greater intelligence about your services allowing:
-
-- [Multiple serialization formats (JSON, XML, JSV and SOAP with extensible plugin model for more)](http://servicestack.net/ServiceStack.Hello/servicestack/metadata)
-- [A single re-usable C# Generic Client (In JSON, JSV, XML and SOAP flavours) that can talk to all your services.](https://github.com/ServiceStack/ServiceStack.Extras/blob/master/doc/UsageExamples/UsingServiceClients.cs)
-- [Re-use your Web Service DTOs (i.e. no code-gen) on your client applications so you're never out-of-sync](https://github.com/ServiceStack/ServiceStack.Extras/blob/master/doc/UsageExamples/UsingServiceClients.cs)
-- [Automatic serialization of Exceptions in your DTOs ResponseStatus](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceInterface/ServiceBase.cs#L154)
-- [The possibility of a base class for all your services to put high-level application logic (i.e security, logging, etc)](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceInterface/ServiceBase.cs#L24)
-- [Highly testable, your in-memory unit tests for your service can also be used as integration tests](https://github.com/ServiceStack/ServiceStack/blob/master/tests/ServiceStack.WebHost.IntegrationTests/Tests/WebServicesTests.cs)
-- [Built-in rolling web service error logging (if Redis is Configured in your AppHost)](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.ServiceInterface/ServiceBase.cs#L122)
-- [Rich REST and HTML support on all web services with x-www-form-urlencoded & multipart/form-data (i.e. FORM posts and file uploads)](http://servicestack.net/ServiceStack.Hello/)
-
-## Define web services following Martin Fowlers Data Transfer Object Pattern:
-
-Service Stack was heavily influenced by [**Martin Fowlers Data Transfer Object Pattern**](http://martinfowler.com/eaaCatalog/dataTransferObject.html):
-
->When you're working with a remote interface, such as Remote Facade (388), each call to it is expensive.
->As a result you need to reduce the number of calls, and that means that you need to transfer more data
->with each call. One way to do this is to use lots of parameters.
->However, this is often awkward to program - indeed, it's often impossible with languages such as Java
->that return only a single value.
->
->The solution is to create a Data Transfer Object that can hold all the data for the call. It needs to be serializable to go across the connection.
->Usually an assembler is used on the server side to transfer data between the DTO and any domain objects.
-
-The Request and Response DTO's used to define web services in ServiceStack are standard `DataContract` POCO's while the implementation just needs to inherit from a testable and dependency-free `IService<TRequestDto>`. As a bonus for keeping your DTO's in a separate dependency-free .dll, you're able to re-use them in your C#/.NET clients providing a strongly-typed API without any code-gen what-so-ever. Also your DTO's *define everything* Service Stack does not pollute your web services with any additional custom artefacts or markup.
-
-Service Stack re-uses the custom artefacts above and with zero-config and without imposing any extra burden on the developer adds discover-ability and provides hosting of your web service on a number of different physical end-points which as of today includes: XML (+REST), JSON (+REST), JSV (+REST) and SOAP 1.1 / SOAP 1.2.
-
-### WCF the anti-DTO Web Services Framework
-Unfortunately this best-practices convention is effectively discouraged by Microsoft's WCF SOAP Web Services framework as they encourage you to develop API-specific RPC method calls by mandating the use method signatures to define your web services API. This results in less re-usable, more client-sepcfic APIs that encourages more remote method calls.
-
-Unhappy with this perceived anit-pattern in WCF, ServiceStack was born providing a Web Sevice framework that embraces best-practices for calling remote services, using config-free, convention-based DTO's.
-
-
-### Full support for unit and integration tests
-Your application logic should not be tied to a third party vendor's web service host platform.
-In Service Stack they're not, your web service implementations are host and end-point ignorant, dependency-free and can be unit-tested independently of ASP.NET, Service Stack or its IOC.
-
-Without any code changes unit tests written can be re-used and run as integration tests simply by switching the IServiceClient used to point to a configured end-point host.
-
-### Built-in Funq IOC container
-Configured to auto-wire all of your web services with your registered dependencies.
-[Funq](http://funq.codeplex.com) was chosen for it's [high-performance](http://www.codeproject.com/Articles/43296/Introduction-to-Munq-IOC-Container-for-ASP-NET.aspx), low footprint and intuitive full-featured minimalistic API.
-
-### Encourages development of message-style, re-usable and batch-full web services
-Entire POCO types are used to define the request and response DTO's to promote the creation well-defined coarse-grained web services. Message-based interfaces are best-practices when dealing with out-of-process calls as they are can batch more work using less network calls and are ultimately more re-usable as the same operation can be called using different calling semantics. This is in stark contrast to WCF's Operation or Service contracts which encourage RPC-style, application-specific web services by using method signatures to define each operation.
-
-As it stands in general-purpose computing today, there is nothing more expensive you can do than a remote network call. Although easier for the newbie developer, by using _methods_ to define web service operations, WCF is promoting bad-practices by encouraging them to design and treat web-service calls like normal function calls even though they are millions of times slower. Especially at the app-server tier, nothing hurts performance and scalability of your client and server than multiple dependent and synchronous web service calls.
-
-Batch-full, message-based web services are ideally suited in development of SOA services as they result in fewer, richer and more re-usable web services that need to be maintained. RPC-style services normally manifest themselves from a *client perspective* that is the result of the requirements of a single applications data access scenario. Single applications come and go over time while your data and services are poised to hang around for the longer term. Ideally you want to think about the definition of your web service from a *services and data perspective* and how you can expose your data so it is more re-usable by a number of your clients.
-
-### Cross Platform Web Services Framework
-With Mono on Linux now reaching full-maturity, Service Stack runs on .NET or Linux with Mono and can either be hosted inside an ASP.NET Web Application, Windows service or Console application running in or independently of a Web Server.
-
-### Low Coupling for maximum accessibility and testability
-No coupling between the transport's endpoint and your web service's payload. You can re-use your existing strongly-typed web service DTO's with any .NET client using the available Soap, Xml and Json Service Clients - giving you a strongly-typed API while at the same time avoiding the need for any generated code.
-
- * The most popular web service endpoints are configured by default. With no extra effort, each new web service created is immediately available and [discoverable](http://www.servicestack.net/ServiceStack.Examples.Host.Web/ServiceStack/Metadata) on the following end points:
- * [XML (+REST)](http://www.servicestack.net/ServiceStack.Examples.Host.Web/ServiceStack/Xml/Metadata?op=GetFactorial)
- * [JSON (+REST)](http://www.servicestack.net/ServiceStack.Examples.Host.Web/ServiceStack/Json/Metadata?op=GetFactorial)
- * [JSV (+REST)](http://www.servicestack.net/ServiceStack.Examples.Host.Web/ServiceStack/Jsv/Metadata?op=GetFactorial)
- * [SOAP 1.1](http://www.servicestack.net/ServiceStack.Hello/servicestack/soap11)
- * [SOAP 1.2](http://www.servicestack.net/ServiceStack.Hello/servicestack/soap12)
- * View the [Service Stack endpoints page](~/framework/history-of-webservices) for our recommendations on which endpoint to use and when.
-
-# High Performance Sub Projects
-Also included in ServiceStack are libraries that are useful in the development of high performance web services:
-
- * [ServiceStack.Text](~/text-serializers/json-csv-jsv-serializers) - The home of ServiceStack's JSON and JSV text serializers, the fastest text serializers for .NET
- * [JsonSerializer](http://www.servicestack.net/mythz_blog/?p=344) - The fastest JSON Serializer for .NET. Over 3 times faster than other .NET JSON serialisers.
- * [TypeSerializer](~/text-serializers/json-csv-jsv-serializers) - The JSV-format, a fast, compact text serializer that is very resilient to schema changes and is:
- * 3.5x quicker and 2.6x smaller than the .NET XML DataContractSerializer and
- * 5.3x quicker and 1.3x smaller than the .NET JSON DataContractSerializer - _[view the detailed benchmarks](http://www.servicestack.net/benchmarks/NorthwindDatabaseRowsSerialization.1000000-times.2010-02-06.html)_
-
- * [ServiceStack.Redis](~/redis-client/redis-client) - An API complete C# [Redis](http://code.google.com/p/redis/) client with native support for persisting C# POCO objects.
- * You can download the latest [RedisWindowsDownload Windows build for the Redis Server here].
- * [Redis Admin UI](http://www.servicestack.net/mythz_blog/?p=381) - An Ajax GUI admin tool to help visualize your Redis data.
-
- * [OrmLite](~/ormlite/ormlite-overview) - A convention-based, configuration free lightweight ORM that uses attributes from DataAnnotations to infer the table schema. Currently supports both Sqlite and SqlServer.
-
- * [Caching](~/framework/caching-options) - A common interface for caching with providers for:
- * Memcached
- * In Memory Cache
- * Redis
-
-
-## Find out More
- * Twitter: to get updates of ServiceStack, follow [@demisbellot](http://twitter.com/demisbellot) or [@ServiceStack](http://twitter.com/ServiceStack) on twitter.
- * Email any questions to _demis.bellot@gmail.com_
-
-## Future Roadmap
-Service Stack is under continuous improvement and is always adding features that are useful for high-performance, scalable and resilient web service scenarios. This is the current road map but is open to change.
-If you have suggestions for new features or want to prioritize the existing ones below: [http://code.google.com/p/servicestack/issues/entry you can leave feedback here].
-
- * Add an opt-in durable Message Queue service processing of [AsyncOneWay] requests (with In Memory, Redis and RabbitMQ implementations)
- * Enable [ProtoBuf.NET](http://code.google.com/p/protobuf-net/), TypeSerializer and CSV (for tabular datasets) web service endpoints
- * Integrate the Spark View Engine and enable a HTML endpoint so web services can also return a HTML human-friendly view
- * New REST web service endpoint developed in the 'Spirit of REST' with partitioning of GET / POST / PUT / DELETE requests and utilizing 'Accept mimetype' HTTP request header to determine the resulting content type.
- * Code generated proxy classes for Objective-C, Java Script / Action Script (and Java or C++ if there's enough interest) clients.
- * Develop a completely managed HTTP Web Service Host (at the moment looking at building on top of [Kayak HTTP](http://kayakhttp.com))
- * Add support for 'Web Sockets' protocol
-
-## Similar open source projects
-Similar Open source .NET projects for developing or accessing web services include:
-
- * Open Rasta - REST-ful web service framwork:
- * [http://trac.caffeine-it.com/openrasta](http://trac.caffeine-it.com/openrasta)
-
- * Rest Sharp - an open source REST client for .NET
- * [http://restsharp.org](http://restsharp.org)
-
-
-## Troubleshooting
-
-For IIS 6.0-only web servers (i.e. without IIS 7 and compatibility-mode) IIS and ASP.NET requires mapping an extension in order to embed ServiceStack. You can use a default handled ASP.NET extension like *.ashx e.g.
-
- <add path="servicestack.ashx" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
-
-Which will change your urls will now look like:
-
- http://localhost/servicestack.ashx/xml/syncreply/Hello?Name=World
-
-
-
-***
-
-Runs on both Mono and .NET 3.5. _(Live preview hosted on Mono / CentOS)_
-
+[Join the new google group](http://groups.google.com/group/servicestack) or
+follow [@demisbellot](http://twitter.com/demisbellot) and [@ServiceStack](http://twitter.com/servicestack)
+for twitter updates.
+
+Service Stack is a high-performance .NET web services framework _(including a number of high-performance sub-components: see below)_
+that simplifies the development of XML, JSON, JSV and WCF SOAP [Web Services](~/framework/history-of-webservices).
+For more info check out [servicestack.net](http://www.servicestack.net).
+
+Simple REST service example
+===========================
+
+ //Web Service Host Configuration
+ public class AppHost : AppHostBase
+ {
+ public AppHost() : base("Backbone.js TODO", typeof(TodoService).Assembly) {}
+
+ public override void Configure(Funq.Container container)
+ {
+ //Register Web Service dependencies
+ container.Register(new TodoRepository());
+
+ //Register user-defined RESTful routes
+ Routes
+ .Add<Todo>("/todos")
+ .Add<Todo>("/todos/{Id}");
+ }
+ }
+
+
+ //REST Resource DTO
+ public class Todo
+ {
+ public long Id { get; set; }
+ public string Content { get; set; }
+ public int Order { get; set; }
+ public bool Done { get; set; }
+ }
+
+ //Todo REST Service implementation
+ public class TodoService : RestServiceBase<Todo>
+ {
+ public TodoRepository Repository { get; set; } //Injected by IOC
+
+ public override object OnGet(Todo request)
+ {
+ if (request.Id != default(long))
+ return Repository.GetById(request.Id);
+
+ return Repository.GetAll();
+ }
+
+ //Called for both new and updated TODOs
+ public override object OnPost(Todo todo)
+ {
+ return Repository.Store(todo);
+ }
+
+ public override object OnDelete(Todo request)
+ {
+ Repository.DeleteById(request.Id);
+ return null;
+ }
+ }
+
+
+### Calling the above TODO REST service from any C#/.NET Client
+ //no code-gen required, can re-use above DTO's
+
+ var restClient = new JsonServiceClient("http://localhost/Backbone.Todo");
+ var all = restClient.Get<List<Todo>>("/todos"); // Count = 0
+
+ var todo = restClient.Post<Todo>("/todos", new Todo { Content = "New TODO", Order = 1 }); //todo.Id = 1
+ all = restClient.Get<List<Todo>>("/todos"); // Count = 1
+
+ todo.Content = "Updated TODO";
+ todo = restClient.Post<Todo>("/todos", todo); // todo.Content = Updated TODO
+
+ restClient.Delete<Todo>("/todos/" + todo.Id);
+ all = restClient.Get<List<Todo>>("/todos"); // Count = 0
+
+
+### Calling the TODO REST service from jQuery
+
+ $.getJSON("http://localhost/Backbone.Todo/todos", function(todos) {
+ alert(todos.length == 1);
+ });
+
+
+That's all the application code required to create a simple REST web service.
+
+##Live Demo of Backbone TODO app (running on Linux/MONO):
+
+**[http://www.servicestack.net/Backbone.Todos/](http://www.servicestack.net/Backbone.Todos/)**
+
+Preview links using just the above code sample with (live demo running on Linux):
+
+ServiceStack's strong-typed nature allows it to infer a greater intelligence of your web services and is able to provide a
+host of functionality for free, out of the box without any configuration required:
+
+ * Host on different formats and endpoints: [XML](http://www.servicestack.net/Backbone.Todos/todos?format=xml),
+ [JSON](http://www.servicestack.net/Backbone.Todos/todos?format=json), [JSV](http://www.servicestack.net/Backbone.Todos/todos?format=jsv),
+ [CSV](http://www.servicestack.net/Backbone.Todos/todos?format=csv)
+
+ * [A HTML5 Report format to view your web services data in a human-friendly view](http://www.servicestack.net/Backbone.Todos/todos?format=html)
+
+ * [An auto generated api metadata page, with links to your web service XSD's and WSDL's](http://www.servicestack.net/Backbone.Todos/metadata)
+
+