Brick
Brick is a widget library on top of Bloc.
Lists
Editors
Buttons
Pager
Tabs
Accordions
Breadcrumb
Checkboxes
Dropdowns
New Brick widgets are typically created by composing existing widgets.
There are several architectural features of Brick that facilitate flexibility and reuse:
Stencils (subclass of BrStencil
) are used to create widgets when lazy creation is required, or when the widget to be created depends on the data being displayed.
Looks (subclass of BrLook
) provide the ability to modify the element to which they are attached. A typical example is the look of a BrButton
, whether it has a border or not, a label or not, an icon or not, etc. Looks should only be created when the underlying widget is used in many places, e.g. buttons, and should not affect the API of the widget.
View Models are used to maintain the state of a Brick widget, e.g. pressed, focused, hovered, and, like Looks, can be composed by adding multiple models together. Like Looks, models also receive events.
Functionality that is related, but not directly part of Brick:
Brick is built on top of Bloc elements. If you feel you need to create an element, ask first, you probably don't.
Phlow views are built on top of Brick and are used to compose views of a particular object. Their reuse is typically at the application level where the application interface may be composed of multiple Phlow views.