Koa is a new web framework that is provided for creating web applications and APIs. And also this is more powerful and more expressive as well as it allows you to handle callbacks and errors.

Installation

You need to install node v7.6.0 or higher for ES2015 and async function support.

try these codes with your cmd

Application

The obligatory My First App application

now you can run the program and see the “my first app” on localhost:3000


Mainly there are 5 principles that can be seen in object-oriented programing that should be followed when designing software.

S => Single responsibility.

O => Open-Close.

L => Liskov substitution.

I => Interface segregation.

D => Dependency inversion.

S.O.L.I.D Principles

Single Responsibility Principle

“A class should have one and only one reason to change, meaning that a class should have only one job”

ex: If having a class to calculate the area of a rectangle, it should not be included method like calculate the area of a circle. A class should be responsible for one particular job.

Open-Close Principle

“Object or entities should be open for extension…


Synchronous Javascript basically uses one by one method. It means if there are some methods to execute in a program, it will execute one by one. Synchronous will be happening like if the first method is starting to execute, all other methods wait until the previous method is fully completed respectively.

Example:

This is the code segment and its result

You can see there are four-string to print in the console and printed those are one by one as respectively in the above image. You can call it Synchronous.

Asynchronous Javascript is behaving like opposite of the Synchronous. If there are many methods to be executed and some…


The javascript object and JSON have very similar syntax. Because of that, some peoples are confused about the difference between Js and JSON. Sample code segment to implement simple javascript object as below…

Js Object

In the Javascript object, you need to use names as variables such as without double-quotes. But the JSON format doesn`t like that. Sample JSON format code segment as below…


When we talking about coupling, it is an important concept in software development. Coupling should be less when we developing software. It says the degree of the interaction between two or more modules should be less. According to that, we can easily handle our software development or maintenance without any effect on other modules badly. Example javascript code segment as below…

The above code has two functions. One is to set time out as 1 second to set the value as 10 and print the value. The other one is to call the 1st function. Assume that if you want…


Talking about the ASP.NET Boilerplate template, I had found it in the industry placement as my university module. When I back to my 2nd-year life, I had to develop many projects as group work. In each and every project, we had to implement User Registration functionalities which are not getting any marks. It wasting our valuable time. When I doing the internship I found this template as the best solution for that issue.

If we are used this template, we do not need to worry about the user registration functionalities as well as it provided us the sessions that most…

Janaka Chinthana Dissanayake

I am an undergraduate student of SLIIT following BSc.(HonS ) in IT specialization in Software Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store