<commit_before>![tetra logo](https://raw.github.com/viadeo/tetra/master/tetra.png) ![travis](https://secure.travis-ci.org/viadeo/tetra.png)  
=====

## Tetra, a clean MVC javascript framework

Tetra aims to help developers build faster, more maintainable and better structured code.

Tetra is a complete MVC (Model, View, Controller) framework, normalizing all implementations through a simple structure that splits the code into 3 different layers :
   * [View](/viadeo/tetra/wiki/View-layer): DOM access and UX behaviors 
   * [Controller](/viadeo/tetra/wiki/Controller-layer): Programmatic logic
   * [Model](/viadeo/tetra/wiki/Model-layer): Structured data and Ajax requests
   
Each layer has access to a communication pipe linked to a potential listener, allowing asynchronous communication between each part of the application.

The Tetra.js framework is also Object-oriented, encouraging the developer to better separate and organise structured data and its associated logic. An [ORM &#40;Object-Relational Mapping&#41;](/viadeo/tetra/wiki/ORM:-Object-Relational-Mapping) encapsulates Ajax transactions and ensures data consistency between front- and back-end.

Additionnally, the "[bootstrap](/viadeo/tetra/wiki/Bootstrap)" feature allows JavaScript resources to be loaded dynamically, either through data attributes set on DOM nodes or via a dependency management system.

## Tetra core tree

   * **lib**
      * **conf**: Tetra.js configuration files for each platform.
      * **deps**: External dependencies of the client-side framework.
      * **mod**: Additonal modules of the framework. Ability to extend native implementation with advanced features. Already implemented modules are:
		 * **libAbstracted**: Abstracted library to use Tetra.js with librairies other than jQuery. Prototype and Node.js connectors are already implemented.
		 * **require**: The RequireJS library, used client- and server-side (Node.js) dependency loading
		 * **tmpl**: Templating system integrated into the controller and view layer in both the client and server environments.
      * _tetra-controller.js_: Controller layer
	  * _tetra-model.js_: Model layer
	  * _tetra-view.js_: View layer
	  * _tetra.js_: Core of Tetra.js framework, an interface that provides acceess to the MVC layers, framework extensions and debug features.

Configuration files are used to construct the core object needed to build mvc apps. It must have the following structure :

```js
tetra.extend({
	conf: {
		env: 'jQuery',
		jsVersion: 347,
		enableBootstrap: true
	}
}).start();
```

If the default settings are sufficient, you need only call the start function (as in /conf/default.js):

```js
tetra.start();
```

## Applications tree
By default, the Tetra.js framework expects a particular directory tree structure. Following this convention allows you to use the bootstrap feature to dynamically load JavaScript resources.

   * **tetramvc**
      * **apps**
		 * _application name_
		    * **controller**: Controller classes of the application
			   * _***.ctrl.js_
		    * **model**: Model classes of the application
			   * _***.class.js_
		    * **view**: View classes of the application
			   * _***.ui.js_
      * **model**: Global model classes

## Table of content
   * [View layer](/viadeo/tetra/wiki/View-layer)
   * [Controller layer](/viadeo/tetra/wiki/Controller-layer)
   * [Model layer](/viadeo/tetra/wiki/Model-layer)
   * [ORM: Object-Relational Mapping](/viadeo/tetra/wiki/ORM:-Object-Relational-Mapping)
   * [Templating system](/viadeo/tetra/wiki/Templating-system)
   * [Bootstrap](/viadeo/tetra/wiki/Bootstrap)
   * [Debugger](/viadeo/tetra/wiki/Debugger)
	  
## Licence
(The MIT License)

Copyright (c) Viadeo/APVO Corp., <NAME> and other Tetra contributors.

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<commit_msg>Update readme according to v1.0.1 changes<commit_after>![tetra logo](https://raw.github.com/viadeo/tetra/master/tetra.png) ![travis](https://secure.travis-ci.org/viadeo/tetra.png)  
=====

## Tetra, a clean MVC javascript framework

Tetra aims to help developers build faster, more maintainable and better structured code.

Tetra is a complete MVC (Model, View, Controller) framework, normalizing all implementations through a simple structure that splits the code into 3 different layers :
   * [View](/viadeo/tetra/wiki/View-layer): DOM access and UX behaviors 
   * [Controller](/viadeo/tetra/wiki/Controller-layer): Programmatic logic
   * [Model](/viadeo/tetra/wiki/Model-layer): Structured data and Ajax requests
   
Each layer has access to a communication pipe linked to a potential listener, allowing asynchronous communication between each part of the application.

The Tetra.js framework is also Object-oriented, encouraging the developer to better separate and organise structured data and its associated logic. An [ORM &#40;Object-Relational Mapping&#41;](/viadeo/tetra/wiki/ORM:-Object-Relational-Mapping) encapsulates Ajax transactions and ensures data consistency between front- and back-end.

Additionnally, the "[bootnode](/viadeo/tetra/wiki/Bootnode)" feature allows JavaScript resources to be loaded dynamically, either through data attributes set on DOM nodes or via a dependency management system.

## Tetra core tree

   * **lib**
      * **conf**: Tetra.js configuration files for each platform.
      * **deps**: External dependencies of the client-side framework.
      * **mod**: Additonal modules of the framework. Ability to extend native implementation with advanced features. Already implemented modules are:
		 * **libAbstracted**: Abstracted library to use Tetra.js with librairies other than jQuery. Prototype and Node.js connectors are already implemented.
		 * **require**: The RequireJS library, used client- and server-side (Node.js) dependency loading
		 * **tmpl**: Templating system integrated into the controller and view layer in both the client and server environments.
      * _tetra-controller.js_: Controller layer
	  * _tetra-model.js_: Model layer
	  * _tetra-view.js_: View layer
	  * _tetra.js_: Core of Tetra.js framework, an interface that provides acceess to the MVC layers, framework extensions and debug features.

Configuration files are used to construct the core object needed to build mvc apps. It must have the following structure :

```js
tetra.extend({
	conf: {
		env: 'jQuery',
		jsVersion: 347,
		enableBootnode: true
	}
}).start();
```

If the default settings are sufficient, you need only call the start function (as in /conf/default.js):

```js
tetra.start();
```

## Applications tree
By default, the Tetra.js framework expects a particular directory tree structure. Following this convention allows you to use the bootnode feature to dynamically load JavaScript resources.

   * **tetramvc**
      * **apps**
		 * _application name_
		    * **controller**: Controller classes of the application
			   * _***.ctrl.js_
		    * **model**: Model classes of the application
			   * _***.class.js_
		    * **view**: View classes of the application
			   * _***.ui.js_
      * **model**: Global model classes

## Table of content
   * [View layer](/viadeo/tetra/wiki/View-layer)
   * [Controller layer](/viadeo/tetra/wiki/Controller-layer)
   * [Model layer](/viadeo/tetra/wiki/Model-layer)
   * [ORM: Object-Relational Mapping](/viadeo/tetra/wiki/ORM:-Object-Relational-Mapping)
   * [Templating system](/viadeo/tetra/wiki/Templating-system)
   * [Bootnode](/viadeo/tetra/wiki/Bootnode)
   * [Debugger](/viadeo/tetra/wiki/Debugger)
	  
## Licence
(The MIT License)

Copyright (c) Viadeo/APVO Corp., <NAME> and other Tetra contributors.

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
{'fraction_non_alphanumeric': 0.10045090180360722, 'fraction_numerical': 0.0023797595190380764, 'mean_word_length': 4.267150395778364, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2665917', 'n_tokens_mistral': 2357, 'n_tokens_neox': 2107, 'n_words': 838}