I am going through implementation Hottowel template and SPA Jumpstart source code from GITHUB.
I have observed that Hot towel default template contains Controller which is redirecting it to Razor view in order to execute view as shown below . public static void RegisterHotTowelPreStart() {
// Preempt standard default MVC page routing to go to HotTowel Sample
System.Web.Routing.RouteTable.Routes.MapRoute(
name: "HotTowelMvc",
url: "{controller}/{action}/{id}",
defaults: new
{
controller = "HotTowel",
action = "Index",
id = UrlParameter.Optional
}
);
However, in SPA Jumpstart code we have not registered any route and view is present in root folder and controller is pure webapi/breeze controller as shown below.
I would like know if view execution is handled by durundal or any other framework if we use only breeze webapi controller for HotTowel proejct.
I am new to hot towel template so it might be possible i am missing something small.
The HotTowell Template is based on an ASP.NET MVC Template and is meant to be run as an ASP.NET MVC application with both MVC and Web API controllers. That's why you see both kinds of controllers and the MVC routing when you generate an application from that template.
CCJS has a different point of departure. CCJS is based on the ASP.NET "Empty Web Application" Template and has no dependence on ASP.NET MVC.
When my single page apps don't need MVC (and they rarely do), I personally prefer the CCJS approach and the HotTowelette NuGet package makes it particularly easy to follow in the CCJS footsteps, starting from an empty ASP.NET web application.
In any HotTowel app, Durandal alone is responsible for managing load and display of views. Razor is only used for the master web page, the downloaded HTML frame within which the SPA appears. Razor plays no part in the SPA views themselves.