News for hackers. Stuff that matters.
Re:Break Apart Your Backbone.js Render Methods by Vekz on Tuesday August 28, 2012 @05:25PM (#4445959)
This is not a problem specific to backbone rendering. This is a common issue in jQuery plugins, and vanilla javascript in general. Its a best practice overall to keep your functions small.

Have them do one thing and do it well, keep them unix like, small sharp tools. You can always copy paste a large conditional from one function into its own named function. This significantly improves readability and divides the code in to smaller units which makes testing more graceful.

There are no comments on this comment yet.