• Example on using Angular UI Router nested views to build a clean solution

    Angular UI Router is the de-facto solution for single page applications and flexible routing in angular. It has many useful features such as nested views and states that can help us write clean code.
    A careful consideration on how we structure our application in nested states/views, and a thoughtful process of designing and structuring the state tree, can help us achieve a solid design and a clean architecture for our application.
    We are going to see a brief example on how to use the nested states feature to implement an elegant solution for the security of an application.



    read more ...
    Using Angular promise to wrap up an OAuth callback

    I am going to show how to wrap the OAuth callback flow with an Angular promise, and how that will help create a clean and maintainable code.



    read more ...
    ng-annotate and Angular Dependecy Injection In depth
    A typical Angular application contains many modules, each module is a collection of many components (controllers, directives, services, factories, ...).
    These modules depend on each other, and their components as well depends on other compoenents.
    Angular solves this dependencies with its Dependency Injection Subsystem.

    read more ...
    Angular best practices using NodeJS Style Modules
    As JavaScript applications tend to grow in size, the need to organize and structure our code become essentials.
    JavaScript modules was the answer to structure our code in a clean, maintainable, testable way.
    The purpose of this post is to show how to write clean Angular code, and how to structure it to be re-usable, testable using NodeJs style modules.

    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 ...