top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

    Get Free Article Updates

Facebook Login
Site Registration
Print Preview

Small Discussion About Task.Js?

0 votes
54 views

What is Task.js?

Task.js is an experimental library for ES6 that makes sequential, blocking I/O simple and beautiful, using the power of JavaScript's new yield operator. Tasks are interleaved like threads, but they are cooperative rather than pre-emptive: they block on promises with yield 

One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js to automate everything with minimum effort.

./task.js provides the structure, order, and authority that you as a developer so desperately crave. ./task.js will also take responsibility for your actions if you need it to. It's what everybody is using now. ./task.js is the new hotness. It's all about ./task.js now, just like that.

This is compared to npm run/bash scripts, which are:

  • scary
  • not cross-platformant for deploying to windows server 2003
  • old news. Nobody uses bash these days.

The power of task.js comes from ES6 generators, which are currently only available in Firefox. You can try it out in Firefox, although there are a few remaining incompatibilities with the current ES6 spec (which is still a work in progress).

Here’s a “hello world” of tasks that will work in Firefox:

<script type="application/javascript" src="task.js"></script>

<!-- 'yield' and 'let' keywords require version opt-in -->
<script type="application/javascript;version=1.8">
function hello() {
    let { spawn, sleep } = task;
    spawn(function() {      // Firefox does not yet use the function* syntax
        alert("Hello...");
        yield sleep(1000);
        alert("...world!");
    });
}
</script>

 

posted Feb 10 by Manish Tiwari

  Promote This Article
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button


Related Articles

What is Mithril.Js ?

Mithril is a new javascript MVC framework that aims to make application development more manageable than the “jQuery spaghetti” that is common in legacy systems, and is without the need for steep learning curves that one would encounter with big frameworks like Ember or Angular.

Mithril is a modern client-side Javascript framework for building Single Page Applications.It's small (< 8kb gzip), fast and provides routing and XHR utilities out of the box.

Mithril is used by companies like Vimeo and Nike, and open source platforms like Lichess.

Mithril supports browsers all the way back to IE9, no polyfills required.

The Mithril.js authors are onto something with their tiny (7KB gzipped), easy-to-learn JavaScript MVC library that was originally released in March of 2014 and now has 92 contributors on GitHub. The entire API is just 14 functions and the library is under a thousand lines of code. 

Mithril gives you hierarchical MVC components (just like React), URL routing, customizable data binding, and safe-by-default templates with intelligent DOM difference checking for high-performance rendering.

Video for Mithril.Js

https://www.youtube.com/watch?v=tNMiCr39Fx0​

READ MORE

What is Vue.js?

Vue is a library that focuses heavily on the ViewModel—the two-way data bindings that tie what we see and interact with on the screen with the application's data model.

Vue is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is very easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.

Features:

  • Declarative rendering with a plain JavaScript object based reactivity system.
  • Component-oriented development style with tooling support
  • Lean and extensible core
  • Flexible transition effect system
  • Fast without the need for complex optimization

 

Video for Vue.js

https://www.youtube.com/watch?v=DsuTwV0jwaY​

READ MORE

What is Dimple ?
The aim of dimple is to open up the power and flexibility of d3 to analysts. It aims to give a gentle learning curve and minimal code to achieve something productive. It also exposes the d3 objects so you can pick them up and run to create some really cool stuff.

Dimple is a library to aid in the creation of standard business visualisations based on d3.js.

The dimple api uses a handful of fundamental objects for chart creation. This is a deviation from the functional chaining pattern of d3, however it should be familiar to those of you coming from many other commercial charting applications.

To allow you to tinker with the inner workings, dimple exposes all its methods and properties. However it is highly recommended that you stick to the stuff that's supposed to be public, therefore any properties or methods which do not form part of the official public API will be prefixed with an underscore (_).

Example Code

var chart = new dimple.chart(svg, data);
chart.addCategoryAxis("x", "Region");
chart.addMeasureAxis("y", "Volume");
chart.addSeries("Brand", dimple.plot.bar);
chart.draw();

 

Video for Dimple.Js

https://www.youtube.com/watch?v=vuxN6EC_gso​

READ MORE

What is Chart.Js

Chart.js is a JavaScript library that allows you to draw different types of charts by using the HTML5 canvas element. Since it uses canvas , you have to include a polyfill to support older browsers.

The library doesn’t have dependencies and its weight is very low as it’s ~11kb in size when minified, concatenated, and served gzipped. However, you’re able to reduce the size even further, if you don’t use all six of the core chart types, by including only the modules you need. So, let’s say that you only need to draw a bar chart in your website, you can include the core and the bar module and save bandwidth for your users.

Another cool feature of Chart.js is that the charts are responsive, so they will adapt based on the space available. Finally, unlike many libraries you can find on the web, it provides extensive and clear documentation that makes using its basic features as well as its advanced options very easy.

Installation Steps

npm

npm install chart.js --save

bower

bower install chart.js --save

For Getting Started

<script src="Chart.js"></script>
<script>
    var myChart = new Chart({...})
</script>

Video for Chart.js Introduction

https://www.youtube.com/watch?v=g_mRDvv1g88

 

READ MORE

What is Raphael?

Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web.

Raphaël uses the SVG W3C Recommendation and VML as a base for creating graphics.

This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later.

Raphaël’s goal is to provide an adapter that will make drawing vector art compatible cross-browser and easy.

Raphaël is used by first creating an instance of the Raphaël object, which manages the creation of the canvas.

Raphaël currently supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+.

Why use Raphael.js?

It is also possible to create animations using HTML5 Canvas. HTML5 Canvas uses bitmap graphics and excels at processing complicated animations like flying past stars in outer space.

In contrast, Raphael.js uses SVG vector images and is designed to seamlessly integrate with on page events such as clicking, hovering, and dragging. Moreover, Raphael.js provides great legacy browser support (including IE7 and IE8).

How to start?

You can simply include raphael.js file in html and you will start use.

For example:

<script type="text/javascript" src = "https://raw.githubusercontent.com/DmitryBaranovskiy/raphael/master/raphael.js"></script>

Full HTML Example Code

<!doctype html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Raphaël Simple Example</title>    
   <script type="text/javascript" src = "https://raw.githubusercontent.com/DmitryBaranovskiy/raphael/master/raphael.js"></script>
  </head>
  <body>

    <!-- the html element where to put the paper -->
    <div id="paper1"></div>

    <!-- a script that create's a paper and a rectangle -->
    <script type="text/javascript">
    var paper = Raphael("paper1", 500,500);
    var rect1 = paper.rect(20,30,100,12).attr({fill: "orange"});
    </script>

  </body>
</html>

Video Tutorial

https://www.youtube.com/watch?v=IPy77zMsd0Y

READ MORE

What is Montage Js?

MontageJS is an open-source JavaScript framework for building scalable single-page applications. Its aim is to simplify the development and maintainability of expressive HTML5 applications by employing many of the foundations of proven native application frameworks.

MontageJS is a modern frontend HTML5 framework that supports creating single-page applications—fast. MontageJS uses time-tested design patterns and software principles, allowing you to easily create a modular architecture for your projects and deliver a high-quality user experience.

This allows designers and developers to work collaboratively and quickly. MontageJS is easy to learn because it is closely aligned with the underlying design of the Web, complementing existing standards.

Montage builds on ECMAScript 5, HTML5, and the CommonJS module system popularized by Node.js. It provides the functionality to build graphical user interfaces providing access to both a set of opinionated UI components as well as standard DOM interface components.

Montage also comes with a command line tool that translates a developer-optimized experience into a user-optimized experience called Mop

Requirements for Montage JS

1)Node.js and npm. MontageJS application development depends on npm, which is distributed with Node.js.
2)A recent stable release of Chrome, Safari or Firefox. MontageJS is intended to leverage the evolving web platform of modern browsers.

Features

1)Build engaging applications
2)Work faster together
3)Iterate quickly with modular design
4)Experience instant feedback
5)Collaborate with GitHub
6)Leverage MontageJS

What is Montagejs Video tutorial

https://www.youtube.com/watch?v=CeuG2zptrtM&list=UUKzsAXNDHm25VtXiWVYe8PA

READ MORE

What is Browserify ?

Browserify (in the simplest use case) looks at a single JavaScript file, and follows the require dependency tree, and bundles them into a new file. It does this using the Common JS require pattern, just like Node, and enables you to require packages installed via NPM

Browserify allows us to use node.js style modules in the browser. We define dependencies and then Browserify bundles it all up into a single neat and tidy JavaScript file. You include your required JavaScript files using require('./yourfancyJSfile.js') statements and can also import publicly available modules from npm.

Browserify will recursively analyze all the require() calls in your app in order to build a bundle you can serve up to the browser in a single <script> tag.

Browserify lets you require('modules') in the browser by bundling up all of your dependencies.

Npm Install Syntax:

npm install -g browserify

View more about browserify - http://browserify.org/

Video for Browserify

https://www.youtube.com/watch?v=CTAa8IcQh1U

READ MORE
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...