Plugins - Widgets
Add to favoritesAh yes, widgets. These babies are a cross between helpers and partials. The idea is that they can encapsulate a piece of UI logic and template, similar to the idea of components, only so much more lightweight.
Before widgets, you could accomplish the same thing by making a helper that would set up some locals and render a partial. If you’re like me and you do this a lot, you really start to wish it was formalized a bit so you don’t have to render the partial by hand at the end of all these helpers. Also, once you have a lot of these, you start wanting to organize these things better than you can with helper methods. So I just decided to formalize the whole idea.
