0

I'm an angular beginner and am currently working through a few angular tutorials. I have some ASP.NET MVC experience from a few years back.

What I think I am trying to understand is whether I should be attempting to design my application as a SINGLE or MULTI page application.

As far as I understand, there are two main schools of thought, when it comes to Angular and ASP.NET CORE applications:

  • Create a simple ASP.NET CORE application serving a single page. That page will be a single-page angular application, which will take care of its own routing, etc, presenting a variety of different views and potentially using an API exposed through ASP.NET for data
  • Create a multi-page ASP.NET CORE application, serving a number of different pages, each of which will be a razor page, with some part of it being an angular application

Am I understanding this right? I think the single-page application makes sense to me, but I do find that I am quite confused on multi-page approach... I am not quite clear on which part of multi-page application is angular supposed to fill and whether every single page should be its own angular application.

I have tried searching for a comparison of the two, but was unable to find anything decent. :(

1
  • 1
    Your multi-page app will not necessarily require or use Angular. You may have some pages that require more complex user interactions or real-time data functions that Angular (or some other framework) can help you achieve. Commented Apr 8, 2018 at 23:40

3 Answers 3

2

In Multi-Page Applications, the client (browser) which typically sends a request for page to the server to initiates the communication. Then the server processes the request and sends the HTML of the page to the client (browser). For every request server sends the full html to the client, not to load patch html to the client.

In Single-Page Applications (SPAs) at first the entire page is loaded in the client by the initial request, after that the subsequent action has to update by Ajax request and no need to reload the entire page. The SPA reduces the time by to respond to user actions and result is more fluid experience.

Sign up to request clarification or add additional context in comments.

Comments

1

I don't think the classification you use is correct. To me it is:

  1. Traditional "multi page" application: HTML generated on server (ie MVC and Razor) and pushed to the browser at every request.
  2. Single page applications (SPA): HTML downloaded a single time from the server and manipulated on client via Javascript (ie Angular).

Probably you are talking about "multiple" "single page applications" where you break a complex SPA into smaller ones.

Ie you could have a "user" SPA and an "admin" SPA published from the same website.

Comments

0

If you want to build single page application(ajax based) in Asp.net Core MVC solution without using any third party JavaScript framework then better you have to look this github repository. https://github.com/KishorNaik/Sol_Ajax_Spa_MVC_Core

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.