I have been engaged in php development for some time. One of the biggest problems I have encountered now is the problem with the tp framework we are currently using, that is, the larger the model, the larger the Model. now I want to split the model, but I don't know how to do it... I have been engaged in php development for some time.
One of the biggest problems encountered now is about Project layering.
The tp framework we are using now
The problem is that the model is getting bigger and bigger.
A Model may have one thousand rows.
Now I want to split the model.
But I don't know how to do it.
Are you experiencing this situation again?
Or how are other frameworks layered?
Reply content:
I have been engaged in php development for some time.
One of the biggest problems encountered now is about Project layering.
The tp framework we are using now
The problem is that the model is getting bigger and bigger.
A Model may have one thousand rows.
Now I want to split the model.
But I don't know how to do it.
Are you experiencing this situation again?
Or how are other frameworks layered?
Add, delete, modify, and query databases at one layer
Data Cache Layer
Business logic layer
Decoupling. Split Based on different functions.
A model has 1000 rows. It is enterprise-level development. enterprise-level development does not support caching. After all, data is changeable and everyone sees different things.
In addition, you really think that 1000 rows are very good. Look at the ecshop type. A file with 3000 or 4000 rows is also running, but people are doing cache.
The performance of xcache is not that bad for older php versions.
Abstract Logic, decoupling function; TP current version also provides a Model, Service, Logic Solution