Why Superscribe? Superscribe is not your average routing framework.

Hierarchical Routes
Superscribe routes are defined hierarchically for ease of maintenance and efficient matching

Re-usable Definitions
Each route segment definition is strongly typed... reduce code duplication by composing and re-using them however you like

Flexible Approach
Like to have your routes defined near your handlers? Not a problem. Like to define routes centrally all in one place? That's fine.

No Limits
Execute arbitrary code as part of your routing pipeline to match routes, make choices or return responses using simple syntax... the possibilities are endless!
Getting Started How do you want to define your routes?
Superscribe Core
PM> Install-Package Superscribe
Owin
PM> Install-Package Superscribe.Owin
Web Api
PM> Install-Package Superscribe.WebApi
Web Api - Owin Hosted
PM> Install-Package Superscribe.WebApi.Owin
Web Api
Superscribe integrates seamlessly with Asp.Net Web Api, working nicely alongside any existing attribute or traditonal routes.
public static class WebApiConfig { public static void Register(HttpConfiguration config) { var define = SuperscribeConfig.Register(config); // or for module support use: .RegisterModules(config); define.Route("api" / Any.Controller / (Int)"id"); } }
Modules
Any classes in your app that derive from SuperscribeModule or SuperscribeOwinModule will be automatically picked up and wired into your routing.
// Web Api public class HelloWorldModule : SuperscribeModule { public HelloWorldModule() { this.Get["/"] = o => "Hello World!"; } } // Owin public class HelloWorldModule : SuperscribeOwinModule { public HelloWorldModule() { this.Get["/"] = o => "Hello Owin!"; } }
Owin Router
Let your routing decide which middleware to include in your Owin pipeline.
public class Startup { public void Configuration(IAppBuilder app) { var define = OwinRouteEngineFactory.Create(); app.UseSuperscribeRouter(define); // Set up a branch that will include auth middleware when going through /admin define.Pipeline("Api/Admin").Use<AuthMiddleware>(); // Set up a branch that will swap out repositories with in-memory versions for testing define.Pipeline("Api/Debug").Use<DebugDependencies>(); } }
Owin Handler
Bulky web frameworks just slowing you down? With Superscribe you can respond to simple requests without one.
public class Startup { public void Configuration(IAppBuilder app) { var define = OwinRouteEngineFactory.Create(); app.UseSuperscribeRouter(define) .UseSuperscribeHandler(define); define.Get("Hello/World", o => "Hello World"); } }