Fat Controller/View combo

I’m coming from a mapping perspective, and in a mapping application, almost everything is centered around the map. I find myself with a very heavy MapController and MapView.

The view handles the initializing and tearing down of the map itself (Google Map, Leaflet, etc), map events, and any other child views that are drawn on the map.

The controller handles data coming in, and it delegates the data to the appropriate map locations, based on data type and content.

This gets ugly quickly (filtering, sorting, special cases, etc), eventually every other controller needs map, so they bind to MapController… Yes, child views and components are great, but it’s not enough. I’m thinking I need to focus more on the “Tell, don’t ask” paradigm. Has anyone suffered from something like this? What is your approach, design patterns you used, Ember tricks, etc…

2 Likes