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]

Advertisements

Advanced Use Cases for the Repository Pattern in .NET

Jonathan Allen. InfoQueue. 2016-10-25.
In our previous article, Implementation Strategies for the Repository Pattern with Entity Framework, Dapper, and Chain, we looked at the basic patterns needed to implement a repository. In many cases these patterns were such a thin layer around the underlying data access technology they were essentially unnecessary. However, once you have a repository in place, many new opportunities become available.
When designing a repository, you should be thinking in terms of “what must happen”. For example, let us say you have a rule that whenever a record is updated, its “LastModifiedBy” column must be set to the current user. Rather than trying to remember to update the LastModifiedBy in application code before every save, you can bake that functionality right into the repository.
By treating your data access layer as a standalone library that manages all of the “must happen” details, you can dramatically reduce implementation errors. At the same time, you can simplify the code that is built on top of the repository, as it no longer needs to be concerned about bookkeeping tasks.
Note: where appropriate, this article will include code samples for Entity Framework, Dapper, and/or Tortuga Chain. However, you will find most repository features can be implemented in an ORM-agnostic fashion.
[Advanced Use Cases for the Repository Pattern in .NET]

Factory Patterns. Factory Method Pattern

Snesh Prajapati. CodeProject. 2016-10-02.
In this article we will understand Factory Method Pattern. This article is second part of Factory Patterns article series and is the continuation of Part 1: Simple Factory Pattern.
In this article we will understand Factory Method Pattern. This article is second part of Factory Patterns article series and is the continuation of Part1: Simple Factory Pattern. In first part we have learned Simple Factory Pattern. If you haven’t gone through the first part, I will suggest you to do so then continue with this article.
In first part we have seen how Simple Factory Pattern helps us in object creation and found some issues with Simple Factory Pattern. In this part we will learn how Factory Method Pattern resolves those issues and in which situation we should use Factory Method Pattern.

[Factory Patterns. Factory Method Pattern]

Factory Patterns. Simple Factory Pattern

Snesh Prajapati. CodeProject. 2016-09-25.
In this article series, we will learn about different factory design patterns. There are three kinds of factory design patterns, namely, Simple Factory Pattern, Factory Method Pattern and Abstract Factory Pattern.
In this article series, we will learn about different factory design patterns. There are three kinds of factory design patterns, namely, Simple Factory Pattern, Factory Method Pattern and Abstract Factory Pattern. We will understand these three patterns in detail by learning how to implement, when to implement and subsequently we will understand the differences between those. Simple Factory Pattern is not a part of Gang of Four (GoF) book but Factory Method Pattern and Abstract Factory Patterns are part of this standard book.
To keep the size of articles reasonable, this article series is divided into three parts.

[Factory Patterns. Simple Factory Pattern]

Open new Window from ViewModel in WPF MVVM

Rav! Srivastava. CodeProject. 2016-10-02.
Implementing Factory design pattern to open new Window from ViewModel in WPF MVVM.
I got several question posted on web “How to open new window from view model in MVVM pattern” and I have also encountered the same problem  at beginner level  after googling and learning design pattern got the solution of this problem  and  decided to write an article with deep discussion. In this article we are going to implement the Factory Design Pattern. It will provide a flexible and loosely coupled environment.

[Open new Window from ViewModel in WPF MVVM]

Introduction of Facade Design Pattern using C# with Real Life Example

Antariksh Verma. CodeProject. 2016-09-10.
In this article, we will look into the façade design pattern with the help of example using C#.
In this article, we will look into the façade design pattern with the help of an example using C#.
Façade is structural design pattern. It provides a unified interface to a set of interfaces in sub systems. Façade defines a higher level interface that makes it easy to use a subsystem.s

[Introduction of Facade Design Pattern using C# with Real Life Example]