Project Code Layering

Source: Internet
Author: User
I've been working on PHP for some time now.
One of the biggest problems now is about project layering.
The TP frame we are using now
The problem is that the model gets bigger.
A model might be 1000 rows
Now I want to do a split on model
But I don't know how to do it.
Have you come across this situation again?
Or what about the other frameworks that might be layered?

Reply content:

I've been working on PHP for some time now.
One of the biggest problems now is about project layering.
The TP frame we are using now
The problem is that the model gets bigger.
A model might be 1000 rows
Now I want to do a split on model
But I don't know how to do it.
Have you come across this situation again?
Or what about the other frameworks that might be layered?

Database additions and deletions on the first floor
One layer of data caching
Business Logic One layer

Decoupling, splitting according to different functions

A model 1000 line that is enterprise-level development enterprise level is not to do the cache after all, the data is changeable everyone sees things differently
And you really think 1000 rows are going to look at the Ecshop kind of a file. Three thousand or four thousand lines of work are running, but people do cache.
PHP old version Open XCache performance is not so bad

Abstract logic, decoupling function; The current version of TP also gives a model, Service, logic scheme

  • 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.