[Translation] Node News: Tint, Redbird

Original author: Alex Young
  • Transfer

Tint


image

Today we can ascertain the rise of such a sub-area of ​​node-oriented development as writing desktop applications on node-webkit or similar frameworks. The idea of ​​this approach looks quite simple: we pack the Node runtime together with a small program that is designed to launch your Node application as if it were native, desktop.



Tint is an alternative. It uses a modified version of Node , tied to native components, this implies that you can develop native osx * components , such as windows, buttons, built-in web view, dialogs and much more, when developing in JavaScript .

Companyinvolved in this project, releases it under the MIT license. If you are an Objective-C developer, you might find Main_mac.mm interesting , it is an integration of Node event loops with Objective-C ++ .

I compiled this whole thing from the source and created a small test application in order to look at what the Tint APIs look like.

require('Application');
var Window = require('Window');
var Button = require('Button');
var mainWindow = new Window();
var button = new Button();
mainWindow.title = 'DailyJS';
button.title = 'Hello';
button.addEventListener('mousedown', function() {
  button.title = '^_^';
});
button.addEventListener('mouseup', function() {
  button.title = 'Hello';
});
mainWindow.appendChild(button);
mainWindow.addLayoutConstraint({
  priority: 'required',
  relationship: '=',
  firstItem: button,
  firstAttribute: 'top',
  secondItem: mainWindow,
  secondAttribute: 'bottom',
  multiplier: 0.0,
  constant: 0.0
});
setInterval(function() {
  button.title = Math.random();
}, 1000);

I ran the script with the help ./build/Release/tint example.jsand got a window with a button. I wrote this script looking at test cases in order to get acquainted with the functionality.

It seems to me that this is a cool project and I really would like to run a real osx application using Tint, but today I have no idea how to build my project so that the final users do not have the bugs with installing my application. I will continue to play with this framework and try to write a more detailed help if I find anything useful.

Redbird


Another project for today is Redbrid , available under the BSD license and known in npm as redbird . This project is a reverse proxy for working with virtual dynamic hosts, load balancing, proxying web sockets and SSL encryption.

var proxy = require('redbird')({port: 80});
// Route to any global ip
proxy.register('optimalbits.com', 'http://167.23.42.67:8000');
// Route to any local ip, for example from docker containers.
proxy.register('example.com', 'http://172.17.42.1:8001');


The project documentation includes a complete example with SSL encryption and the authors plan to support load balancing ** and filtering by IP address.

Translator Notes


* At the time of writing, Tint worked only with osx, support for other operating systems was only planned.
** Probably we are talking about incomplete support with subsequent improvement.

Also popular now: