Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Aug. 22nd 2017

Let's Build A Forum with Laravel and TDD: Thread Views: Design #3 - KISS

Episode 70 Run Time 7:50

Download

Finally, we've made it to our third and final design choice: KISS. A vital skill for all web developers is to understand when certain optimizations and refactors are necessary, and when it simply doesn't matter. In the case of this particular feature, would it be easier if we simply added a "visits" column to our threads table? Yes, we'd need to increment this count each time a thread is read, but is that necessarily a problem? Are we anticipating a scale and level of traffic that demands such an optimization? If not, keep it simple.

View the source code for this episode on GitHub.