Showing posts with label marionette. Show all posts
Showing posts with label marionette. Show all posts

Monday, December 15, 2014

Marionette: Layout Views For Applications

Marionette Application instances are kind of like layout views. You can give them regions, and use these regions to show smaller views. There's one important difference, between a layout view an an application. With the latter, there's generally only one. Layout views on the other hand, generally exist in larger numbers. Another difference is with where they get their markup from. The application works with that's already in the DOM while a layout view works with a template that it renders.

Tuesday, December 9, 2014

Marionette: Simple Text Views For Regions

Layout views in Marionette are great, and I think they should be used wherever possible. Any given page should be divided into regions — it's just a good habit to have. There are times when regions are a pain, however, because all you want to render is some simple text. Most of the time, regions will show more complex views that do a fair amount of work. They have templates, they have a model or collection as context, and so on. The challenge is being able to swap out something complex with something simple.