Here is an example of using some helper methods to help manage boilerplate view code. This baseInitialize helper basically wraps the existing initialize method and runs some boilerplate code first.
// Global helper object
var helpers = {
// Example helper
// This method will wrap any existing initialize method
// and run some boilerplate first
baseInitialize: function(view) {