MVC or SPA application

2

I have been working with MVC for the past two years, but lately I have been following the growth of the development of SPA applications. After reading several articles on this subject I had a doubt, if I wanted to develop an application to be published both on the web and mobile the SPA would be the best indication or should I make a mix between MVC and SPA?     

asked by anonymous 28.05.2016 / 08:30

1 answer

8

What's best for you in each case is all you can say.

The two technologies do not compete with each other, so there is no dichotomy. If you want to use both. ASP.Net MVC is a server technology. The SPA is a client technology.

It's true that using ASP.Net MVC has views and the SPA almost does not need this (but needs a bit), it's the view . It is more common to use ASP.Net WebAPI in this case. But luckily in the ASP.Net Core is now integrated.

If you use SPA you are using a web technology, that is, you can use it on any device that has a standard web browser. The question speaks in mobile. There are even technologies that use the web as the basis for applications, but it's still web. Usually either this technology is used or the application is made with the native operating system API of the mobile device. Obviously the SPA is not possible. On the server you can continue to use ASP.Net WebAPI (now most likely with ASP.Net Core ).

Many people like to use the web for everything. This is often a mistake. It has numerous disadvantages and the only advantage is actually taking advantage of the client code for all devices. The server code can be used more easily. Even so some prefer something more specific when the client's access is done natively.

Note that SPA is often useful only for applications. For common websites it is best to use the normal web presentation, even for SEO issues. Of course, in some points maybe even use the SPA, but you should only adopt this, even if punctually, in some specific pages when you have full control of the consequences. You can not study superficially and leave by following cake recipes. That's why a lot of the websites are wrongly done today.

Some questions on the site that can help

There is something the layman likes, and when he gets an experience, he finds out that he sucks. Others never get experienced and feel good forever, even if it's horrible.

But keep in mind that there is no magic solution. If things were easier in computing, 90% of programmers would not have to. Even so, one should not try to simplify. But simplification is not the only, much less the main feature that an application should have. In addition, what may seem to be simplification is often a complication.

    
28.05.2016 / 12:50