On 18 January 2016 at 05:49, fugee ohu <
fuge...@gmail.com> 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