Java 8 Stream.collect() – Stream.Collectors APIs Examples


Java 8 provides an extremely powerful abstract concept Stream with many useful mechanics for consuming and processing data in Java Collection. In the tutorial, We will do lots of examples to explore more the helpful of Stream API with Collectors operation on the specific topic: “Java 8 Stream Collector”.

What will we do?

  • Explore Stream Collect Method signatures
  • Apply Stream Collectors Util with Examples

Now let’s do more details!

Related posts:
Java 8 Stream Reduce Examples
Java 8 Stream FlatMap Examples

[Continue reading…] “Java 8 Stream.collect() – Stream.Collectors APIs Examples”

Angular 8 Firebase tutorial: Integrate Firebase into Angular 8 App with @angular/fire

Firebase is a mobile and web application development platform developed by Google. We can build our apps very fast, without making complex back-end system. It helps to scale automatically, for even the largest apps. In this Angular 8 Firebase tutorial, we’re gonna integrate Firebase into Angular 8 App with @angular/fire module (official library for Firebase and Angular).

[Continue reading…] “Angular 8 Firebase tutorial: Integrate Firebase into Angular 8 App with @angular/fire”

How to use Java 8 Stream Reduce Examples with List and Array


Java 8 provides an extremely powerful abstract concept Stream with many useful mechanics for consuming and processing data in Java Collection. In the tutorial, We will do lots of examples to explore more the helpful of Stream API with reduction operation on the specific topic: “Java 8 Stream Reduce Collection”.

What will we do?

  • Explain how Java 8 Stream Reduce work?
  • Apply Stream Reduction on Java List, Array

Now let’s do examples for more details!

Related posts:
Java 8 Stream FlatMap Examples
Stream Filter in Java 8

[Continue reading…] “How to use Java 8 Stream Reduce Examples with List and Array”

Ways to implement Proxy Pattern in Node.js

Sometimes we may want to access indirectly to an object, via a substitute. That substitute is called Proxy. The Proxy Pattern helps us deal with a proxy object and talk to the actual object. In this tutorial, we’re gonna look at 2 ways to implement Proxy Pattern in Node.js:

  • Using custom Proxy Class
  • Using Proxy API

[Continue reading…] “Ways to implement Proxy Pattern in Node.js”

How to use Java 8 Stream FlatMap Examples with List, Array


In the tutorial, we will discover more aspect of Java 8 Stream API with flatMap() function by lots of examples.
What we will do:

  • Explain how Java 8 Stream FlatMap work?
  • Apply Stream FlatMap on Java List, Array

Now let’s do more details!

Related posts:
Java 8 Stream Map Examples
Java 8 Stream Filter Examples

[Continue reading…] “How to use Java 8 Stream FlatMap Examples with List, Array”

How to implement Dependency Injection in Node.js with Example

Dependency Injection is one form of Inversion of Control technique that supports the Dependency Inversion principle (the last one of SOLID Principles – decoupling software modules). In this tutorial, we’re gonna look at way to implement Dependency Injection pattern in Node.js.

[Continue reading…] “How to implement Dependency Injection in Node.js with Example”

How to use Java 8 Stream Map Examples with a List or Array


Converting or transforming a List and Array Objects in Java is a common task when programming. In the tutorial, We show how to do the task with lots of Java examples code by 2 approaches:

  • Using Traditional Solution with basic Looping
  • Using a powerful API – Java 8 Stream Map

Now let’s do details with examples!

Related posts:
Java 8
Java 8 Streams

[Continue reading…] “How to use Java 8 Stream Map Examples with a List or Array”

How to implement Builder Pattern in Node.js

When we want to create complicated object which has multiple parts, we can use Builder Pattern that separates the building of these parts. This creational process does not care about how these parts are assembled.

In this tutorial, we’re gonna look at 2 ways to implement Builder Pattern in Node.js:

  • using Builder function
  • using Builder class

[Continue reading…] “How to implement Builder Pattern in Node.js”

Java – How to use Stream Filter in Java 8 with List & Array Examples


Java 8 provides an extremely powerful abstract concept Stream with many useful mechanics for consuming and processing data in Java Collection. In the tutorial, We will use lots of examples to explore more the helpful of Stream API with filtering function on the specific topic: “Filter Collection with Java 8 Stream”.

What will we do?

  • How to filter List with traditional approach?
  • Use Java 8 Stream to filter List and Array Objects
  • Apply filter() function with other util functions of Stream API in practice

Now let’s do examples for more details!

Related posts:
Java – How to find an element in a Java List Object by Examples
Java 8 Streams

[Continue reading…] “Java – How to use Stream Filter in Java 8 with List & Array Examples”

How to implement simple Factory Pattern in Node.js

Instead of using class constructors or new keyword to create an object of a class, we can abstract this process. So, we can determine the type of object at run-time, by the time of generating that class object. The implementation seems like Factory Method, but simpler than Factory Method. This simple Factory is not treated as a standard GoF design pattern, but the approach is common to any place where we want to separate the code that varies a lot from the code that does not vary.

In this tutorial, grokonez shows you how to do it in NodeJs.

[Continue reading…] “How to implement simple Factory Pattern in Node.js”

How to implement Singleton in Node.js

Singleton is object that can have only a single, unique instance, with a single point of access. Node.js module system provides simple way to implement Singleton using module.exports. Module will be cached when it is accessed using require() statement. So our module is merely a cached instance although it behaves like a Singleton.

In this tutorial, we’re gonna look at ways to implement this kind of Singleton in Node.js:

  • Singleton Object
  • Singleton Class

[Continue reading…] “How to implement Singleton in Node.js”