Case Study:
It is very important
to separate CMS and CD level MVC routing . When we deploy CD content delivery
for any web then it should have very specific routing for the web and most of
the cms specific routing should be entrusted to cms solution. It is simple you
move all the cms level custom route to custom library and later reference and
allow to run at runtime using config patch specific to environment. Like
SiteSetting.CMS.Config vs SiteSetting.CD.Config this is will part of continous
deployment where it will be picked up during depployment to specific cms and CD
environment. By doing this we are separating the responsibility and it help
maitain consistent approach specific to cms and cd. This also good for
performance of application and it will not conlict with web solution specific
to its functionality.
CD with specific to
web page
Say http://abc.com/homepage which internally
call api via ajax -xhr request say http://abc.com/abc/api/home/Get
CMS with specific to
admin or shell page
http://abc.cms/sitecore/admin/api/user
this is very specific to cms
Now when you are
employing this solution in MVC ensure it is separated for each of this
environment. The cms web server will have routing logic loaded at runtime
specific to its env without adding extra overload to web CD environment.
Ref: