I'd like to put together a forum/message board with ASP.NET MVC. Pretty common on these types of forums are hierarchical board categories, so for instance:
-General Discussion
-Technical Support
--Website Technical support
--Product Technical Support
---Product A Technical Support
---Product B Technical Support
Below each category are then topics and messages belong to those topics. What I'm primarily concerned with is 1.) getting to the correct place, given a URL, 2.) not including boatloads of unnecessary information in my URL, and 3.) being able to recreate a URL from code.
I'd like a URL to be something like this:
mysite.com/Forum/ - forum index mysite.com/Forum/General-Discussion/ - board index of "general discussion" mysite.com/Forum/Technical-Support/Product/Product-A/ - board index of "Product A Tech Support" mysite.com/Forum/Technical-Support/Website/Topic1004/ - Topic index of topic with ID 1004 in the "Website Technical Support" board mysite.com/Forum/Technical-Support/Website/Topic1004/3 - Page 3 of Topic with ID 1004
Now, I've excluded Action names from this because they can be inferred based on where I am. Each Board entity in my database has a "UrlPart" column, which is indexed, so I expect to be able to do relatively fast queries against that table to figure out where I am.
The question is: in order to figure out the correct place, should I use a custom route handler, a custom route binder, or should I just create obscure routing rules?
This suggestion looks pretty good but it also looks like a lot of work for little benefit: http://stackoverflow.com/questions/379558/mvcnet-routing#379823
This seems to indicate that creating a model binding would be easier: http://stackoverflow.com/questions/296284/mvc-dynamic-routes
To fulfill #3 I'm going to have to create my own custom URL generation logic, right?