-
Notifications
You must be signed in to change notification settings - Fork 11
convention ideas
[path]\[name]-[keyword]-[value]-[keyword2]-[value2].[preprocessor type].[extension]
Object\SubObject\NewClasName-extends-OldClassName-contains-Comment.[preprocessor type].[extension]
example:
folder\sub_folder\Foo-extends-Controller.class.js
also it is possible to create include file manager so it will merge files:
Foo-extends-Controller-contains-MyCoolFunctions.class.js
Foo-extends-Controller-contains-MyOtherFunctions.class.js
Foo.haml.js
Foo.jquerytempalte.html
Foo.doubletemplate.html
Foo.metatempalte.html
Foo.phptemplate.html
the types we could have:
- Templates
- JavaScript preprocessor magic
- Database Model preprocessor magic / is it differentiates from JavaScript?
- ...?
database: it could be it two ways:
Bar-extends-Model.class.js
or
Bar.model.js
configuration / modifiers
database.config.js
or database.config.json
As I saw at the beginning there are keywords in the name Also there might be keywords in the folder name like haml-templates and all that inside it will be haml templates. or controllers
this file is in progress please write here what you like to have.
a way to do includes gradually:
Bar.class.js
Bar.mixin-some_functionality.class.js
Bar.mixin-some_other_functionality.class.js
var mixin = function(target) {
var i = 1, length = arguments.length, source;
for ( ; i < length; i++ ) {
// Only deal with defined values
if ( (source = arguments[i]) !== undefined ) {
Object.getOwnPropertyNames(source).forEach(function(k){
var d = Object.getOwnPropertyDescriptor(source, k) || {value:source[k]};
if (d.get) {
target.__defineGetter__(k, d.get);
if (d.set) target.__defineSetter__(k, d.set);
}
else if (target !== d.value) {
target[k] = d.value;
}
});
}
}
return target;
};
Additions and Comments are welcome in this page:
Comments:
also you can post an issue at https://github.com/shimondoodkin/nodejs-mongodb-app/issues
Philosophy for a framework, with practical examples: