Hacker News new | ask | show | jobs
by 75c84fb8 5239 days ago
I'd like to nominate private subviews as a pattern.

    (function(){
        var myPrivateView = Backbone.View.extend({...});
        app.views.Foo = Backbone.View.extend({
            /* use myPrivateView somewhere in here */
        });
    })();
1 comments

Interesting. Any concrete examples of how it can be useful in a real-world project?
It's a good way to break a view into logical sub-components, while still only exposing one overall view to the world. Really just a variation on data hiding and encapsulation.