|
|
|
|
|
by kingdomcome50
3073 days ago
|
|
To be clear, SPAs do not distribute responsibilities any differently a traditional 3-layer MVC web application. You still have: - an infrastructure layer for managing data - a domain layer for enforcing rules and encapsulating data access/management (completely independent of the view) - (optional) an application/service layer between your domain and presentation to provide a common interface for convenience - a presentation layer for handling view semantics a service layer can be very useful if migrating from a traditional app to a SPA because it makes creating your API almost trivial. There is nothing about creating a SPA that makes a 3-layer architecture any simpler or cleaner. In fact, these days it is quite the opposite. You have all of the above systems in your application PLUS another MVC (or MVVM) framework on the client. The entire point of the MVC architecture is to allow for the switching/replacement of the "V". |
|