My organization is interested in creating a multiple SPA site with Durandal. What is the best usage of ASP.NET MVC 4 and Durandal? An mapping of each SPA to an Area or other? There is a question using Areas bellow:
Asked
Active
Viewed 641 times
1

Community
- 1
- 1

napoleonss
- 1,139
- 13
- 19
-
1What do you mean by best usage? What are you trying to do???? – PW Kad Dec 12 '13 at 15:07
-
An ASP.NET MVC site with multiple SPAs. Should mvc areas be used or plain controllers? Is there any advantage by using Durandal with areas for spas? – napoleonss Dec 12 '13 at 15:13
-
A controller is used to provide actions which serve up content. An area is used to organize your project into smaller functional groups. Your question is very open and not really detailing what exactly you are trying to do and therefore I don't think it's possible to help you unless you provide more details or more specifics on your problem. – PW Kad Dec 12 '13 at 15:18
-
In the question mentioned above http://stackoverflow.com/questions/15481899/durandal-and-mvc4-areas-for-multiple-spas/15486706#15486706, the proposed solution does not seem to promote independence of the distinct SPAs of a site. Rephrasing to best practices for multiple SPAs with ASP.NET MVC and Durandal? – napoleonss Dec 12 '13 at 16:59
1 Answers
0
If you mean hosting multiple Durandal SPAs in one page there's some discussion on this here.
You'll probably want to host the Durandal SPAs in separate iframes otherwise you'll probably have problems with routing.
However, if you mean hosting different Durandal apps from one ASP.NET MVC site then it's easy: just serve them from different HTML files. Areas have nothing to do with Durandal really. They're more for a 'normal' web application.

Chris Shepherd
- 1,436
- 1
- 11
- 17