JavaScript IIFE (Immediately Invokable Function Expressions in JavaScript) Design Pattern

Mayank Gupta. CodeProject. 2017-06-15.
This post gives a small introduction about Singleton Pattern in JavaScript.
The post offer you more topics on Object Oriented JavaScript Design.
IIFE (Immediately Invokable Function Expression) is a important concept in JavaScript. it is a commonly used Design Pattern which is used to wrap set of variables and functions which cannot be accessed outside the enclosed scope.
These are Anonymous Function that is wrapped inside a set of paranthesis and is called immediately.
The common advantage of IIFE is that any “Function or Variable” defined inside IIFE, cannot be accessed outside the IIFE block, thus preventing global scope from getting polluted. Also helps us manage memory in an efficient manner.
In order to understand the concept of IIFE, we need to understand the difference between the following:
Function Definition
Function Expression

[JavaScript IIFE (Immediately Invokable Function Expressions in JavaScript) Design Pattern]

ember

Write dramatically less code with Ember’s Handlebars integrated templates that update automatically when the underlying data changes.
Don’t waste time making trivial choices. Ember.js incorporates common idioms so you can focus on what makes your app special, not reinventing the wheel.
Ember.js is built for productivity. Designed with developer ergonomics in mind, its friendly APIs help you get your job done—fast.

[ember]

Vue

Vue (pronounced /vjuː/, like view) 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.

[Vue]