This is a mirror of official site: http://jasper-net.blogspot.com/

Kayak

| Monday, March 1, 2010
Kayak is a lightweight HTTP server for the CLR, and the Kayak Framework is a utility for mapping HTTP requests to C# method invocations. With Kayak, you can skip the bulk, hassle, and overhead of IIS and ASP.NET. Kayak enables you to do more with less syntax, and is easy to configure to work in any way you care to dream up.

Kayak consists of two DLL libraries: a request framework, and the HTTP server on which it depends. Unlike IIS, the Kayak server does not load your code into its process space. You write your own entry point, instantiate a KayakServer  object, set it up however you want, and start it when you're ready. Usually, you'll set it up to handle requests using the Kayak Framework.

The framework simply maps HTTP requests to .NET method invocations. Arguments to a method invocation can be generated from the HTTP request, and the return value of the invocation can be used to generate the HTTP response. By default, the Kayak Framework converts .NET objects to and from JSON. It automatically deserializes JSON in the body of an incoming HTTP request and passes the deserialized .NET objects as arguments to invocations of your methods. When your function returns, Kayak then serializes the return value of the invocation as JSON to the body of the HTTP response. Kayak makes it very easy to create those simple HTTP APIs which are all-the-rage these days.

By the following principles of REST (excuse the buzzword; I don't like it either), you eliminate the need for many of the features that bloat tools like ASP.NET, MonoRail, and ASP.NET MVC, as well as Django and other popular frameworks for dynamic languages.

Read more: .NET Slackers

Posted via email from jasper22's posterous

0 comments: