How many models are possible with Cake?
Hello, I am building a Webapp with Cake and love it very much. The Application have about 30 models. The problem is, that it will increase over the time. Now I wonder, if it could be better to divide the Webapp into different CakeApps to reduce the amount of models per CakeApp in future. What do you think? How many models do you have succesfully in one CakeApp? What do you think, is the max-number of possible Models, so that Cake still works stable? Greetings Freight --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How many models are possible with Cake?
On Oct 25, 2007, at 10:34 AM, Freight wrote: Hello, I am building a Webapp with Cake and love it very much. The Application have about 30 models. The problem is, that it will increase over the time. Now I wonder, if it could be better to divide the Webapp into different CakeApps to reduce the amount of models per CakeApp in future. What do you think? How many models do you have succesfully in one CakeApp? What do you think, is the max-number of possible Models, so that Cake still works stable? I think a more important concern is how many models you need for any given request. I don't think there's a big problem with having lots of available models - it's just how you use them that counts. This is especially less a concern since Cake loads things up only when you need them. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How many models are possible with Cake?
On 10/25/07, Freight [EMAIL PROTECTED] wrote: What do you think? How many models do you have succesfully in one CakeApp? What do you think, is the max-number of possible Models, so that Cake still works stable? I don't think there is any limit to how many models you can use, but it does require judicious use of loadModel(...) and var $use = array(...) so that you're only loading the models you actually need in memory. You could have 1000 models, but all that really matters is how many are in memory at once. I'm sure others will correct me if I'm wrong. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How many models are possible with Cake?
The problem is that if all your models are related, then even just using one will mean that all model classes are loaded. We have an app here with 34 models, and about 25 of them are associated (up to five degrees of separation). These 25 models will be loaded for virtually every page request, even though they are not used. At some point in the future I plan to test the app where there are no implicit associations - every association needs to be built before the query that needs it. This shouldn't need to be any more complex than Felix's Containable behaviour ( http://www.thinkingphp.org/2007/06/14/containable-20-beta/ ), and should hopefully provide some performance benefit. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---