I have a data model for a directory type structure that looks something like this:
Folder:
String Name
Folder Parent
List<File> Files
File
Folder Parent
Content
Files and folders at the root level would have a null parent. For navigating folders I would like to be able to have urls that look something like:
http://mysite.com/directoryA/directoryB/directoryC/
I realize this has a bit of redundancy, but I feel it has better readability, and makes a good deal of sense in this case. Using default routes, that same folder would look like:
http://mysite.com/Folder/directorycID
which does not read nearly as nice. Are there any existing patterns that can do this type of routing? The problem with using names instead of ID's is that I would have to trace the entire structure from the root, since names are only guaranteed unique within a parent directory. Is there a route type that can just give the controller a list of directories, and I can sort out the relationships in the controller? It would be a bit more work, but I could deal with that.