Sandeep is a web developer and writer with a passion for Java, JavaScript and HTML5. He has 4+ years of experience programming for the web. He always loves experimenting with new technologies as they emerge and his current love interest is AngularJS. While not programming, Sandeep can be found playing games and listening to music.

Sandeep's articles

  1. Understanding Knockout

    KnockoutJS is an elegant JavaScript library based on Model-View-ViewModel pattern that helps us create rich user interfaces effortlessly. If you are developing an application with sections that update dynamically whenever the underlying data model changes, then Knockout can really help you. The two way data binding and templating features in Knockout make the process of implementing dynamic views a breeze. This tutorial will get you started with Knockout, and show you how to use it in your own projects.

  2. Creating a Typeahead Widget with AngularJS

    If you are starting an AngularJS project you might want to have all the components written in Angular. Although it’s certainly possible to reuse the existing jQuery plugins, throwing a bunch of jQuery inside a directive is not always the correct way to do things. My advice would be to first check if the same thing can be implemented with pure Angular in a simpler/better way. This keeps your application code clean and maintainable. This tutorial, targeted towards beginners, walks the readers through the creation of a simple TypeAhead widget with AngularJS.

    Overview

    In this tutorial we are going to build a simple TypeAhead widget which creates suggestions as soon as someone begins typing into a text box. We will architect the app in such a way that the final product will be very configurable and can be plugged into an existing system easily. The basic steps involved in the creation process are:

    • Create a factory that interacts with a RESTful API, and returns JSON that will be used for auto complete suggestions.
    • Create a directive that will use the JSON data and encapsulate the typeahead input field.
    • Keep the directive configurable so that end users can configure the following options.

    Configuration Options

    1. The exact JSON object properties to show as part of the suggestions.
    2. The model in the controller’s scope that will hold the selected item.
    3. A function in the controller’s scope that executes when an item is selected.
    4. A placeholder text (prompt) for the typeahead input field.
  3. Creating a Slide Show Plugin With AngularJS

    Gone are the days when you used to write hundreds of lines of jQuery to create a custom image slider! It’s time to go Angular and achieve the same goal with smaller, simpler code. This tutorial will show how to create a slide show plugin with AngularJS. We will use Angular directives and animations to […]

  4. A Practical Guide to AngularJS Directives

    This entry is part 1 of 2 in the series A Practical Guide to AngularJS Directives

    This entry is part 1 of 2 in the series A Practical Guide to AngularJS DirectivesDirectives are the most important components of any AngularJS application. Although AngularJS ships with wide range of directives, you will often need to create application specific directives. This tutorial will give an overview of custom directives and explain how to […]

  5. A Deeper Dive Into JavaScript Promises

    My previous article on the new JavaScript Promise API discussed the basics of Promises, error handling, and chaining concepts. It is often necessary to chain Promises together to queue asynchronous operations. But, many times we need to track the order of completion of each task to perform next operations accordingly. As asynchronous tasks can complete […]

  6. An Overview of JavaScript Promises

    Well, this has come like a Christmas gift to all JavaScript developers. You will be glad to know that Promises are now a part of standard JavaScript. Chrome 32 beta has already implemented the basic Promise API. The concept of Promises is not new to web development. Many of us have already used Promises in […]

  7. Unit and End to End Testing in AngularJS

    Unit testing is a technique that helps developers validate isolated pieces of code. End to end testing (E2E) comes into play when you want to ascertain that a set of components, when integrated together, work as expected. AngularJS, being a modern JavaScript MVC framework, offers full support for unit tests and E2E tests. Writing tests […]

  8. Yii Routing, Active Record and Caching

    Almost all modern web apps have 3 major concerns: Retrieving data from a database easily and effectively, caching the web content and URL rewriting to create user friendly URLs. Yii, like any other good framework, offers simple and easy solutions to all of the above. In my previous article I covered the basics of building […]

  9. Hashing Passwords with the PHP 5.5 Password Hashing API

    Using bcrypt is the currently accepted best practice for hashing passwords, but a large number of developers still use older and weaker algorithms like MD5 and SHA1. Some developers don’t even use a salt while hashing. The new hashing API in PHP 5.5 aims to draw attention towards bcrypt while hiding its complexity. In this […]