• Memoization in Python and JavaScript

    Memoization is a technique that is used a lot in Dynamic Programming and in general to speed up algorithms.
    Memoization is the same as caching but in functional programming. The Caching mechanism will store the data into a cache store, and that data can be from anywhere (HTTP page, REST call, … etc) , where memoization is specific to cache the results of a function, and it create and maintain the store inside the function itself (so the function will be pure function) and send the store as a parameter into the function arguments.



    read more ...
    Universal (Isomorphic) React Application. Beyond the basics.

    I decided to write this post, because I didn’t find any blog post, article, or a tutorial that will sum up for developers what the issues they are going to face when they build a universal application.
    If you googled a tutorial on how to build a universal react application, you will find a lot, but most of them are just covering the surface, hello-world examples. But as you go further, or even you decided to use one of the universal frameworks/boilerplate, you will start to face some issues and difficulties.



    read more ...
    Redux Vs. MVC, Why and How?

    In last two or three years, we started to see the rise of Redux-based (or Unidirectional data flow architecture in general) in the user interface side of the applications, and the slowly decline of MVC based architecture in the UI side.
    What Redux has of advantages over MVC, and what problems it solves? I am going to show what the benefits of Redux over MVC.
    Redux library by itself is not enough to build a whole system, and this is why there is an ecosystem developed around Redux. I am going to show the basic ecosystem needed to build a Redux application, or the essential building blocks of a any redux-based application.



    read more ...
    Arguably the best approach to create objects in JavaScript.

    Douglas Crockford expressed his preference on creating objects and inheritance in JavaScript In his lecture The Better Parts.
    In this lecture he expressed that although prototypal inheritance is better than classical inheritance, but the better is to avoid prototypal inheritance and avoid using this keyword, and instead he introduced a new pattern similar to factory function.
    His approach was backed by Eric Elliott in his lecture : Classical Inheritance is Obsolete.
    I am going to explain this approach and show some examples on how to use it.



    read more ...
    ES6 Classes : The good parts in depth

    ES6 provided many new features for OOP, and although most of them just syntactical sugar over the existing construction pattern, but they are a step ahead of creating objects from the existing features.
    I am going to show in this post why they are good pattern to use, and how they can fix many problems in the construction function pattern, and we will explain the OOP fundamentals in depth.



    read more ...
    ECMAScript 6 block-level scope and Javascript variable hoisting
    Block-level Scope, is one of the new feature that was added to ECMAScript 2015 (formerly known as ECMAScript 6).
    In ECMAScript 5 the only scope available to a variable is the function scope. So, the variable are seen in the whole function.

    read more ...
    Ajax, CORS, JSONP and the battle with Same-Origin Policy

    All modern browsers have a built-in security policy called Same-origin policy, which help mitigate many vulnerabilities and security flaws. This policy means the browser can only pull data from the same site.
    Same site means pages that share the scheme (http, ftp, https...), and the host name and the port.

    read more ...

    Some thoughts about Angular Vs. Knockout Vs. Backbone Vs Dojo's MVC
    What is annoying in JavaScript world, is that there is a new framework every day.
    I have been playing around with MVC frameworks, trying to find the pros and cons of each.
    I will try here to write some thoughts about my finding.

    read more ...
    Dojo's hitch in javascript/jQuery
    Dojo framework has a neat small utility called hitch.

    read more ...
    Using Dojo Inheritance to structure your ArcGIS JavaScript web application
    This is my first post related to ESRI JavaScript API to build map-based web applications.
    So, I am learning to use ArcGIS JavaScript API to build a map based application.

    read more ...
    JavaScript + Jasmine + JsTestDriver + CI Server
    If you want to write unit tests against your JavaScript code, and you want to automate the process of running those unit tests in your CI server,

    read more ...