Skip to main content

Posts

Building a simple Web App with OAuth 2.0

Hi all! In this blog I'll give you all a brief introduction to OAuth 2 and how to build a simple web app which utilizes OAuth 2 as the authorization mechanism. If you have not used OAuth 2 earlier, don't panic, I'll make the things simple as possible. So let's get started What is OAuth 2 ? In simple terms OAuth 2 is an authorization framework that grants users limited access to information in one site from another site, by means of a token.This is a secure way to expose information to third party services without exposing users credentials.The original  OAuth 2 specification is a bit complex and can be confusing if you are reading for the first time, however the basic concepts behind OAuth 2 are very simple and easy to understand.  Many popular companies like Google, Amazon, LinkedIn,   Facebook, Instagram, NetFlix and PayPal now use OAuth 2 to allow users access account information using third party services. Today we will look into how we can build a simple web app...
Recent posts

CRUD Operations and HTTP methods in RESTful services

What are these CRUD operations? You might be wondering so, as you read the topic of this post, or else you might have already heard this and is familiar with it. Though you might have not heard of the term CRUD, you'll probably have used CRUD operations if you have done computer programming for sometime. In RESTful services we use http methods to perform CRUD operations. Many programmers know which http method is used for a specific CRUD operation, but only a few knows the actual reason behind using that relevant http method for that particular operation. It is always better to learn things with reasoning, rather than blindly doing something just because everyone do so. In this blog post I'll give a brief introduction about CRUD operations and the four basic http methods and the reason why we use a particular http method for a specific CRUD operation. What are CRUD operations?  In computer programming CRUD stands for Create, Read, Update and Delete, which are the four basic...

A comparison between Node and Express

If you are programmer who have worked a long time with JavaScript you might know that , earlier JavaScript was just a scripting language used in the client side. However now the story is different. With many libraries like Node js and Express js being added to the JavaScript family JavaScript have evolved beyond, just being a scripting language in the client side. With these new libraries being added, now it is possible to build entire sites on JavaScript, extending it from front to back-end seamlessly. So what is Node and Express? Let's  clear this out step by step! What is Node js? Node js is an open source JavaScript runtime environment that executes JavaScript code server side. Node enables developers to use JavaScript for server side scripting. Node uses an event driven, non-blocking I/O model that makes it light weight and efficient. Because of this model Node js is particularly useful in web application that have many input/output operations and for real time web appli...

Difference between callback functions and promises in javascript

If you have ever worked with JavaScript you might have the experience that it is a quite confusing language to understand at first. This is because  in JavaScript there are many ways to do the same thing, and also unlike most other programming languages, if you do a small mistake in JavaScript instead of giving any errors, the program would behave in a totally different way than what you expect. Therefore, without understanding the basic concepts of JavaScript, it's quite difficult to work with it. In this post I'll be explaining about callback functions and promises, what they are used for and the difference between the two methods. Actually callback functions and promises are 2 different ways of doing the same thing. By default JavaScript is an asynchronous programming language. Which means that JavaScript does not execute instructions line after the other as in many programming languages. Whenever JavaScript come across an operation that takes relatively a long time, typic...

How to get started with MongoDB

In my last post I gave you all a brief introduction about NoSQL databases and its uses. As I mentioned in my last post , in this blogpost I'll give you all an overview of MongoDB and how to get started using MongoDB. Basically MongoDB is a document-oriented, NoSQL database and it can be rated as the most popular and widely used NoSQL database. MongoDB is free and open source , therefore anyone can simply download it from their site and start using it in their applications. It stores data as JSON(JavaScript Object Notation) like documents with schemas. In fact, data is actually stored in MongoDB as BSON objects. BSON is very much similar to JSON except that it is the binary representation of JSON. Unlike JSON, BSON is optimized for performance and navigational abilities. Typically data will be stored in the format shown on the following picture.  Key features that had contributed to the huge popularity of MongoDB are as follows: Support Ad hoc queries together JavaScript ...

A head start for working with NoSQL

What is this 'NoSQL'? If you already have heard of NoSQL, then you'll probably might have heard of MongoDB as well. Why is that? Because these two terms are kind of interrelated with each other, as MongoDB is the most widely used application of the NoSQL technology. But, before peeping our heads into MongoDB, lets have a look at what NoSQL is.  To understand about NoSQL, we should have at least a basic understanding about SQL. SQL stands for Structured Query Language. If you ever had worked with databases ,specifically relational databases , then you might already have had hands on experience in SQL. A relational database is a data store where data is organized into relations or tables. Basically SQL is used to manage and query data from relational databases.  As the name itself suggest NoSQL , means 'non SQL' or 'non relational'. A NoSQL database allows us to store and retrieve data from a data store which is modeled in means other than the tabular...

A noob Introduction to Spring and Spring Boot Frameworks

How many of you guys have heard about Spring and Spring Boot frameworks? If you are a so called "Java guy" , you'll probably have heard and might have even worked with these two frameworks. In this blog post I'll give you all a brief introduction to these two frameworks , including a comparison between these two. In the latter part of this post I'll show you how to create a simple Spring Boot application in 5 minutes. So what is this Spring Framework? Spring is actually a very popular application development framework for the Java platform, specifically useful in developing enterprise Java applications.  There are several reasons behind its popularity among the Java community: Inversion of Control Aspect- Oriented programming  Data Access  Transaction Management Model-View-Controller architecture Remote access framework Despite all the above mentioned features spring has become mostly famous for Dependency Injection(DI) with the favor of  Inversion...