0

I'm starting a new project, based on ASP.NET. The application will be a registry with a web interface. It will be used by ca 3000 users.

It has been ca 4 years since I last started a new project so I'm a "bit" rusty when it comes to the latest trends..

I wish the new application to be SPA so I investigated some Javascript MV* frameworks and finally settled on Durandal, Bootstrap (for layout) and Telerik's Kendo UI with ASP.NET MVC helpers.

I installed a template called Hot Towel, which created a ASP.NET MVC based Durandal project setup. However, I see that Views are html not Razor's cshtml. Can I still use cshtml files (for helper classes to work)? Is there any downfall in this?

Also I heared a discussion that when using Durandal, one shouldn't use ASP.NET MVC but rather just Web API. What do you think of that? I'd still like to use MVC helpers here and there..or is there a good reason for abandoning it for Web API?

Do you have any other considerations and recommendations on a new project setup?

Best wishes, Andrew

user315648
  • 1,945
  • 3
  • 22
  • 30

1 Answers1

1

Someone who knows a more about durandal than I may be able to shed some light on the part of using cshtml views. I would imagine that you would have to override the viewLocator and point it to controller actions rendering partial views??? (you need them to be parsed by the Razor engine to get valid HTML).

As for using regular html files, I have used a fantastic library called knockout-kendo for using kendo UI components in SPA applications. I find it just as easy to use as the HTML helpers, all while keeping the application a true SPA, and you then serve up all of your data via WebAPI controllers.

Hope this is of some help.

EDIT: Perhaps you can also have a look at this answer How can I use cshtml files with Durandal?. There are a few answers there that seem to be doing what you are looking to do..

Community
  • 1
  • 1
Excommunicated
  • 1,252
  • 8
  • 14