What are the advantages of deliberately weakening the model logic by putting the logic in a static method of the tool class?

Source: Internet
Author: User
The new company is popular in writing logic in the tool class (including only static methods). The anemia model is used only to verify data in addition to carrying data (framework requirements and some historical issues ). I have heard of several times that code is rewritten into a heap of process scripts to optimize the project in violation of the OO principle. But I cannot figure out how to do this... the new company is popular in writing logic in the tool class (including only static methods). The anemia model is used only to verify data in addition to carrying data (framework requirements and some historical issues ).

I have heard of several times that code is rewritten into a heap of process scripts to optimize the project in violation of the OO principle.

However, I don't know what the solution is, whether it is a new practice in an environment with frequent business changes or whether it is just an anti-pattern.

Background:

Fast-growing and large-scale start-up companies

Business-oriented companies with fast iteration and many demands

Good development skills

This is just a popular practice in the PHP department.

Reply content:

The new company is popular in writing logic in the tool class (including only static methods). The anemia model is used only to verify data in addition to carrying data (framework requirements and some historical issues ).

I have heard of several times that code is rewritten into a heap of process scripts to optimize the project in violation of the OO principle.

However, I don't know what the solution is, whether it is a new practice in an environment with frequent business changes or whether it is just an anti-pattern.

Background:

Fast-growing and large-scale start-up companies

Business-oriented companies with fast iteration and many demands

Good development skills

This is just a popular practice in the PHP department.

Yii's mvc design is like this. The advantage is that a set of M can correspond to multiple sets of different C and V. You should focus on the advance template of yii2. Another simple M can correspond to a set of simpler restful APIs. yii2 directly supports rest, so M should be simple and public, so M should be put in the common, instead of putting it in backend or frontend to maximize reuse.

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.