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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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