JavaScript Promise and Async/Await

async function always returns a promise. So, I added following promise example firstly.

Promise Examples

The following three examples are doing same job. I used function statement and arrow function in Promise.

Promise with Function Declaration(Function Statement)

Promise with Arrow Function

Async Examples

Async Function Declaration(Function Statement)

Async Function Expression

Async Arrow Function

Await Examples

Designing OOP Step by Step

I read Head First Design Patterns book shown as below. It is pretty good reference of Design Patterns. If you want to familiar of Design Patterns, i recommend it definitely. This post contains some examples of this book but in a different presentation. When I want to remember fundamentals of Design Patterns, this post will remind me 🙂 I hope that you will benefit from this post.

I will create a class diagram and implementation of it together. I will create a very simple class diagram and improve it step by step. That's why, I named Step 1, Step2 etc.

If you don't want to read all paragraphs, you just view class diagrams and code samples step by step. But, i heavily recommend to read and think of this post 🙂

Continue reading

LoopBack 3 – Simple API with Oracle Example

Expose your Oracle Database as a REST service with LoopBack 3 (Node.js Open API Framework)

This post is continuation of previous post

So if you want to start from beginning, read that one as well.

Follow this link to create a Oracle container 🙂

You can find LoopBack 3 project in the following repository. After clonning switch to oracle branch 🙂 or run the following command.

git checkout oracle