
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
MVVM building block to create real time and large scale applications in a flash
Compose your own MVVM library.
Brick makes it easy to create rich yet maintainable web interfaces by providing a set of composable and extensible components. It uses cement to sync and update your UI with an underlying data store.
Brick has been built for wall, an express-like framework to ease the creation of maintainable and large scale application. Brick is simple, composable and easy to learn.
Give it a try you won't be disappointed!
Interpolation (see online):
var view = brick('<span>{{ name }}</span>', {
name: 'bredele'
});
view.build(document.body);
brick('<ul repeat><li>{{ name }}</li></ul>', [{
name: 'bredele'
}])
.use(repeats)
.build();
Factory (see online):
var card = brick.extend('<button>{{ name }}</button>')
.use(interval(100))
var view = card({
name: 'bredele'
}).build();
Supporting IE8 is a pain but it's unfortunately still widely used in the industry. This is the reason why brick is fully tested and supports all mainstrean browsers, IE8 included.
IE7 requires the use of JSON and querySelector polyfill.
Brick is that tiny piece (3kb gzip) that composes well. It follows the UNIX philosophy and provides simply just what you need. Everything else is a module (using npm and browserify or component) with single responsability that you can reuse at scale.
You can compose your owm framework. The possibilities are limitless and commonjs allows you to reuse functionnalities made by the community (npm or component) and stop duplicating your effort.
Event if brick is small, it has a fair bit of power under the hood:
Brick is also simple. Just a minute is enough to get into it:
<div class="el">
<style>
.brick {
background: {{ color }};
}
</style>
<div class="brick"> {{ label }} </div>
</div>
var view = brick('.el', {
color: 'red',
label: 'Hello'
}).build();
// change label
view.set('label', 'World!');
Let's be honnest, there is enough MV* libraries out there and some of them are actually really good. It's not brick's intent to replace them. Instead, brick's goal is to create an ecosytem of composable components to create rich and maintainable web applications in a flash.
with component:
$ component install bredele/brick
with nodejs/browserify:
$ npm install brickjs
We are currently writing a new documentation but you can find the old one in the wiki.
In Brickjs, each view has its own bindings and set of plugins unlike some libraries where everything is contained in a global scope. This is important in order to avoid conflict, memory leaks and to maintain your code properly.
view.add('repeat', require('repeat-brick'));
As shown above, you can give a name to your plugins to avoid name conflicts when different views overlap. Your code is readable and also configurable! You can create your own plugins like jQuery (it's as easy as creating a function) and reuse them multiple times inside or outside of your application.
Supporting IE8 is really not complicated and does not make Brickjs slower.
IE8 doesn't support indexOf and trim. IE8 has shadow node attributes and doesn't support data (we use nodeValue in binding).
Thats's pretty much it!
Wall has an express-like API and is inspired by this article. It allows you to split your larger application into smaller pieces. Instead having a composite layout where you have a view in a view in a view (and keep references of every views), you have totally independant pieces (with single responsability) that communicate through an event hub.
The main benefits are:
You'll see that it'll be easier to get back on your code when your application will become bigger and even a new team member could add, remove or update features in a flash. However. nothing forces you to use it.
See release notes.
The MIT License (MIT)
Copyright (c) 2014 Olivier Wietrich olivier.wietrich@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
MVVM building block to create real time and large scale applications in a flash
We found that brickjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.