Come in and discuss ajax, Layer 3, and mvc

Source: Internet
Author: User
Come in and discuss ajax. I wrote a small project on Layer 3 and mvc. I used three layers (interface layer, business logic layer, and data layer ). Later, a large number of ajax applications were added. If we find that Layer 3 and ajax are used in projects together, there are great disadvantages. Ajax is like a server that submits a request and processes the returned results. For the traditional layer-3 architecture, ajax cannot submit requests to the business logic layer. Let's discuss ajax, Layer 3, and mvc.
I wrote a small project by myself and used to use three layers (interface layer, business logic layer, and data layer ).

Later, a large number of ajax applications were added.
If we find that Layer 3 and ajax are used in projects together, there are great disadvantages.
Ajax is like a server that submits a request and processes the returned results. For the traditional three-tier architecture,
Ajax cannot commit a request to the business logic layer. The business logic layer generally involves some processing functions.

Therefore, I made the following summary:
If ajax is used in many projects, design the project as mvc.
In this way, ajax requests can be processed well using the controller in mvc.

I don't know if this summary is correct. please click it!
------ Solution --------------------
Whether it's "three layers", "MVC", or other..., as long as you return additional data to AJAX, it will be terrible.
------ Solution --------------------
The three layers you mentioned are like MVC, and the controller is the logic processing layer. if you do a good job of division of labor, you will not say that.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.