# Coding Guideles (Not up to date)

## Naming Guidelines
namespace identifier: "lively-"
(e.g. used to name classes like lively-editor)

## Node identification

### data-lively-id attribute
* data-lively-id="[UUID]"
* randomly generated by system
* used to temporarily an globally identify objects (e.g. to allow object editor to reference something)

### id attribute
* id="[some string]"
* defined by anyone who builds a page
* People can use this attribute for css styling or scripting

### name attribute
* name="[part creator defined name]"
* defined by the one who created a part (e.g. window-title)
* used to be able to talk about specific nodes
* locally unique
* contains typical name for subcomponents of parts

## Component Loading
* No explicit import of templates (no `<link rel="import">`)
* When loading the page, bootstrapper identifies unknown elements
* Recursively identify unknown elements in imported templates and load them
* -> No boilerplate code in the component files necessary
* Include (optional) prototype and component dependencies in `data` attributes or otherwise in some kind of "DOM form"