Permalink
Browse files

Add readme and license

  • Loading branch information...
1 parent 8972b20 commit f40ff0599eaf639c1a28a08d2edeaaa277f60180 @ebryn ebryn committed Nov 12, 2012
Showing with 69 additions and 2 deletions.
  1. +19 −0 LICENSE
  2. +48 −0 README.md
  3. +2 −2 generators/license.js
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012 by Erik Bryn
+
+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.
View
@@ -0,0 +1,48 @@
+# Ember.js group helper
+
+This is an experimental plugin to allow an application developer to change the granularity of bindings in a template. This can lead to significant performance improvements when outputting many of bound properties, inside of an #each for example.
+
+The general rule is that the `group` helper causes the nearest view to be rerendered when a property inside it changes.
+
+Currently requires Ember.js master.
+
+## Usage
+
+```javascript
+ {{#group}}
+ {{firstName}} {{lastName}}
+ {{/group}}
+```
+
+Changes to `firstName` or `lastName` will rerender the whole `group` block.
+
+```javascript
+ {{#group}}
+ {{#each people}}
+ {{firstName}} {{lastName}}
+ {{/each}}
+ {{/group}}
+```
+
+The whole `group` block will be rerendered upon a change to the `people` array or any property within it.
+
+```javascript
+ {{#group}}
+ {{#each people groupedRows=true}}
+ {{firstName}} {{lastName}}
+ {{/each}}
+ {{/group}}
+```
+
+Specifying the `groupedRows` property will cause the #each to behave more like a normal bound #each. Since each row will have a virtual view associated with it, when a property within a row changes it will rerender only that row.
+
+```javascript
+ {{#group}}
+ {{#each people itemViewClass="App.RowView"}}
+ {{firstName}} {{lastName}}
+ {{/each}}
+ {{/group}}
+```
+
+You can alternatively specify an `itemViewClass` to get the normal bound #each behavior as detailed above.
+
View
@@ -1,6 +1,6 @@
// ==========================================================================
-// Project: Ember Data
-// Copyright: ©2011 Living Social Inc. and contributors.
+// Project: Ember group helper
+// Copyright: ©2012 Erik Bryn and contributors
// License: Licensed under MIT license (see license.js)
// ==========================================================================

0 comments on commit f40ff05

Please sign in to comment.