📜 ⬆️ ⬇️

[Selection] Melchior.js, ng-admin, Hello.js, ineed

Melchior.js


Melchior.js (GitHub: voronianski / melchior.js , License: MIT , npm: melchiorjs ) from Dmitri Voronianski is an implementation of the chain definition modules (CMD) , a concept introduced by John Wu.
The idea behind the chained definitions of modules resolves some of the unpleasant moments of AMD, such as voluminous dependency declarations, and also provides simplicity and readability using a visually friendly and clear syntax.

Just as CommonJS is more suitable for an off-browser environment, chained definitions of modules with their requirements fit perfectly into in-browser usage scenarios.


Here is an example of using this software interface (API):

// create module melchiorjs.module('yourModule') // define dependencies .require('dependencyUno') .require('dependencyDuo', 'duo') // define module body .body(function () { // `dependencyUno` is available here! dependencyUno.doSomething(); // aliased `dependencyDuo` is available as `duo`! duo.doSomething(); // return methods for other modules return { method: function () { //... }, anotherMethod: function () { //... } }; }); 

')
The explanatory (readme) file contains more examples among which there is one for AngularJS . This program interface (API) looks more idiomatic than most modular boot loaders. It will be interesting to see if this product will become popular.

ng-admin


François Zaninotto has laid out information about ng-admin (GitHub: marmelab / ng-admin , License: MIT ), this is a cool project that adds an administration interface to your RESTful CRUD - program interaction interfaces (APIs).

You can find a demonstration of a project on Amazon and documentation that shows how to configure ng-admin for use with entities of your application. This solution is able to cope with the transformation (mapping) of fields and with relationships between entities. Links can be 1-N, N-1, and NM (many to many).

According to François, ng-admin is useful because if you create multiple projects with different backends (MongoDB, MySQL, Node, Python) you can still add a “platform-agnostic” administration interface.

The same author implemented gremlins.js .

Hello.js


Andrew Dodson posted information about hello.js (GitHub: MrSwitch / hello.js , License: MIT , npm: hellojs ), Client Development Kit (SDK) for authentication with OAuth2 (and OAuth1 through a proxy oauth ) web services and query execution to their REST API. This library is a unified interaction interface that normalizes the paths and responses for the Google Data , Facebook Graph and Windows Live Connect services.

One of the advantages of hello.js is its modularity. Here you can find modules for Dropbox , LinkedIn , SoundCloud , and Yahoo .

The programmatic interface (API) of the module will allow you to define such things as jsonp functions, so this should be flexible enough to cover most modern services.

Speech about HelloJS already came on Hacker News , with discussion of aspects of safety, and approvals from users:

HelloJS is good. I used it in my last project. It only works. It is well tested and documented. Customization does not look confusing. It just worked like clockwork when I tried to set up OAuth accounts for Twitter , Google , LinkedIn and Facebook .

ineed


Ivan Nikulin wrote about parse5 , saying that he has a new HTML-parser in SAX-style on which the project is ineed accordingly :

Ineed allows you to collect useful data from web pages using a simple and nice software interface. Let's collect images, links, scripts and styles from www.google.com :

 var ineed = require('ineed'); ineed.collect.images.hyperlinks.scripts.stylesheets.from('http://www.google.com', function (err, response, result) { console.log(result); }); 


Internally, ineed uses streams of HTML characters (tokens), so it does not waste time building and traversing the DOM tree. It looks like the perfect solution for handling many different, uncomfortable, selective tasks.

Marks


Here is a translation of two Alex Young articles. In the first article, and here is the second . Thanks for attention.

Source: https://habr.com/ru/post/237933/


All Articles