I would like to put together a forum / message board with ASP.NET MVC. The hierarchical categories of boards are quite common on these types of forums, therefore, for example:
-General discussion
-Technical support
- Website Technical Support
- Product technical support
--- Product A Technical Support
--- Product Technical Support B
Below each category there are topics and posts related to these topics. What I primarily deal with: 1.) getting to the right place, taking into account the URL, 2.) not including the boat of unnecessary information in my URL and 3.) the ability to recreate the URL from the code.
I would like the 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 have excluded Action names from this, because they can be inferred based on where I am. Each Board member in my database has an UrlPart column that is indexed, so I expect I can make relatively quick queries on this table to find out where I am.
Question: in order to find out the right place, should I use my own route handler, a custom route mediator, or should I just create obscure routing rules?
This suggestion looks pretty good, but it also looks like a lot of work for a small gain: ASP.NET MVC custom routing for searching
This seems to indicate that creating a model binding would be simpler: Dynamic MVC routes
To execute # 3, I need to create my own URL generation logic, right?