JavaScript for Li...
Follow
Find tag "ES6"
294.0K views | +657 today
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...
Scoop.it!

Emerging Patterns in JavaScript Event Handling

Emerging Patterns in JavaScript Event Handling | JavaScript for Line of Business Applications | Scoop.it

This article looks at the past, present, and future of event handling in JavaScript.

Developers had already been taking sides on whether it is still “mandatory” to have all the logic confined to script files, or if it is acceptable or even preferable to inline selected parts of this logic into HTML. In this post, we will try to sort out this debate, going through the different patterns for error handling, and then weighting pros and cons of these alternatives.

more...
No comment yet.
Scoop.it!

Array slices and membranes using ES6 proxies

Array slices and membranes using ES6 proxies | JavaScript for Line of Business Applications | Scoop.it

JavaScript’s dynamic nature, first-class functions and prototypes could always be used for elegant metaprogramming. Proxies let programmers further blur the line between the native, user defined objects and the host objects.

more...
No comment yet.
Scoop.it!

Dispatched and direct method calls in ECMAScript 5 and 6

Dispatched and direct method calls in ECMAScript 5 and 6 | JavaScript for Line of Business Applications | Scoop.it

There are two ways to call methods in JavaScript:

  • via dispatch, e.g. obj.someMethod(arg0, arg1)
  • directly, e.g. someFunc.call(thisValue, arg0, arg1)

This blog post explains how these two work and why you will rarely call methods directly in ECMAScript 6.

more...
No comment yet.
Scoop.it!

wu.js 2.0 - higher order functions for ECMAScript 6 iterators

wu.js 2.0 - higher order functions for ECMAScript 6 iterators | JavaScript for Line of Business Applications | Scoop.it

wu.js aims to provide higher order functions for ES6 iterables. Some of them you already know (filtersomereduce) and some of them might be new to you (reductions,takeWhile). wu.js works with all ES6 iterables, including Arrays, Maps, Sets, and generators you write yourself. You don't have to wait for ES6 to be fully implemented by every JS engine, wu.js can be compiled to ES5 with the Tracuer compiler.

more...
No comment yet.
Scoop.it!

Top 5 ES.next Features

Let’s have a look at my top 5 features that we can look forward to using next year. The ES6 spec is evolving even as I write this, so not everything I describe below may end up in the real world.

  • Classes
  • Proxies
  • Destructuring Assignments
  • Template Strings
  • Arrow Functions
  • Conclusion
more...
No comment yet.
Scoop.it!

The Basics Of ES6 Generators

The Basics Of ES6 Generators | JavaScript for Line of Business Applications | Scoop.it

One of the most exciting new features coming in JavaScript ES6 is a new breed of function, called a generator. The name is a little strange, but the behavior may seem a lot stranger at first glance. This article aims to explain the basics of how they work, and build you up to understanding why they are so powerful for the future of JS.

more...
No comment yet.
Scoop.it!

Single Page Applications with AngularJS 2.0

Push the limits of what’s possible on the web 
AngularJS, RequireJS , Polymer, AMD, ES6 , Gulp, Dependency Injection, JavaScript Patterns, Functional Reactive Programming, OAuth, Promises ,Generators

more...
No comment yet.
Scoop.it!

ES6 proxies -

ES6 proxies - | JavaScript for Line of Business Applications | Scoop.it
Get introduced to ES6 proxies by following along with this screencast where we imagine building clever atomic updates with the power of proxy middleware on objects.
more...
No comment yet.
Scoop.it!

Data-binding Revolutions with Object.observe()

Data-binding Revolutions with Object.observe() | JavaScript for Line of Business Applications | Scoop.it

Object.observe(), part of a future ECMAScript standard, is a method for asynchronously observing changes to JavaScript objects...without the need for a separate library. It allows an observer to receive a time-ordered sequence of change records which describe the set of changes which took place to a set of observed objects.

With Object.observe() you can implement two-way data-binding without the need for a framework.

That’s not to say you shouldn’t use one. For large projects with complicated business logic, opinionated frameworks are invaluable and you should continue to use them. They simplify the orientation of new developers, require less code maintainance and impose patterns on how to achieve common tasks.


more...
No comment yet.
Scoop.it!

The Web's Declarative, Composable Future.

The Web's Declarative, Composable Future. | JavaScript for Line of Business Applications | Scoop.it

The way that languages in the web platform evolve are in direct response to the pain caused by complexity. Pain is generally a bad thing and so it’s with better patterns and platform primitives that we can ease some of this complexity in the browser. Complexity on its own can take lots of forms, but when we look at the landscape of how developers have been building for the web over the last few years, common patterns can be one the most obvious things worth considering baking in solutions for. Layering the platform as part of the extensible web manifesto has been hugely helpful in making this possible

This year, the platform is getting Web Components, bringing forward a way to make the relationships between markup and behaviour a lot less vague when you’re looking at the HTML. In one word, a future with Web Components is declarative.

more...
No comment yet.
Scoop.it!

List of ECMAScript 6 shims

List of ECMAScript 6 shims Implemented on top of ECMAScript 5 - Links to every available shim for ES5 to ES6 features.

more...
No comment yet.
Scoop.it!

Javascript ES6: Learn important features in a few minutes

Javascript ES6: Learn important features in a few minutes | JavaScript for Line of Business Applications | Scoop.it

The next-generation of javascript also known as ECMAScript 6 (also called ES6 or Harmony), is bringing us lots of amazing features that you probably will need to know. But instead of you spend too much time learning and researching all of the features I separated a few that I felt are the ones you’ll be probably using in your daily basis.

Don’t worry if you are new to javascript or you’re coming from a server-side language, I believe this is the best time to learn it as ES6 has a much cleaner and friendlier syntax, known as sugar syntax.

more...
No comment yet.
Scoop.it!

Dart, AngularDart & ES6

Dart, AngularDart & ES6 | JavaScript for Line of Business Applications | Scoop.it

Why Dart?
Why should I learn a new language?
Why put in the time?
Aren't there enough programming languages out there?
The answer is yes and no

Too much heavy lifting
Developers create missing features by making their own
Too much time and effort goes into doing this
JavaScript is too unfamiliar to non-JS programmers
CoffeeScript, ClojureScript & TypeScript

What is JavaScript lacking?
Solid programming structures (Sets, Maps, Classes)
On a low level
A consistent means of developing applications
Dart is a great stepping stone

...

more...
No comment yet.
Scoop.it!

Taming the Asynchronous Beast with CSP in JavaScript

Taming the Asynchronous Beast with CSP in JavaScript | JavaScript for Line of Business Applications | Scoop.it

I think things can be simplified to a single abstraction since the underlying problem to all of this is the same. I present to you CSP and the concept of channels. CSP has been highly influential in Go and recently Clojure embraced it as well with core.async. There's even a C version. It's safe to say that it's becoming quite popular (and validated) and I think we need to try it out in JavaScript. I'm not going to spend time comparing it with every other solution (promises, FRP) because it would take too long and only incite remarks about how I wasn't using it right. I hope my examples do a good enough job convincing you themselves.

Jan Hesse's insight:

Communicating sequential processes

more...
No comment yet.
Scoop.it!

Advanced objects in JavaScript

Advanced objects in JavaScript | JavaScript for Line of Business Applications | Scoop.it

This posts looks beyond everyday usage of JavaScript’s objects. The fundamentals of JavaScripts objects are for the most part about as simple as using JSON notation. However, JavaScript also provides sophisticated tools to create objects in interesting and useful ways, many of which are now available in the latest versions of modern browsers.

Contents:

  • getters and setters
  • defineProperty
  • defineProperties
  • Object.create
  • sealing objects, freezing them and preventing extensibility
  • valueOf and toString
  • Symbol
  • Proxy
more...
No comment yet.
Scoop.it!

Composable Generators in Javascript

Composable Generators in Javascript | JavaScript for Line of Business Applications | Scoop.it

Since it is Node.js, every action you do that touches the database or file system really wants to be asynchronous. I started by using promises with the Bluebird library, and it was okay for simple cases. However, the code became very hard to follow when I started chaining more than 3-4 operations together. Just this week I finally got a chance to try out the usage of the new ES6 generators feature with my codebase in the places where I was having to combine so many asynchronous operations and I’m very happy with the results so far.

To my eyes, generators are a big improvement in readability over promises. Consider two versions of the same method from my event store library.

more...
No comment yet.
Scoop.it!

Using ECMAScript 6 today

Using ECMAScript 6 today | JavaScript for Line of Business Applications | Scoop.it

ECMAScript 6 (ES6) still sounds like something from a far-away future. After all, it will only become a standard by mid 2015. However, its features are continually appearing in browsers and there are compilers that translate ES6 code to ES5 code. The latter is already a compelling solution, because the ECMAScript 6 feature set is already frozen.

This blog post gives a brief overview of ECMAScript 6 features and describes tools that enable you to use them today.

more...
No comment yet.
Scoop.it!

An introduction to ES6 classes.

An introduction to ES6 classes. | JavaScript for Line of Business Applications | Scoop.it

ES6 classes are syntactical sugar over the Objects and prototypes that we're used to working with. They simply offer a much nicer, cleaner and clearer syntax for creating these objects and dealing with inheritance.

To show this in action we're going to build our own small (and very simplified) framework for building web applications to demonstrate using classes. We're going to have two classes, one to represent a view, and another to represent a model. 

more...
No comment yet.
Scoop.it!

ES6Rocks - Articles and News about ECMA6

ES6Rocks - Articles and News about ECMA6 | JavaScript for Line of Business Applications | Scoop.it

The mission here is to discuss about JavaScript's next version , aka Harmony or ES.next.

ES6 is awesome, and is coming soon.
You can use it today, and you can learn it today!
The main mission here is to discuss everything about ES6, and help everyone to start learning.

more...
No comment yet.
Scoop.it!

JavaScript Modules

The next version of JavaScript comes with a module system heavily inspired by Node.js modules.
Here’s how it works.

more...
No comment yet.
Scoop.it!

Six technologies that will change the web platform

1. asm.js: near-native performance on the web
2. ParallelJS: parallelized JavaScript code
3. ECMAScript 6: evolving the language, uniting the community
4. CSS Grid Layout: native-like GUI layout
5. Installable web apps: install web apps natively
6. Web Components: a standard infrastructure for widgets

more...
No comment yet.
Scoop.it!

Getting Started with ES6 Modules

Getting Started with ES6 Modules | JavaScript for Line of Business Applications | Scoop.it

An amazing omission in Javascript’s design is the lack of a built-in module system. As more projects used Javascript and shared more code, the need for a robust module system became necessary. Two contenders sprung up, Asynchronous Module Definition (AMD) and CommonJS (CJS). The former is much more popular with browser applications and the latter is much more popular with server applications written in node.js.

Having two major standards for defining modules led to a technological holy war in the Javascript community akin to the vim/emacs arguments of the editor world. It wasn’t pretty.

Fortunately, there is light at the end of the tunnel.

more...
No comment yet.
Scoop.it!

Generators in Node.js: Common Misconceptions and Three Good Use Cases

Generators in Node.js: Common Misconceptions and Three Good Use Cases | JavaScript for Line of Business Applications | Scoop.it

Generators have been all the rage lately. Many Node developers (including myself!) are excited and intrigued about writing their asynchronous code like this:

var a = yield doAsyncFn()
var b = yield doAyncFnThatDependsOnA(a)
console.log(b)


However, this is just one use case (although a clever one) of using generators.

In this article, we will explore the strengths of using generators. 


Now that I can suspend functions, I can run all this stuff in parallel right? No. JavaScript is still single-threaded, but now we have the ability to say STOP in the middle of a function.

If you are looking to bolster raw performance, generators may not be your ticket. Here’s a sample CPU intensive task, calculating a Fibonacci sequence number:

more...
No comment yet.
Scoop.it!

Rewriting A WebApp With ECMAScript 6

Rewriting A WebApp With ECMAScript 6 | JavaScript for Line of Business Applications | Scoop.it

Today it’s possible for us to author in ES6 and transpile our sources down to ES5 at build-time, regardless of whether we’re using GruntGulp or Broccoli. With projects like Ember and Angular looking to ES6 as part of their roadmaps too (Ember App Kit already supports ES6 modules!), now is a great time to learn how ES6 can be used in practice.

In this guide, we’ll re-write the well known TodoMVC application (implemented withBackbone.js) using ECMAScript 6 language semantics. The implementation is made possible using Google’s Traceur compiler and ES6-Module-Loader.

If you haven’t come across these tools before, Traceur is a JavaScript.next-to-JavaScript-of-today compiler that allows you to use features from the future today and the ES6 Module Loader dynamically loads ES6 modules in Node.js and current browsers. If you’re wondering whether Traceur is ready for production-level apps, Erik Arvidsson recently answered this on their mailing list.

more...
No comment yet.
Scoop.it!

Thoughts On JavaScript Generators

Thoughts On JavaScript Generators | JavaScript for Line of Business Applications | Scoop.it

When anyone complains about the pain of callback functions, the usual recommendation is to use promises. Promises have been around for a number of years and there are a variety of promise libraries available for both Node and client scripting environments, with Q being a popular package for node.

Promises are useful, particularly when they destroy a pyramid of doom. But promises can’t un-butcher the code sliced into functions to meet the demands of an asynch API. Also, promises require shims to transform a function expecting a callback into a function returning a promise, which is what Q.nfcall will do in the following code.

ECMAScript 6 (a.k.a Harmony) introduces the yield keyword. Anyone with some programming experience in C# or Python (and a number of other languages, except Ruby) will already be familiar with how yield can suspend execution of a function and return control (and a value) to the caller. At some later point, execution can return to the point just after yield occurred. In ES6, functions using the yield keyword are known as generator functions and have a special syntax (function*), as the following code demonstrates...

more...
No comment yet.