—Albert Einstein—

"It has become appallingly obvious that our technology has exceeded our humanity."

—Steve Jobs—(Apple)

"A lot of companies have chosen to downsize, and maybe that was the right thing for them. We chose a different path. Our belief was that if we kept putting great products in front of customers, they would continue to open their wallets."

—Isaac Asimov—

"I do not fear computers. I fear lack of them."

—Rich Cook—

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."

—Scott Cherf—

"To go faster, slow down. Everybody who knows about orbital mechanics understands that."

Sunday, May 2, 2021

What is CLOUD COMPUTING

 Summary:👉 TABLE OF CONTENTS:

  • Chapter 01: What is Cloud Computing?
  • Chapter 02: Advantages of Cloud Computing.
  • Chapter 03: Type of Cloud Computing




What is Cloud Computing? 

  • Cloud computing is Internet-based computing wherever virtual shared servers provide software packages, infrastructure, platforms, devices, and different resources and hosting. Also, Cloud Computing is the delivery of computing services like servers, storage, databases, networking, software, analytics, intelligence, and more, over the Cloud.
  • Uses the internet and central remote servers.
  • Cloud is a metaphor for the internet, based on how it is depicted in a network diagram.

Advantages of Cloud Computing? 
  • Cost:- Save the substantial capital cost of buying hardware and software.
  • Speed:- Deploy service quickly in fewer clicks. - high speed
  • Scalability:- Increase or decrease the requirement of resources according to the business requirements.
  • Mobility:-working in remote locations with easy access to all the cloud services.
  • Reliability:- back-up and recovery of data are less expensive and very fast for business continuity.
  • Security:- High.
                
            ✔ Other Important Benefits of Cloud Computing
    • On-Demand Self-service
    • Multi-tenancy
    • Offers Resilient Computing
    • Fast and effective virtualization
    • Provide you low-cost software
    • Offers advanced online security
    • Location and Device Independence

Disadvantages of Cloud Computing?
 
  • Performance Can Vary
  • Technical Issues
  • Lower Bandwidth
  • Security Threat in the Cloud
  • Lacks of Support
  • Downtime

Type of Cloud Computing?
 

  • Public Cloud: The cloud resources owned and operated by a third-party cloud service provider are termed public clouds. It delivers computing resources such as servers, software, and storage over the internet
  • Private Cloud: The cloud computing resources exclusively used inside a single business or organization are termed a private cloud. A private cloud may physically be located on the company’s on-site data center or hosted by a third-party service provider.
  • Hybrid Cloud: It is the combination of public and private clouds, which is bounded together by technology that allows data applications to be shared between them. Hybrid cloud provides flexibility and more deployment options to the business.
Share:

Thursday, April 1, 2021

What is ASP.NET? and it's ARCHITECTURE

 Summary:👉 TABLE OF CONTENTS:

  • Chapter 01: What is ASP.Net?
  • Chapter 02: Architecture and Components.
  • Chapter 03: Characteristcs of ASP.Net pages.
  • Chapter 04: LifeCycle of ASP.Net Application.
  • Chapter 05: LifeCycle of ASP.Net Pages.




What is ASP.Net?
  • ASP.Net is a web development platform provided by Microsoft.
  • Used for creating web-based applications.
  • First released in 2002 and the recent version of ASP.net is version 4.8.
  • can be written in a variety of .Net languages. Such as C#, VB.NET, J#, JScript.Net.
ASP.Net Architecture and Components 

  1. Language - There are many languages provide for .net framework. Like C#, VB.Net, J#.
  2. Library - Web library is the most common used library. web library has necessary credential to develop web-based application. 
  3. CLR - Common Language Runtime. Used for the performing Key Activities. Key Activities provide Exception handling and Garbage Collection.

Characteristics of Asp.Net Pages 
  • Directives
  • User controls
  • Custom Controls
  • Application
  • Rendering Techniques
  • State Management

  • ✔  Directives :- A special instruction to process Asp.Net Page
  • ✔  User controls :- User Controls have encapsulations of page sections registered.
  • ✔  Custom controls :-  Build by developers.
  • ✔  Rendering Techniques :- Asp.Net uses visited composite rendering technique During                                                compilation, the template file is compiled into initialization                                                code which builds a control tree which is also called the                                                      composite.
  • ✔  State management : ASP.Net has the facility to control state management.Asp.Net                                            applications are hosted by a Web server and are accessed using                                            the stateless protocol.HTTP is a stateless protocol.So, Asp.Net                                            provides various functions for state management “State” is                                                  treated as a GUI state.

LifeCycle of ASP.Net Application 

When the application is start, there have series of steps. So, let's lookout what the various stages in ASP.Net Application.



LifeCycle of ASP.Net Page 

When the page is start, there have series of steps. So, let's lookout what the various stages in ASP.Net Application. This is done before the response is sent to the user.


References :
Share:

Tuesday, March 16, 2021

Introduction to ReactJS

 Summary:👉 TABLE OF CONTENTS:

  • Chapter 01: What is ReactJS?
  • Chapter 02: Features of ReactJS
        • JSX
        • Virtual DOM
        • Performance
        • One-way Data Binding
        • Extention
  • Chapter 03: Pros and Cons ReactJS





What is ReactJS?

Nowadays, there are several JavaScript libraries and frameworks targeted at creating Front-end development easier and quicker. However, among alternative great characteristics, ReactJS or React contains a business-forward mindset and a powerful concept of code reusability. This article can introduce you to the key options of this nice JavaScript tool.

React is a JavaScript library created for building fast and interactive user interfaces for web and mobile applications. It is an open-source, component-based, front-end library responsible only for the application’s view layer. It was created by Jordan Walke and was initially released in May of 2013.

                ⇉ Fundamentals of React
                        ↝ Embrace functional programming.
                         HTML and JavaScript in the same file (JSX).
                         Components everywhere.


Features of ReactJS 



✥ JSX - JavaScript Syntax Extension 

                The JSX( JavaScript eXtension) is a syntax extension to JavaScript. we can write HTML structures in the same file that contains JavaScript code by using JSX. This makes the code easier to understand, design, and debug, React does not require JSX, but it is very useful when putting markup and logic in the same file.

const name = 'Danuka';
const element = <h1>Hello, {name} </h1>;

This example declares a variable called name and uses it inside JSX by wrapping it in curly braces.


✥ Virtual - DOM

                        DOM stands for Document Object Model and represents the structure of the elements in a website. many JavaScript libraries, like jQuery, manipulate the DOM components directly, modify attributes, adding or removing elements. React keeps a light-weight illustration of the “real” DOM within the memory, which is known as the “virtual” DOM. React can manipulate the Virtual-DOM countless times and comparer its state with the real DOM. React knows exactly which element changed and then updates only that specific element.
                     ✦ Virtual - DOM provides the following advantages:
                                      ✷Simplicity and Efficiency.

                                                                           Figure: Document Object Model

✥ Performance 

                        ReactJS is a good performer. The explanation behind this is often that it manages a virtual DOM. The DOM is a cross-platform and programming API that deals with HTML, XML, or XHTML. React breaks a complex interface into individual elements, permitting multiple users to figure on every each at the same time. And also, DOM leading to smoother and faster performance.

✥ One-way Data Binding 

                        ReactJS is designed in such a manner that follows unidirectional data flow or one-way data binding. one-way data-binding means through the entire application data flows only in one direction. The one-way data binding provides higher control over it. Flux is a pattern that helps to stay your data unidirectional. A unidirectional data flow means when a developer designs a React app, the data is passed from the parent element to the child element through read-only props. These props can't be sent back to the parent element. this is how one-way data binding works. This makes the application a lot more that results in increasing efficiency.

                                                     Figure : One-way data binding


✥ Extensions 

                    ReactJS uses a JSX file that makes the application easy and to code likewise as understand and has several extensions that provide complete application design support. we know that ReactJS is a component-based approach that creates the code as reusable as your want. ReactJS provides server-side rendering, which entails rendering a usually client-side-only web application on the server, then sends a totally rendered page to the client.


Pros and Cons of ReactJS 

✥ Pros
  • Virtual DOM in React makes the user experience better and developers work faster.
  • The one-data binding makes the code very stable.
  • Easy to Learn and USe.

  • Reusable Components.

  • Scope for Testing the Codes.

  • Has React Developer Tools.
✥ Cons
  • Poor documentation.
  • The pace of development is very high. 
  • ReactJS is a large size library.
  • ReactJS Covers only the UI Layers of the app.
  • needs additional libraries for routing and state management.



References:
                https://www.simplilearn.com

Share:

Monday, March 8, 2021

Introduction to MongoDB

Summary:👉 TABLE OF CONTENTS:

  • Chapter 01: What is MongoDB?
  • Chapter 02: Functionality of MongoDB
  • Chapter 03: Why use MongoDB?
  • Chapter 04: Comparing Terminologies
  • Chapter 05: CRUD Terms
  • Chapter 06: Advantages of MongoDB






MongoDB ✅

  • MongoDB is a scalable, high-performance, open-source, schema-free, document-oriented database.
  • Used NoSQL mechanism.
  • MongoDB also provides the feature of Auto-Scaling. Since, MongoDB is a cross-platform database and can be installed across different platforms like Windows, Linux, etc.
  • Supports APIs in many computer languages like JavaScript, Python, Ruby, Perl, Java, C#.
  • Record in MongoDB is a document.


Functionality of MongoDB ✅
  • Document-based database.
  • Secondary indexes.
  • Atomic writes and fully-consistent reads.
  • Query language via an API.
  • Dynamic schema (no DDL).
  • Master-Slave replication.
  • Supports map-reduce and aggregation tools.
  • Easy to administer in the case of failures.
  • automatic load balancing.
  • Stores files of any size easily without complicating your stack.

Why use MongoDB? ✅
  • Easy and fast integration of data. (no ERD diagram).
  • Simple queries.
  • The functionality provided applicable to most web applications.
  • Document Oriented Storage.
  • Index on any attribute.
  • Auto-sharding.

Comparing Terminologies ✅

SQL Terminologies

MongoDB Terminologies

Database

Database

Table

Collection

Row

Document

Column

Field

Index

Index


CRUD Terms ✅

SQL Operation

MongoDB Operation

Create

Create

Insert

Read

Update

Update

Delete

Remove


  • Create ✔
    • db.collection.insert( <document> )
    • db.collection.save( <document> )
    • db.collection.update( <query>, <update>, { upsert: true } )
  • Read ✔
    • db.collection.find( <query>, <projection> )
    • db.collection.findOne( <query>, <projection> )
  • Update 
    • db.collection.update( <query>, <update>, <options> )
  • Delete 
    • db.collection.remove( <query>, <justOne> )

Advantages of MongoDB over RDBMS (Relational Database Management System) ✅
  • No complex joins.
  • The structure of a single object is clear.
  • MongoDB provides the facility of the deep query.
  • Ease of scale-out.
  • MongoDB is schema-less: is a document database in which one collection holds different documents.
  • uses internal memory for storing working sets.

References:
Share:

Monday, March 1, 2021

Introduction to MERN Stack

 Summary:👉 TABLE OF CONTENTS:

  • Chapter 01: MERN stack
  • Chapter 02: Why use the MERN Stack
  • Chapter 03: Benifits of the MERN stack


MERN stack

MERN STACK is a web development framework.MERN is an acronym accustomed to describe a particular set of JavaScript-based technologies that are utilized in the web application development process. it's designed with the concept to create the event process as smooth as possible.MERN includes the following components.
        • ReactJS
        • NodeJS
        • MongoDB
        • ExpressJS
        ✔ ReactJS :
      • React is used to create UI components that make the interface of the single-page web application. React is a JavaScript library used for building user interfaces. React uses a full-featured programming language to construct repetitive or conditional DOM elements. With React, a similar code can run on both the server and also the browser. React’s strong suit is handling stateful, data-driven interfaces with minimal code and minimal pain. And also React has great support for forms, error handling, events, list, etc.
      •                      
        ✔ NodeJS :
      • NodeJS is used to run JavaScript on a machine instead of in a browser. Node JS is a cross-platform run-time JavaScript environment used for executing JavaScript code outside of a browser. Node JS was designed with the concept of allowing devs to create scalable network applications. Node JS has enabled devs to use it to write down command-line tools and back-end scripts for the aim of making dynamic web page content before the page is distributed to the user's browser.
        ✔ MongoDB :
      • MongoDB is a free open-source, cross-platform and document-oriented database program. it is categorized as a No-SQL database used to store application data, suggesting the data is stored in flexible documents with JSON-based query language.
        ✔ ExpressJS :
      • ExpreesIS is used to create the backend of a site using NodeJS functions and structures. this is free open-source software. it's released under the MIT license, and it is classified as a web application framework for Node.js. Express JS is formed for developing web apps and APIs.

Why use the MERN Stack 

MERN Stack is a Javascript Stack that's used for easier and faster deployment of full-stack web applications. MERN Stack comprises 4 technologies namely: MongoDB, Express, React, and Node.js. it's designed to create the development process smoother and easier. the subsequent reasons are the use of the MERn Stack.
      • It helps you to make both Web and Mobile applications.
      • It is widely adopted in the web industry.
      • very huge and growing exponentially.
      • very easy to learn and suitable for beginners.
      • used throughout and across the stack.

Benifits of the MERN Stack 
  • The speed of designing and developing websites and web applications,
  • Develop a computer application using a single language called JavaScript.
  • Ease of transferring a web application to a mobile application or software.
  • Reducing client costs.
  • The functionality of highly optimized web applications and software.
  • it can be creating a web site using a single HTML document.


👉Important
some examples of widely used web development technology stacks :
Share:

Wednesday, February 24, 2021

Learn JAVASCRIPT with codes

 Summary:👉 TABLE OF CONTENTS:

  • Chapter 01: Variables
  • Chapter 02: Operators
  • Chapter 03: Data Types
  • Chapter 04: Functions
  • Chapter 05: Global Functions
  • Chapter 06: Loops
  • Chapter 07: If- else
  • Chapter 08: Switch Statement
  • Chapter 09: Arrays
  • Chapter 10: JSON j
  • Chapter 11: Promises
  • Chapter 12: Helpful Codes


JavaScript is a programming language that powers the dynamic behavior on most websites. In this article, we are focusing on the basic JAVASCRIPT code patterns. So, JAVASCRIPT is most suitable for beginner developers who have basic experience in any programming language.

INTRODUCTION TO BASIC 

Variables
  • Variables are containers for storing data values.
  •  Uses reserved keyword var to declare a variable.
        var a;                          // variable
        var b = "hello";                // string
        var c = "Hi" + " " + "Danu";    // = "Hi Danu"
        var d = 2 + 2 + "3";            // = "43"
        var e = [4679];           // array
        var f = true;                   // boolean
        var g = function () { };        // function object
        var a = 5b = 2c = a + b;    // one line
        const PI = 3.14;                // constant
        let z = 'xxx';                  // block scope local variable

Operators 
  • Performs some operations on single or multiple operands(data value) and produces a result.
  • JavaScript supports the following types of operators.
      • Arithmetic Operators
      • Logical Operators
      • Comparison Operators
      • Conditional Operators
      • Assignment Operators
        a = b + c - d;      // addition, substraction
        a = b * (c / d);    // multiplication, division
        x = 100 % 48;       // modulo. 100 / 48 remainder = 4
        a++; b--;           // postfix increment and decrement

        a * (b + c)         // grouping
        person.age          // member
        person[age]         // member
        !(a == b)           // logical not
        a != b              // not equal
        typeof a            // type (number, object, function...)
        x << 2x >> 3      // minary shifting
        a = b               // assignment
        a == b              // equals
        a === b             // strict equal
        a != b              // unequal
        a !== b             // strict unequal

        a < ba > b        // less and greater than
        a <= ba >= b      // less or equal, greater or eq
        a += b              // a = a + b (works with - * %...)
        a && b              // logical and
        a || b              // logical or

Data Types 
  • There are two types of Data Types.
      • Primitive Data Type
          • String
          • Boolean
          • Number
          • Null
          • Undefined
      • Non-primitive Data Type
          • Array
          • Object
          • Date
        var age = 18;                                   // number 
        var name = "Tom";                               // string
        var fullName = { first: "Tom"last: "Doe" };   // object
        var truth = true;                               // boolean
        var sheets = ["HTML""CSS""JS"];             // array
        var atypeof a;                                // undefined
        var x = null;                                   // value null

Functions 
  • JavaScript function can be defined using the function keyword.
        function addNumbers(ab) {
            return a + b;;
        }
        x = addNumbers(12);


Global Functions 

        eval();                     // executes a string as if it was script code
        String(10);                 // return string from number
        (10).toString();            // return string from number
        Number("10");               // return number from string
        encodeURI(uri);             // encode URI. Result: "my%page.asp"
        decodeURI(enc);             // decode URI. Result: "my page.asp"
        encodeURIComponent(uri);    // encode a URI component
        decodeURIComponent(enc);    // decode a URI component
        isFinite();                 // is variable a finite, legal number
        isNaN();                    // is variable an illegal number
        parseInt();                 // parses a string and returns an integer
        parseFloat();               // returns floating point number of string

Loops 

    ✔ For Loop
    • For loop requires the following 3 parts.
      • Initializer - Initialize our counter to a starting value
      • condition - Specify a condition that must evaluate to true for the next iteration
      • Iteration -  increase or decrease the counter                                                       
        for (var i = 0i < 10i++) {
            document.write(i + ": " + i * 3 + "<br />");
        }
        var sum = 0;
        for (var i = 0i < a.lengthi++) {
            sum += a[i];
        }
        html = "";
        for (var i of custOrder) {
            html += "<li>" + i + "</li>";
        }

    
    ✔ While Loop
    • Only requires condition expression.
    • The purpose of a while loop is to execute a statement or code block repeatedly as long as an expression is true.  
        
        var i = 1;                      // initialize
        while (i < 100) {               // enters the cycle if statement is true
            i *= 2;                     // increment to avoid infinite loop
            document.write(i + ", ");   // output
        }

        ////----Do-while Loop----////
        var i = 1;                      // initialize
        do {                            // enters cycle at least once
            i *= 2;                     // increment to avoid infinite loop
            document.write(i + ", ");   // output
        } while (i < 100)               // repeats cycle if statement is true at the end


    ✔ Break & Continue
    • Break statement "jumps out" of a loop.
    • Continue statement "jumps over" one iteration in the loop.

        ////----Break----////
        for (var i = 0i < 10i++) {
            if (i == 5) {
                break;                      // stops and exits the cycle
            }
            document.write(i + ", ");       // last output number is 4
        }

        ////----Continue----////
        for (var i = 0i < 10i++) {
            if (i == 5) {
                continue;                   // skips the rest of the cycle
            }
            document.write(i + ", ");       // skips 5
        }


If - else 
  • The 'If - else' statement is the next form of control statement that allows JavaScript to execute statements in a more controlled way.

        if ((age >= 16) && (age < 19)) {        // logical condition
            status = "Eligible.";               // executed if condition is true
        } else {                                // else block is optional
            status = "Not eligible.";           // executed if condition is false
        }


Switch Statement 
  • The switch statement is useful when we want to execute one of the multiple code blocks based on the return value of a specified expression.

    switch (new Date().getDay()) {      // input is current day
    case 1:                         // if (day == 1)
        text = "Monday";          
        break;
    case 0:                         // if (day == 0)
        text = "Sunday";
        break;
    default:                        // else...
        text = "Something";
    } 
  

Arrays 
  • An array in JavaScript can be defined and initialized in two ways, Array literal and Array constructor syntax.
        ✔ Array Literal
      • It takes a list of values separated by a comma and enclosed in square brackets.
        
        var stringArray = ["one""two""three"];
        var numericArray = [1234];
        var decimalArray = [1.11.21.3];

        
        ✔ Array Constructor
      • Initialize an array with Array constructor syntax using a new keyword.

        var stringArray = new Array();
        stringArray[0] = "one";
        stringArray[1] = "two";

        var numericArray = new Array(3);
        numericArray[0] = 1;
        numericArray[1] = 2;


JSON j 
  • JSON - JavaScript Object Notation
  • JSON is a syntax for storing and exchanging data.
  • JSON is a text format that is completely language-independent.

        var str = '{"names":[' +                    // crate JSON object
            '{"first":"Don","lastN":"Jon" },' +
            '{"first":"John","lastN":"Lewis" },' +
            '{"first":"King","last":"Jordan" }]}';
        obj = JSON.parse(str);                      // parse
        document.write(obj.names[1].first);         // access

        ////----Sending Data----////
        var myObj = { "name": "Danuka""age": 23"city": "Sri Lanka" };  // create object
        var myJSON = JSON.stringify(myObj);                                // stringify
        window.location = "demo.php?x=" + myJSON;                          // send to php

        ////----Storing Data and retrieving Data----////
        myObj = { "name": "Danuka""age": 23"city": "Sri Lanka" };
        myJSON = JSON.stringify(myObj);                 // storing data
        localStorage.setItem("testJSON"myJSON);
        text = localStorage.getItem("testJSON");        // retrieving data 
        obj = JSON.parse(text);
        document.write(obj.name);


Promises 
  • Contains both the producing code and calls to the consuming code.
  • A Promise may be a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason.
  • A Promise Object can be :
    • Pending:: Result - Undefined
    • Fulfilled:: Result - a result value
    • Rejected:: Result - an error object

        function sum(xy) {
            return Promise(function (resolvereject) {                               
                setTimeout(function () {                                     // send the response after 1 second
                    if (typeof x !== "number" || typeof y !== "number") {    // testing input types
                        return reject(new TypeError("must to be numbers"));
                    }
                    resolve(x + y);
                }, 3000);
            });
        }
        var myPromise = sum(55);
        myPromise.then(function (result) {
            document.write(" 5 + 5: "result);
            return sum(null"num");              // Invalid data and return another promise
        }).then(function () {                     // Won't be called because of the error
        }).catch(function (err) {                 // The catch handler is called instead, after another second
            console.error(err);                   // => Please provide two numbers to sum.
        });


✅ Now I think you are got an idea about JavaSCript coding. So, we will see in the next article.✋✋


👉👉Helpful Codes👇👇 

✔outputs


        console.log(x);             // write to the browser console
        document.write(x);          // write to the HTML
        alert(x);                   // output in an alert box
        confirm("Hello");           // yes/no dialog, returns true/false depending on user click
        prompt("Your age?""0");   // input dialog. Second argument is the initial value


✔Objects

        var student = {                 // object name
            firstName: "Danuka",        // list of properties and values
            lastName: "Dilshan",
            age: 23,
            height: 185,
            fullName: function () {     // object function
                return this.firstName + " " + this.lastName;
            }
        };
        student.age = 25;           // setting value
        student[age]++;             // incrementing
        name = student.fullName();  // call object function


✔Methods


        x.toString();                        // convert to string: results "Bulldog,Beagle,Labrador"
        x.join(" * ");                       // join: "Bulldog * Beagle * Labrador"
        x.pop();                             // remove last element
        x.push("Something");                 // add new element to the end
        x[x.length] = "Something";           // the same as push
        x.shift();                           // remove first element
        x.unshift("Something");              // add new element to the beginning
        delete x[0];                         // change element to undefined (not recommended)
        x.splice(20"y""z");            // add elements (where, how many to remove, element list)
        var animals = x.concat(catsbirds); // join two arrays (dogs followed by cats and birds)
        x.slice(14);                       // elements from [1] to [4-1]
        x.sort();                            // sort string alphabetically
        x.reverse();                         // sort string in descending order
        x.sort(function (ab) { return a - b });   // numeric sort
        x.sort(function (ab) { return b - a });   // numeric descending sort
        highest = x[0];                         // first item in sorted array is the lowest (or highest) value
        x.sort(function (ab) { return 0.5 - Math.random() });     // random order sort






Share:

About Me

My photo
As a programmer, work in a constantly evolving environment. I'll create, maintain, audit, and improve systems to fulfill particular needs, often as advised by an analyst or architect, testing both hard and software systems to diagnose and resolve system faults. And also I am a creative thinker and self-learner, adept in web & mobile application development.

What is CLOUD COMPUTING

Search This Blog

Blog Archive