When making HTML5 web application using KineticJS, grouping, and layering need to be used.
Groups are basically containers whereas layers are separators basically.
The group is a container which is having shaped objects inside layers for ex group might contain both circle and rectangle.If a group is manipulated then elements within that group is also manipulated.ex if we drag the group then its elements get dragged as well.
However, layers actually separate canvas elements that are at the top of one another. This is quite similar to the layers that work in Photoshop and Illustrator. Multiple layers are visible simultaneously.
Layers are used to separate one item from another; example background layer is made separate from animation layer.