Posts

MERN Stack

Image
What is a technology stack? It’s a set of frameworks and tools which is used to develop a software. These set of frameworks and tools are choose according their ability to working together and function well. MERN  (MongoDB, ExpressJS, ReactJS, NodeJS) LAMP  (Linux, Apache, MySQL, PHP) MEAN  (MongoDB, ExpressJS, AngularJS, NodeJS) MERN Stack MongoDB Express(.js) React(.js) Node(.js) Mean Stack is a JavaScript Stack that can used to built web applications easily and quickly. Each of these 4 technologies are playing a big part in developing web applications. Since these are very powerful and end-to-end framework developer can work on their projects easily.  Brief introduction about each technology, MongoDB:  NoSQL, document-oriented  database used to store application data. NodeJS:  The JavaScript runtime environment for the server side. It is used to run JavaScript on the machine rather than in a browser. ExpressJS:  A JavaScript framework that run on top of NodeJS, used to build the

NodeJS

Image

HTTP Verbs

Image
HTTP request methods What is HTTP? The main purpose of Hypertext Transfer Protocol (HTTP) is to enable communication between clients and servers. It uses the request-response method. For that HTTP defines set of request methods to identify which action should be performed for the resources. Also referred as HTTP Verbs. HTTP Methods : GET POST PUT DELETE PATCH OPTIONS HEAD The two most common HTTP methods are: GET and POST. GET GET is used to fetch data from a specified resource. Only use to only retrieve data. Retrieve all : https://sliit.lk/api/ v1/faculties Retrieve one : https://sliit.lk/api/ v1/faculties/ {faculty id} Properties of GET requests: GET requests can be cached GET requests remain in the browser history GET requests should never be used when dealing with sensitive data GET requests have length restrictions GET requests are Safe (only used to request data not modify) POST POST is used to create an entry to specific resource. Data sent to

S.O.L.I.D Principles

Image
S.O.L.I.D is a group of five object-oriented design (OOD) principles (rules) that should be followed when designing software. SOLID was promoted by Robert C. Martin but the name itself was created by Michael Feathers. These 5 principles have changed the way that we write software, it allows programmers to write code better, easier to understand and change later. SOLID stands for: S   -   Single-responsibility Principle O     -  Open-closed Principle L    -   Liskov Substitution Principle I     -   Interface Segregation Principle D  -    Dependency Inversion Principle 01.Single-Responsibility Principle “A class should have one and only one reason to change, meaning that a class should have only one job” Let's see a few of its benefits: Testing  – A class with one responsibility means few test cases are required. Lower coupling  – A single class will have Few dependencies because of Less functionality. Organization  – Smaller, well-organized classes are easier to

How to use GIT

Image
Are you new to git? Confused with all the commands and different keywords? Follow these steps, where I show you how to : Download git Configure git Create Git repository Create and Commit a file Push to the Repo 01.Download git You can download recommended version to your PC by using this URL: https://git-scm.com/downloads 02.Configure git Verify successful installation by using the following command in command prompt: git –version   If you have successfully installed Git You should see output that looks something like: git version 2.7.4 (your version) That means you are good to go..!😉 03.Create Git Repository You have to create a folder for your project in your computer. Lets assume the folder name is “car-git-demo” Navigate to that folder from the Command prompt: cd car-git-demo Next, create a local git repository for the project using: git init 04.Create and commit a file You can add a file the git folder or create a new by using touch command: touch index.html (F

What is JavaScript?

Image
What is JavaScript? Have you ever wondered, what is JavaScript, is it a part of Java, and why is it so popular?😕 I had the same questions, I’ll tell you what I’ve learned, I think it will be helpful if you’re new at this Technology. I want to highlight these areas, What is JavaScript? What is the difference between java and JavaScript? How does it work? Why is it so popular (Benefits of JS)? 01.What  is JavaScript? JS is the shortened version of JavaScript. JS is a programing language follows the ECMAScript specification. JS is high-level, often just-in-time compiled, and multi-paradigm. JS contains curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions. Lets look at those big words, ECMAScript specification - An organization that creates standards for technologies(European Computer Manufacturers Association). High level language - Programming languages which are designed to simplify computer programming. High-level sou