Jump to content

MVC and the model


Liquid Fire

Recommended Posts

Now I have been thinking and it seem like the model part of the MVC is sometimes a bad things.  The biggest issue is with insert a high amount of data.  i ha want to insert 100 records to 10 users(say i am adding all permissions tied to a user group to 10 users.  That mean i need to create 1000 permission model object and that will then run 1000 queries.  Does anyone know if there is a way around this with still creating each object but only have 1 query.

Link to comment
https://forums.phpfreaks.com/topic/102332-mvc-and-the-model/
Share on other sites

You dont need to follow any hard-and-fast rules, IMO.

You could make a custom "permission updater" or "BulkUpdater" class :)

Like there are "data loader" utilities

with just that much description, it's difficult to give you a good answer because it seems you want things to speed up as well - which is called optimization - and to optimize, you need to know a lot about the structure.

 

fwiw, the MVC concept should have been called CMV and maybe even CMV/IPO, coz that's what it is exactly.

( IPO for Input-processing-output, but that's another story.... )

More info needed for anything concrete...

hth

Link to comment
https://forums.phpfreaks.com/topic/102332-mvc-and-the-model/#findComment-524253
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.