On 18 January 2016 at 05:49, fugee ohu <[email protected]> wrote: > if i have a lot of different models that can have many images is it better > to have separate image models for each of them to make things easier for my > server in high traffic conditions or let them all use the same image model?
Can you explain why you think that it will make life easier for your server if you have separate models? Whatever the answer to the above, it is almost almost a mistake during initial development to make your code more complex in order make it more efficient. This is known as premature optimisation. Decades of working in s/w design have taught me that the bottlenecks in code are very rarely in the bits of code you expect. Design your system using the KISS technique and make sure you have full automated test coverage so that when you refactor the code you can be sure it is still working. If you eventually get the the point where throughput is an issue then that is the time to work out where the bottlenecks are and solve those problems. > What about using the same model for images and video, let's say the vp model > (video,photo) Are these good ideas? I'm preparing my models for > bootstrap-image-gallery an extension to bluimp-image-gallery so i guess just > consider i'm preparing my models for bluimp ~ thanks As I said, use the KISS technique. So use the simplest design that will solve the problem. The simplest design will take less time to develop and will have less bugs (as there is less code and it is simpler). Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuo0S6vGnJO4%3D7uNydSS7Snu7WJ%2BEHXwULkn7BtFOBCRw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

