JavaScript for Li...
tag "MapReduce"
485.9K views | +112 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:

## Popular Tags - Filter using the Funnel

Current selected tag: MapReduce. Clear.

## Searching using Array.prototype.reduce

Searching for a particular element in a JavaScript array is often carried out using a typical iteration. In some cases, forEach and some can be used as well. What is often overlooked is the potential use of Array.prototype.reduce to perform such an operation.

Let’s take a look at the following problem: find the longest string in an array of strings. An imperative solution looks something like the following code (usingforEach may simplify the loop but the idea remains the same): ...

A version which relies on reduce is a single statement: ...

No comment yet.

## Prime Numbers, Factorial, and Fibonacci Series with JavaScript Array

Instead of using loops, JavaScript Array object is quite powerful to create sequences. What about some more complex series and not just a list of consecutive numbers or letters? Fortunately, we still have other Array’s functions such filter, map, every, and reduce at our disposal. Those can be used to generate a list of prime numbers, compute the factorial, and produce the Fibonacci series.

No comment yet.

## Map Reduce Programming - Concise Definiton

Map-reduce is a programming technique to solve any aggregation-grouping-summation related problem, where we have huge amount of data and try to do the above operation in parallel in no of distributed machines.

In map function/s, we will collect the frequency of data after processing on some subset of data.

In reduce function/s, we will merge and aggregate the intermediate processed data from map function/s and can apply any other statistical formula on the result to make final output.

So the final result from map-reduce is a form of summery of raw data in repository before processing the data with map-reduce framework.

No comment yet.

## Introduction to Map and Reduce in Javascript

Recently I held a short lecture on the use of functions in Javascript, and how it’s possible to use functionality like map, reduce, filter and Javascript’s amazing variable context. I prefer to useunderscore.js so that I can use the wonderful functionality even on old browsers.

Lets start easy with _.map. Map is easy, what it does is take an input array, send each element into a function, and putting the result in a result array. The resulting array contains mapped versions of each element in the input array.

No comment yet.

## Single Page Application with Angular.js, Node.js and CouchDB (Cradle Module)

We have created a Proof of Concept with Javascript based web server, where we have focused on dealing with NoSql (CouchDB) with javascript based framework Node.js and angular.js on client side.
Software that is used:
* Angular.js for client side development – Single Page Application
* Cross Domain Communication in between Angular.js and Node.js
* Node.js for server side development
* Rest based web service creation with express.js
* Database – CouchDb
* Node.js Cradle Module Extention (to make communication with CouchDB)
* Making CouchDB views with Map-Reduce to fetch the data

No comment yet.