client-MVC vs server-MVC

前端 未结 5 775
温柔的废话
温柔的废话 2021-02-02 10:56

I am looking to get some input from other users on the benefits of server-side MVC. With the power of many javascript libraries. What good purpose does server-side MVC server

5条回答
  •  一向
    一向 (楼主)
    2021-02-02 11:33

    The way I see this, the server side MVC remains relevant if you consider the V as your client side MVC wrapped in a black box. The thing is that this is all about collaboration and scalability. The server side MVC continues to fuel the REST APIs (for instance) with the notion that you are technically outsourcing the viewing technology to a separate framework running in your browser.

    Since browser is increasingly seen as application development platform, you can export huge amounts of data from your "backend platform" to the client (browser) and then treat the data as a local "database" in your browser allowing fast response time.

    Combining these 2 MVC frameworks allows for:

    1. Sparse traffic between server and client thereby decreasing latency
    2. Increasing responsiveness of your web apps by localizing access to more relevant data set
    3. Distributing the load from a single, server side controller to hundreds of browsers

    The architecture at work here is very similar to CDNs - content delivery networks! Really it is about localizing data, and bringing it nearer to processing centers.

    Having said this, you may continue to make exclusive use of one over another, if you understand the architectural needs of your product. Right tool for the right job.

提交回复
热议问题