Skip to main content

Posts

Showing posts from May, 2018

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