This does not seem to be the best approach for me.
You should use layout area managers to display views without having to perform functions like you defined.
I would go for this approach
var view = new CustomView(); layout.content.show(view);`
and then:
var newView = new SecondCustomView(); layout.content.show(newView);
If you want to continue on the road you are on, you will probably be best off using this approach:
initialize: function () { _.bindAll(this); }, show_places_page: function () { var placesLayout = new Places_Layout(); this.content.show(placesLayout); }
It makes sense?
It is difficult to offer a better course of action without seeing more structure around it.
Is there a reason you are creating views in initialize ?
source share