Designing a Web API – Introduction

These days, having back-end as a service and then using one sort of JavaScript frameworks have become a trend in developing web applications.

Apart from that, many service providers have had their SOAP web services to communicate with their customers and some are re-designing their API in REST-ful manner. Following a correct approach in designing the API is an important aspect of application architecture because consumers should be able to use the exposed api in a somehow standard way.

Read More

Modularizing JavaScript Code

Global Namespace Pollution

All JavaScript codes can run inside Global Execution Context. This means that if we define variables and functions at the global level, then the other codes can access them, no matter where they are and even if they are in different files.

<!DOCTYPE html>
<html lang="en">
    <head>
        <script type="text/javascript" src="file1.js"></script>
        <script type="text/javascript" src="file2.js"></script>
    </head>
    <body>
        <!-- body -->
    </body>
</html>
Read More

Higher-order Functions

In order to write great code in JavaScript or even understand frameworks written in this language, it’s vital to understand the meaning of “Higher-order Functions”.

Functions that operate on other functions, either by taking them as arguments or by returning them, are called higher-order functions.

Eloquent JavaScript

Read More