asp.net mvc - Using MVC2 as RESTful service deciding upon URL paths -
i creating application client-side functionality calls various services return results/content etc. @ moment, have 3 controllers, actions working fine. i'm trying decide how manage list content, i.e. in 2 instances, there json lists of drop-down data outlined below:
in 1 page, there dropdown needs call list of e.g. car makes. once selected make, call return 2 additional arrays of e.g. car products etc. in page, there 1 call return 2 arrays of products. common theme is list management.
at moment, have controllers setup as: existingmember switcher newmember
switcher requires list of carmakes, , associated call products. existingmember requires list of products.
what best way setup controller/action/id?
i have toyed various options:
- /switcher/carmakes
- /switcher/carproducts/7
- /existingmember/products
also modifying routes brevity:
- /{controller}/list/{action}/{id}
- /switcher/list/carmakes
- /switcher/list/carproducts/7
or moving dedicated list controller
- /list/carmakes
- /list/carproducts/7
- /list/products
how define routes , overall controller architecture pretty subjective give out same advice questions this:
do makes sense , team.
Comments
Post a Comment