atomsite.net

The AtomPub server for .NET

Routing Updates

Posted in C#, BlogSvc, MVC by JarrettV on 1/23/2009 10:30:19 AM - CST

Routing I just checked in a large refactor on the routing system to allow for collection plug ins to register their own routes.  All routing implements the IRouteRegistrar interface that has a RegisterRoutes method.  The BaseRouteRegistrar abstract base class contains some useful implementation and logic that can be reused for plug-in routing.

AtomPubRouteRegistrar the implementation for all the default routes.  The default routes will always get registered after plug-in routes.  Remember, order is important because routing always takes the first match.

Each collection can plug-in their own routing with a constraint that will ensure the routes are only active for the collection/collections that registered the routes.

Also, I added some extensions on top of UrlHelper that calls the RouteService class which has support for SSL routes and absolute routes.  We lost automatic deep routes on threaded annotations. However, there's baked in support for "dated" entries.  We are using named routes so that makes it really easy to select which route you want when generating the URL.

Comments

None.

Add Comment

Login using
Google Yahoo flickr AOL
and more
Or provide your details
Please enter your name. Please enter a valid email. Please enter a valid website.
Please supply a comment.
5.0 (1)
on 3/15/2009 7:41:42 PM - CST

Recent Entries

© Copyright 2012 Powered by AtomSite 1.4.0.0