国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

php framework - Why do lightweight frameworks like slim not strictly distinguish between model layers?
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-05-16 17:05:35
0
1
710

Why do lightweight frameworks like slim not strictly differentiate between model layers?

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證0級(jí)講師

reply all(1)
大家講道理

In fact, dividing levels is a logical problem. Many novice users use frameworks from the beginning and are spoiled by frameworks. Frameworks can do almost everything. All they have learned is to write code under a certain framework. , and out of the frame, only confusion remains.
Even if a heavy framework like domestic Thinkphp provides the Model layer, there are still very few people using it. Why? Because using the Model layer requires you to divide the logic yourself and write code yourself, which is painful for them, so almost all the people I have seen operate the database in the Controller Directly M('table')->insert($data) and so on. The utilization rate of the Model layer is extremely low. Thinkphp這樣的重型框架,他提供了Model層,用的人仍然很少,為什么?因?yàn)橛?code>Model層還需要自己劃分邏輯,仍少不了自己寫(xiě)代碼,這對(duì)他們來(lái)說(shuō)是痛苦的,所以我見(jiàn)過(guò)的幾乎所有的人操作數(shù)據(jù)庫(kù)都是在Controller里直接M('table')->insert($data)等。Model層的利用率極低。
而對(duì)于非小白用戶,Model層無(wú)法就是個(gè)封裝了某個(gè)表的數(shù)據(jù)庫(kù)操作類(lèi)而已,隨手就創(chuàng)建了,何須框架來(lái)多此一舉,浪費(fèi)性能?
只要心中就有mvc,一切都有層次。
而且,隨著composerFor non-novice users, the Model layer cannot be just a database operation class that encapsulates a certain table and is created casually. Why do we need a framework to do this and waste performance?

As long as you have mvc in your heart, everything has levels. ??Moreover, with the emergence of composer, PHP development has gradually become modularized, instead of the previous framework. Now more and more people write code that uses modules directly instead of the entire framework. ??
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template