Posts

Showing posts from 2017

What's new with Java 8?

Image
Hello! I hope you had a good day and an awesome week. 😊 Java is a widely-used programming language. Java is fast, secure and reliable. From Java 6 to Java 7, much didn’t change, but Java 8 is a massive step forward. So many things changed and has made easier in Java 8. There are so many changes to look at but in this post, I’ll go through some major changes. ‘default’ and ‘static’ methods in interfaces In previous versions of Java, interface methods can’t have a method body or a method implementation. This has changed in Java 8. In Java 8, interface methods which are declared using ‘default’ and ‘static’ keywords can have a method implementation. This introduce multiple inheritance. At first, Java didn’t support multiple inheritance due to the ‘Diamond Problem’. Diamond Problem is an ambiguity which occurs when a class inherits from two classes which has the same method. In the below diagram, we can see that B and C have inherited from A and D has inherited from both...

Introduction to Angular JS

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I thought of giving you an idea what AngularJS is. Before getting to know what AngularJS is, you need to know what a single page application is.  A single page application(SPA) is a web application or a web site which loads only a single web page and dynamically update that page as per user’s interaction. The goal of SPAs is to provide a user experience similar to that of a desktop application. SPAs use AJAX and HTML to create responsive web pages without constant page reloads. This means most of the work is done in the client side or front-end. Client having a dynamic communication with the server is a must in SPAs. Let’s see some features of SPAs,            Appropriate content is dynamically added to the webpage.            Use of AJAX for client server communication.            Use of sockets for bidirec...

Different Streams in Node.js

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I thought talking about different types of streams in Node.js. A stream as defined in computer science is a sequence of data elements (usually bytes, but not necessarily) made available over time which can be accessed sequentially. In Node.js, there are 4 types of streams namely,           Readable             -   stream which is used to read data           Writable                -   stream which is used to write data           Duplex                 -   stream which is used to both read and write data           Transform            -   stream which can modify or tra...

Setting up the Environment with Node.js

Image
Hello! I hope you had a good day and an awesome week. 😊 As I promised on the previous post, in this one we’ll do some coding using Node.js. But before we jump into coding, we need to set up a proper environment. Setting up the Environment Before working with Node.js, it should be installed to your machine. So, to install, you can follow the link given below, https://nodejs.org/en/download/ There, select the setup according to the operating system of your machine. When installing go with the default options. After the installation, open command prompt and type ‘node --version’ as below, If the version is shown, Node.js is successfully installed to your machine. If not, it should be reinstalled. Let’s Code Let’s start small. First, we’ll see how to print something in the command prompt. A JavaScript file (a file with .js extension) should be created. Let’s call it ‘Hello.js’. This can be done using a simple text editor or using and IDE (Integra...

Introduction to Node.js

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I’ll give a brief introduction to Node.js which is currently in trend. First of all, what is node.js? Node.js is an open source, cross platform run-time environment for server-side and networking applications. It was developed by Ryan Dahl. It is built on V8 engine which the JavaScript engine of Google Chrome. Its initial release was supported only Mac OSX and Linux. Listed below are some features of Node.js which makes it a better choice for web development, Non-blocking I/O(input/output) - Node.js operates on non-blocking I/O model, which means, the main thread (as node.js is single threaded) will not wait for I/O operations to get complete, instead it will continue to execute after calling an API. Asynchronous - Node.js is asynchronous because of its non-blocking I/O nature. This happens because of the main thread not waiting for the completion of I/O operations. Event-Driven -  Node.js ha...

JavaScript Classes

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I thought of talking about JavaScript classes. Before we talk about JavaScript classes, we need to know what JavaScript is. I know you all know what that is, but just in case if you have forgotten I’ll give you a brief introduction. JavaScript is a scripting language that can be used to client-side processing and can be inserted into HTML pages. Some of its major features are, ·          Open-source ·          Single threaded ·          Non-blocking I/O ·          Asynchronous ·          Dynamically typed ·          Multi-paradigm ·          Event driven JavaScript doesn’t have classes. It is a class-less languag...

What's new with ECMAScipt 6?

Image
Hello! I hope you had a good day and an awesome week. 😊 So, I started my journey of learning JavaScript frameworks and libraries and I came across something called ECMAScript. What is ECMAScript? It is a standard for scripting languages introduced by Ecma International (European Computer Manufacturers Association). JavaScript is one of the scripting languages based on ECMAScript standard. The most stable and latest version is ECMAScript 6 (ES6) also known as ECMAScript 2015 was released on June 2015. ES6 is not compatible with most browsers as it is still new. So, to convert the ES6 code we write, to browser readable ES5, a transpiler will be needed. A transpiler is a type of a compiler which translate a source code of a program written in one programming language to another programming language. Some of the transpiling tools available are Babel.js, Traceur and Closure. In this post, I’ll discuss some features of ES6 which differentiate it from ES5, its previous v...
Image
Welcome! I hope you had a good day and an awesome week. 😀 As the first post, I thought of posting something I experienced and something that you also will experience at some point in your life. The biggest challenge I faced during the first two years of my university life is the second-year project. It is the first project where we had to deal with a real client. The group consisted of 8 members and each must have a full stack module assigned to them. For the those who don't know, full stack means from front end to all the way to the back end developing. Our client was a medical center situated in Rathmalana so the system we built was a ‘Medical Center Management System’. At that time, they used a manual system. So, it was a great opportunity for us to automate their system as it was a fresh start for both them and us. We met with them few times and gathered the requirements. After sorting through the requirements, we divided the modules as Staff, Patient, Pharmacy, Sup...