JavaScript for Line of Business Applications
597.6K views | +0 today
Follow
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...

Popular Tags - Filter using the Funnel

Current selected tag: 'functional programming'. Clear
Scoop.it!

Functional data structures in JavaScript with Mori

I have a long-standing desire for a JavaScript library that provides good implementations of functional data structures. Recently I found Mori, and I think that it may be just the library that I have been looking for. Mori packages data structures from the Clojure standard library for use in JavaScript code.

A functional data structure (also called a persistent data structure) has two important qualities: it is immutable and it can be updated by creating a copy with modifications (copy-on-write). Creating copies should be nearly as cheap as modifying a comparable mutable data structure in place. This is achieved with structural sharing: pointers to unchanged portions of a structure are shared between copies so that memory need only be allocated for changed portions of the data structure.

No comment yet.
Scoop.it!

A Gentle Intro to Monads in JavaScript

A Gentle Intro to Monads in JavaScript | JavaScript for Line of Business Applications | Scoop.it

Monads: they're incredibly useful, and also maybe a little intimidating. Beginner functional programmers often cringe when they hear the term. JavaScript legend Douglas Crockford once said that monads are cursed – that once you understand monads for yourself you lose the ability to explain them to others. In the programming language F#, monads are called “computational expressions” mostly so people aren’t scared away.

But I think all this fear and mysticism around the dreaded “M-word” need not be so. So in this post, I’m going to attempt to put a small crack in the curse, not by attempting to explain all of monad theory in general, but instead by thoroughly diving into a concrete example of a monad in a specific language: the Maybe monad in JavaScript[1].

If you’ve been putting off learning about monads – or maybe have never even heard of them until now – then this post is for you. It will provide just enough material to give you a sense of what monads are and what they can do. From there you should have a solid stepping off point from which you can jump into reading something like this without trepidation.

No comment yet.
Scoop.it!

Functional Refactoring in JavaScript

Functional Refactoring in JavaScript | JavaScript for Line of Business Applications | Scoop.it

When discussing functional programming we often talk about the machinery, and not the core principles. Functional programming is not about monads, monoids, or zippers. It is primarily about writing programs by composing generic reusable functions. This article is about applying functional thinking when refactoring JavaScript code.

No comment yet.
Scoop.it!

LispyScript - A javascript With Lispy Syntax And Macros!

An inherent problem with Javascript is that it has no macro support, unlike other Lisp like languages. That's because macros manipulate the syntax tree while compiling. And this is next to impossible in a language like Javascript.

In LispyScript we write Javascript in a tree structure. If you know Javascript and a Lisp like language, then using LispyScript will be a breeze. Even if you don't know a Lispy Language, all you need to learn is to write code in a tree structure.

No comment yet.
Scoop.it!

Applicative Programming In JavaScript With lodash.js

Applicative Programming In JavaScript With lodash.js | JavaScript for Line of Business Applications | Scoop.it

n general, applicative programming is the pattern of defining a function that takes a function and then invokes that function for each element in a collection/list. To apply this definition of applicative programming to JavaScript, you will need to know a little something about first-class functions before we dive in. So, let's start there.

JavaScript has first class functions. This means that instances of the Function constructor can go and do anything any value in the language can do because functions in JavaScript are values.

No comment yet.
Scoop.it!

Partial Application in JavaScript

Partial Application in JavaScript | JavaScript for Line of Business Applications | Scoop.it

Unless you've used a functional programming language such as ML or Haskell, concepts such as partial application and currying may be foreign to you. Since JavaScript supports first-class functions, once you understand these concepts, you can put them to use in your code.

Whether writing code just for yourself or presenting an API to your users, it's often helpful to create a more specialized function as a "wrapper" to a more generalized function if you expect to be performing a task repetitively. One way to do this would be to just define the functions manually.

Jan Hesse's insight:

more current post at: http://benalman.com/news/2012/09/partial-application-in-javascript/

Mickael Ruau's curator insight, October 9, 2013 5:28 AM

Concepts de programmation  fonctionnelle utilisables en javascript.

Oriol Lluch's curator insight, October 15, 2013 4:19 PM

Great Article to understand the concept behind functions in Javascript