Agraj Mangal
Agraj Mangal is a full stack developer working for more than 5 years. He is majorly focused on Java, J2EE, OSGi based enterprise web applications but is equally inclined towards client side development using HTML5, JS & CSS3. He is always looking out to learn and experiment with new technologies.
  • Code
    Social Authentication for Node.js Apps With PassportPassportjs logo preview
    This is the second article in our Node.js Authentication series, in which we take the sample Node app developed in the first article and add the capability to authenticate via Facebook and Twitter accounts rather than having to store and manage authentication credentials.Read More…
  • Code
    Authenticating Node.js Applications With PassportNodejs retina preview
    In this article, we are going to develop a basic Express application from scratch and delegate everything related to authentication to Passport, which is turning out to be the de-facto authentication middleware for Node.jsRead More…
  • Code
    Intro to Shadow DOMShadow dom retina preview
    Take any modern web page and you will notice that it invariably contains content stitched together from a variety of different sources; it may include the social sharing widgets from Twitter or Facebook or a Youtube video playing widget, it may serve a personalized advertisement from some ad-server or it may include some utility scripts or styles from a third party library hosted over CDN and so on. And if everything is HTML based (as is preferred these days) there is a high probability of collisions between the markup, scripts or styles served from various sources. Generally, namespaces are employed to prevent these collisions which solve the problem to some extent, but they don't offer Encapsulation.Read More…
  • Code
    OAuth 2.0 - The Good, The Bad & The UglyOauth retina preview
    In a world dominated by social media, it's hard to not come across a client application which you have used to access restricted resources on some other server, for example, you might have used a web-based application (like NY Times) to share an interesting news article on your Facebook wall or tweet about it. Or, you might have used Quora's iPhone app that accesses your Facebook or Google+ profile and customizes the results based on your profile data, like suggesting to add/invite other users to Quora, based on your friends list. The question is, how do these applications gain access to your Facebook, Twitter or Google+ accounts and how are they able to access your confidential data? Before they can do so, they must present some form of authentication credentials and authorization grants to the resource server. Read More…
  • Code
    Getting Started with Web WorkersHtml5
    One of the many design goals of the JavaScript language was to keep it single-threaded and, by extension, simple. Though I must admit that, given the idiosyncrasies of the language constructs, it is anything but simple! But what we mean by being "single-threaded" is that there is only one thread of control in JavaScript; yes, sadly, your JavaScript engine can do only one thing at a time. Now, doesn't that sound too restrictive to make use of multi-core processors lying idle on your machine? HTML5 promises to change all of that.Read More…
  • Code
    Design Patterns in JavaDesign patterns in java
    One of the unchanging facts of life is that change is the undying constant in every software lifecycle - one that you cannot run away from. The challenge is to adapt to this change with minimum latency and maximum flexibility. The good news is that someone has probably already solved your design problems and their solutions have evolved into best practices; these agreed-upon best practices are referred to as "Design Patterns". Today, we're going to explore two popular design patterns, and learn how good design can help you write code that is squeaky clean and extensible. Read More…