Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Internal Domain Specific Language javascript framework based on Method Chaining and dedicated to Domain Specific (multi)Modeling (DSM).
or How to design and code as you think... And boost your productivity as never.
Really small, simple, incredibly powerful and super fast.
(documentation in progress)
The aim of Babelute is to provide :
Expressing DSL with Fluent Interface is something that is well known today. The term "Fluent Interface" comes from Martin Fowler's 2005 article where he associated clearly Internal DSL and fluency.
Fluent interfaces does not mean necessary Method Chaining. It's just one way to achieve it. And Method Chaining doesn't mean necessary Internal DSL.
Fluent Internal DSL are much more about choosing right words with right semantics for optimaly expressing particular problems through readable and meaningful sentences. Not simply chaining calls.
Examples of Domain Specific Language expressed with Method Chaining :
SQL in JAVA : http://www.jooq.org/
create.select(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME, count())
.from(AUTHOR)
.join(BOOK).on(AUTHOR.ID.equal(BOOK.AUTHOR_ID))
.where(BOOK.LANGUAGE.eq("DE"))
.and(BOOK.PUBLISHED.gt(date("2008-01-01")))
.groupBy(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
.having(count().gt(5))
.orderBy(AUTHOR.LAST_NAME.asc().nullsFirst())
.limit(2)
.offset(1)
RTF Doc construction in JAVA : https://github.com/ullenboom/jrtf/
rtf().section(
p( "first paragraph" ),
p( tab(),
" second par ",
bold( "with something in bold" ),
text( " and " ),
italic( underline( "italic underline" ) )
)
).out( out );
Further reading :
Model Driven approach. (Model First, automation, standard)
Community of Abstract and Concreet DSLs.
Method Chaining along with Command Design Pattern to build Facade.
RSIC vs CISC
Auto-parsing
From persistence, to meta-programing, to shadow document.
var b = require('babelute').b;
// define language "foo" with 3 words
Babelute.toLexic('family', ['myMethod', 'mySecondMethod', 'myThirdMethod']);
// you could directly write sentences with it
var myBabelute = b('foo')
.myMethod()
.mySecondMethod('John', true)
.myThirdMethod(
b('foo')
.mySecondMethod('Biloud', false);
);
//...
// then provides semantics for those words
Babelute.toActions('foo:bar', {
myMethod:function(env, subject, args){
subject.first = true;
},
mySecondMethod:function(env, subject, args){
subject.second = 'Hello '+ args[0] + ' ! ' + (args[1] ? 'Greetings.' : '');
},
myThirdMethod:function(env, subject, args){
subject.third = args[0]._output(env, {}); // sub-babelute usage
}
});
//...
// then output sentence with your semantics
var output = myBabelute._output('foo:bar', {});
// => {first:true, second:'Hello John ! Greetings.', third:{ second:'Hello Biloud !' } }
More coming really soon.
The MIT License
Copyright (c) 2016 Gilles Coomans gilles.coomans@gmail.com
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.
FAQs
Internal Domain Specific (Multi)Modeling javascript framework
The npm package babelute receives a total of 18 weekly downloads. As such, babelute popularity was classified as not popular.
We found that babelute demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.