Sunday, April 28, 2019

Introduction to client-side development

Introduction to client-side development


Distributed systems use client-side elements for users to interact with
These client-side elements include (MVC )
Views –what users see (mainly GUIs)
Controllers –contain event handers for the Views
Client-model –Business logic and data

Views development technologies

HTML

HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language
HTML describes the structure of Web pages using markup
HTML elements are the building blocks of HTML pages
HTML elements are represented by tags
HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
Browsers do not display the HTML tags, but use them to render the content of the page

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p> Visible page content </p>
</body>
</html>

The <!DOCTYPE html> declaration defines this document to be HTML5
The <html> element is the root element of an HTML page
The <head> element contains meta information about the document
The <title> element specifies a title for the document
The <body> element contains the visible page content
The <p> element defines a paragraph

HTML Tags

HTML tags are element names surrounded by angle brackets:
<tag name> content goes here... </tag name>
HTML tags normally come in pairs like <p> and </p>
The first tag in a pair is the start tag, the second tag is the end tag
The end tag is written like the start tag, but with a forward slash inserted before the tag name
HTML tags are not case sensitive: <P> means the same as <p>.
The HTML5 standard does not require lowercase tags,
Web Browsers

The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.
The browser does not display the HTML tags, but uses them to determine how to display the document:

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type and helps browsers to display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
The <!DOCTYPE> declaration is not case sensitive.
The <!DOCTYPE> declaration for HTML5 is:
<!DOCTYPE html>

HTML Documents

HTML Headings -
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:
<h1>First Heading</h1>

HTML Paragraphs -
HTML paragraphs are defined with the <p> tag:
<p>This is a paragraph </p>

HTML Links -
HTML links are defined with the <a> tag:
            <a href="https://www.w3schools.com">This is a link</a>
The link's destination is specified in the href attribute.
Attributes are used to provide additional information about HTML elements.
You will learn more about attributes in a later chapter.

HTML Images -
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:
            <img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">

HTML Buttons -
HTML buttons are defined with the <button> tag:
            <button>Click me</button>

HTML Lists
HTML lists are defined with the <ul> (unordered/bullet list) or the <ol> (ordered/numbered list) tag, followed by <li> tags (list items):
            <ul>
                        <li>Coffee</li>
                        <li>Tea</li>
                        <li>Milk</li>
</ul>

Break tag- (<br>)
Empty HTML Elements
HTML elements with no content are called empty elements.
<br> is an empty element without a closing tag (the <br> tag defines a line break):
            <p>This is a <br> paragraph with a line break.</p>

Empty elements can be "closed" in the opening tag like this: <br />.
HTML5 does not require empty elements to be closed. But if you want stricter validation, or if you need to make your document readable by XML parsers, you must close all HTML elements properly.

HTML Attributes
All HTML elements can have attributes
Attributes provide additional information about an element
Attributes are always specified in the start tag
Attributes usually come in name/value pairs like: name="value"
            <a> = href 
            <img> = src, width, height, alt
The style Attribute - The style attribute is used to specify the styling of an element, like color, font, size etc.          
All HTML elements can have attributes
The title attribute provides additional "tool-tip" information
The href attribute provides address information for links
The width and height attributes provide size information for images
The alt attribute provides text for screen readers

CSS

CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper, or in other media
CSS saves a lot of work. It can control the layout of multiple web pages all at once
External stylesheets are stored in CSS files
CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.

CSS Syntax

A CSS rule-set consists of a selector and a declaration block:



The selector points to the HTML element you want to style.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.
A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
In the following example all <p> elements will be center-aligned, with a red text color:
p {
  color: red;
  text-align: center;
}

CSS Selectors
CSS selectors are used to "find" (or select) HTML elements based on their element name, id, class, attribute, and more.

The element Selector
The element selector selects elements based on the element name.
You can select all <p> elements on a page like this (in this case, all <p> elements will be center-aligned, with a red text color):
p {
  text-align: center;
  color: red;
}

The id Selector
The id selector uses the id attribute of an HTML element to select a specific element.
The id of an element should be unique within a page, so the id selector is used to select one unique element!
To select an element with a specific id, write a hash (#) character, followed by the id of the element.
The style rule below will be applied to the HTML element with id="para1":
#para1 {
  text-align: center;
  color: red;
}
The class Selector

The class selector selects elements with a specific class attribute.
To select elements with a specific class, write a period (.) character, followed by the name of the class.
In the example below, all HTML elements with class="center" will be red and center-aligned:
.center {
  text-align: center;
  color: red;
}
           
Grouping Selectors

If you have elements with the same style definitions, It will be better to group the selectors, to minimize the code. To group selectors, separate each selector with a comma.
In the example below we have grouped the selectors from the code above:
            h1, h2, p {
                        text-align: center;
                        color: red;
}

CSS Comments

Comments are used to explain the code, and may help when you edit the source code at a later date.
Comments are ignored by browsers.
A CSS comment starts with /* and ends with */. Comments can also span multiple lines:

p {
  color: red;
  /* This is a single-line comment */
  text-align: center;
}

/* This is
a multi-line
comment */

Insert CSS

There are three ways of inserting a style sheet:
External style sheet
Internal style sheet
Inline style

External Style Sheet

With an external style sheet, you can change the look of an entire website by changing just one file!
Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the <head> section:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>

Internal Style Sheet
An internal style sheet may be used if one single page has a unique style.
Internal styles are defined within the <style> element, inside the <head> section of an HTML page:
<head>
<style>
body {
  background-color: linen;
}

h1 {
  color: maroon;
  margin-left: 40px;
}
</style>
</head>

Inline Styles

An inline style may be used to apply a unique style for a single element.
To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.
The example below shows how to change the color and the left margin of a <h1> element:

<h1 style="color:blue;margin-left:30px;">This is a heading</h1>

Which one to use?

The major question is which CSS would be used. After going through many web sites and articles, I am here writing my views.

Inline CSS

Advantages:

Inline CSS can be used for many purposes, some of which include:
Testing:  Many web designers use Inline CSS when they begin working on new projects, this is because its easier to scroll up in the source, rather than change the source file. Some also using it to debug their pages, if they encounter a problem which is not so easily fixed. This can be done in combination with the Important rule of CSS.
Quick-fixes:There are times where you would just apply a direct fix in your HTML source, using the style attribute, but you would usually move the fix to the relevant files when you are either able, or got the time.
Smaller Websites: The website such as Blogs where there are only limited number of pages, using of Inline CSS helps users and service provider.
Lower the HTTP Requests: The major benefit of using Inline CSS is lower HTTP Requests which means the website loads faster than External CSS.

Disadvantages

Inline CSS some of the disadvantages of which includes:
Overriding: Because they are the most specific in the cascade, they can over-ride things you didn’t intend them to.
Every Element: Inline styles must be applied to every element you want them on. So if you want all your paragraphs to have the font family “Arial” you have to add an inline style to each <p> tag in your document. This adds both maintenance work for the designer and download time for the reader.
Pseudo-elements: It’s impossible to style pseudo-elements and classes with inline styles. For example, with external and internal style sheets, you can style the visited, hover, active, and link color of an anchor tag. But with an inline style all you can style is the link itself, because that’s what the style attribute is attached to.

Internal CSS

Advantages:

Since the Internal CSS have more preference over Inline CSS. There are numerous advantages of which some of important are an under:
Cache Problem: Internal styles will be read by all browsers unless they are hacked to hide from certain ones. This removes the ability to use media=all or @import to hide styles from old, crotchety browsers like IE4 and NN4.
Pseudo-elements: It’s impossible to style pseudo-elements and classes with inline styles. With Internal style sheets, you can style the visited, hover, active, and link color of an anchor tag.
One style of same element: Internal styles need not be applied to every element. So if you want all your paragraphs to have the font family “Arial” you have to add an Inline style <p> tag in Internal Style document.
No additional downloads: No additional downloads necessary to receive style information or we have less HTTP Request

Disadvantages

Multiple Documents: This method can’t be used, if you want to use it on multiple web pages.
Slow Page Loading: As there are less HTTP Request but by using the Internal CSS the page load slow as compared to Inline and External CSS.
Large File Size: While using the Internal CSS the page size increases but it helps only to Designers while working offline but when the website goes online it consumers much time as compared to offline.

External CSS

Advantages

There are many advantages for using external CSS and some of are:
Full Control of page structure: CSS allows you to display your web page according to W3C HTML standards without making any compromise with the actual look of the page. Google is the leading search Engine and major source of traffic. Google gives very little value to the web pages that are well-organized, since the value is little thus many Designers ignore it. But by taking small value may drive much traffic to the website.
Reduced file-size: By including the styling of the text in a separate file, you can dramatically decrease the file-size of your pages. Also, the content-to-code ratio is far greater than with simple HTML pages, thus making the page structure easier to read for both the programmer and the spiders. With CSS you can define the visual effect that you want to apply to images, instead of using images per say. The space you gain this way can be used for text that is relevant for spiders (i.e. keywords), and you will also lower the file-size of the page.
Less load time: Today, when Google has included the Loading time in his algorithm, its become more important to look into the page loading time and another benefit of having low file-size pages translates into reduced bandwidth costs. CSS can help you save some money by offering you. I done a small experiment to check the page load time. I am using the Mobile Internet Connection for testing and for that first I cleared the web cache of the website and visited http://lawmirror.com for first time after clearing cache. The total time taken to load the website is 16 seconds. Now I hit the F5 button and the time taken to load the website is 8 seconds. Using external CSS has reduced the page load timing. It me explain it how it reduces the time, when you first visited the website, it has downloaded all the contents + external CSS and while downloading external CSS, it has marked the CSS with the time stamp with the time stamp of the web server. Now when you hit F5, it again starts working but this time the browser compare the time stamps of downloaded CSS with Web Server CSS and due to same time stamp, it doesn’t downloaded the CSS external file from server and using the already downloaded time, which make the Web Page Loading time faster as com paired to first time. If you check under Firebug or Chrome tools it will tell 304 Not Modified, meaning the file is not modified since last downloaded file, and thus ignoring to download the external CSS file.
Higher page ranking : In the SEO, it is very important to use external CSS. How it gives, let me explain, In SEO, the content is the King and not the amount of code on a page. Search engines spider will be able to index your pages much faster, as the important information can be placed higher in the HTML document. Also, the amount of relevant content will be greater than the amount of code on a page. The search engine will not have to look too far in your code to find the real content. You will be actually serving it to the spiders “on a platter”. CSS will help you create highly readable pages, rich in content, which will prove extremely helpful in your SEO campaign. As you very well know, better site ranking means better visibility on the web, and this can translate into more visitors and, ultimately, into increased sales or number of contracts. For more details lets use some code to understand:
First file – <h1 style=”text-align:center; margin-top:25px; margin-bottom:25px;”>abc

Second File – h1{text-align:center; margin-top:25px; margin-bottom:25px;} <h1>

For Designer, the both things are same but for SEO and Spider point of view and they are different. Spider have to extra time to remove the style tag from the first file and which consumers say 2 secs, but in second file the content is directly available to spider and thus can easily index the content without looking in CSS, which give priority of second file over first file. Spider will index both the pages but when it gets the contents goods, it will first index those and then go for other pages with doing some work.

Cascading Order

What style will be used when there is more than one style specified for an HTML element?
All the styles in a page will "cascade" into a new "virtual" style sheet by the following rules, where number one has the highest priority:
Inline style (inside an HTML element)
External and internal style sheets (in the head section)
Browser default
So, an inline style has the highest priority, and will override external and internal styles and browser defaults
Responsive Web Design

Responsive web design makes your web page look good on all devices.
Responsive web design uses only HTML and CSS.
Responsive web design is not a program or a JavaScript.
Web pages can be viewed using many different devices: desktops, tablets, and phones. Your web page should look good, and be easy to use, regardless of the device.
Web pages should not leave out information to fit smaller devices, but rather adapt its content to fit any device:


It is called responsive web design when you use CSS and HTML to resize, hide, shrink, enlarge, or move the content to make it look good on any screen.

Viewport

The viewport is the user's visible area of a web page.
The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen.
Before tablets and mobile phones, web pages were designed only for computer screens, and it was common for web pages to have a static design and a fixed size.
Then, when we started surfing the internet using tablets and mobile phones, fixed size web pages were too large to fit the viewport. To fix this, browsers on those devices scaled down the entire web page to fit the screen.



Setting The Viewport

HTML5 introduced a method to let web designers take control over the viewport, through the <meta> tag.
You should include the following <meta> viewport element in all your web pages:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling.
The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).
The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.

Grid-View

Many web pages are based on a grid-view, which means that the page is divided into columns.  Using a grid-view is very helpful when designing web pages. It makes it easier to place elements on the page. A responsive grid-view often has 12 columns, and has a total width of 100%, and will shrink and expand as you resize the browser window.


Media Query

Media query is a CSS technique introduced in CSS3.
It uses the @media rule to include a block of CSS properties only if a certain condition is true.

Definition and Usage

The @media rule is used in media queries to apply different styles for different media types/devices.
Media queries can be used to check many things, such as:
width and height of the viewport
width and height of the device
orientation (is the tablet/phone in landscape or portrait mode?)
resolution
Using media queries are a popular technique for delivering a tailored style sheet (responsive web design) to desktops, laptops, tablets, and mobile phones.
You can also use media queries to specify that certain styles are only for printed documents or for screen readers (mediatype: print, screen, or speech).
In addition to media types, there are also media features. Media features provide more specific details to media queries, by allowing to test for a specific feature of the user agent or display device. For example, you can apply styles to only those screens that are greater, or smaller, than a certain width.

@media not|only mediatype and (mediafeature and|or|not mediafeature) {
  CSS-Code;
}

meaning of the not, only and and keywords:
not: The not keyword reverts the meaning of an entire media query.
only: The only keyword prevents older browsers that do not support media queries with media features from applying the specified styles. It has no effect on modern browsers.
and: The and keyword combines a media feature with a media type or other media features.
They are all optional. However, if you use not or only, you must also specify a media type.

There are tons of screens and devices with different heights and widths, so it is hard to create an exact breakpoint for each device. To keep things simple you could target five groups:

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .example {background: red;}
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  .example {background: green;}
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .example {background: blue;}
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .example {background: orange;}
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  .example {background: pink;}
}

New Features in CSS 3

CSS 3 Selectors
In addition to the selectors that were available in CSS2, CSS 3 introduces some new selectors. Using these selectors you can choose DOM elements based on their attributes. So you don't need to specify classes and IDs for every element. Instead, you can utilize the attribute field to style them.
Rounded corner elements
Rounded corner elements can spruce up a website, but creating a rounded corner requires a designer to write a lot of code. Adjusting the height, width and positioning of these elements is a never-ending chore because any change in content can break them.
CSS 3 addresses this problem by introducing the border-radius property, which gives you the same rounded-corner effect and you don't have to write all the code
CSS 3 Border Image
Another exciting feature in CSS 3 is the ability to swap out a border with an image. The property border-image allows you to specify an image to display instead of a plain solid-colored border.
CSS 3 Box Shadow
A box shadow allows you to create a drop shadow for an element. Usually this effect is achieved using a repeated image around the element. However, with the property box-shadow this can be achieved by writing a single line of CSS code.
After previously removing this property from the CSS 3 Backgrounds and Borders Module, the W3C added it back in the last working draft.
CSS 3 Text Shadow
The new text-shadow property allows you to add drop shadows to the text on a webpage. Prior to CSS 3, this would be done by either using an image or duplicating a text element and then positioning it. A similar property called box-shadow is also available in CSS 3.
CSS 3 Gradient
While the Gradient effect is a sleek Web design tool, it can be a drain on resources if not implemented correctly using current CSS techniques. Some designers use a complete image and put in the background for the gradient effect, which increases the page load time.
Here are examples of the linear gradient property in CSS 3. To date, it is supported only in Safari 4 and Chrome (WebKit) and Firefox 3.6.
CSS 3 RGBA: Color, Now with Opacity
The RGB property in CSS is used to set colors for different elements. CSS 3 introduces a modification and added opacity manipulation to this property. RGB has been transformed to RGBA (Red Green Blue Alpha channels), which simplifies how you control the opacity of elements.
CSS 3 Transform (Element Rotation)
CSS 3 also introduced a property called transform, which enables rotating Web elements on a webpage. As of now, if a designer wants to rotate of an element, he or she uses JavaScript. Many JavaScript extensions/plugins are available online for this feature, but they can make the code cumbersome and most importantly consume more resources.
CSS 3 Multicolumn Layout
Almost every webpage today is divided into columns or boxes, and adjusting these boxes so they display correctly on different browsers takes a toll on Web designers. CSS 3 solves this problem with the multicolumn layout property; all you have to do is specify the number of columns you need and they will be created.
This property is currently supported by the Firefox and WebKit browsers.
CSS 3 Web Fonts
CSS 3 also facilitates embedding any custom font on a webpage. Fonts are dependent on the client system and Web pages can render only fonts that are supported by the browser or the client machine. By using the @font-face property, you can include the font from a remote location and can then use it.

Other Tool

jQuery – A JS library, but can be seen a framework too. It wraps the complexity of pure JS. There are lots of JS frameworks, libraries, and plugins built using jQuery. Good for DOM processing. 

jQuery UI – Focus on GUI development

Bootstrap – to rapidly design and develop responsive web pages and templates

Angular – a JS framework/platform to build frontend applications

React – a JavaScript library for building user interfaces (and the application, which uses that UI)

Component development

Browser-based clients’ components comprises. two main aspects
Controllers
Client-model
The components of browser-based clients are developed using JS/JS-based frameworks,
libraries, and plugins.

Main features of client-side component development tools
  • DOM processing (dynamic content generation,change, removal)
  • Data processing
  • Data persistence
  • Session management (cookies)
  • Communicating (with server components)



ECMAScript 6

new features in ES6.
JavaScript let - let statement allows you to declare a variable with block scope
JavaScript const - JavaScript variable with a constant value
Exponentiation (**) (EcmaScript 2016) - the first operand to the power of the second operand -
Default parameter values
Array.find()
Array.findIndex()
New Number Properties
ES6 added the following properties to the Number object:
EPSILON
MIN_SAFE_INTEGER
MAX_SAFE_INTEGER
New Number Methods
ES6 added 2 new methods to the Number object:
Number.isInteger()
Number.isSafeInteger()
New Global Methods
ES6 also added 2 new global number methods:
isFinite()
isNaN()

Web workers - This API is meant to be invoked by web
application to spawn background workers to execute scripts
which run in parallel to UI page. The concept of web works is
similar to worker threads which get spawned for tasks which
need to invoked separate from the UI thread.

Web storage/ sessionStorage - This is for persistent data

storage of key-value pair data in Web clients.

Geolocation – Identify the device location

File API – Handle the local files

Image capturing – use local hardware (camera)

Top JS frameworks/Libraries

jQuery: Basic and simple. Cover the complexity of JS and provides cross-browser compatibility.
React: powers Facebook, Ease of Learning, DOM Binding, Reusable Components, Backward Compatibility
Angular: Support for Progressive Web Applications, Build Optimizer, Universal State Transfer API and DOM, Data Binding and MVVM
Vue: lightweight , with a much-needed speed and accuracy

Generic client-side features

Form/data validation
Dynamic content generating/updating
Some business logic (client-model)
Delta-Communication (AJAX, SSE, WS)
Data formatting/preparation



Friday, April 12, 2019

Introduction to client-side development

Information System

An information system (IS) refers to a collection of multiple pieces of equipment involved in the dissemination of information. Hardware, software, computer system connections and information, information system users, and the system’s housing are all part of an IS.

There are several types of information systems, including the following common types:
  • Operations support systems, including transaction processing systems
  • Management information systems
  • Decision support systems
  • Executive information systems

An information system commonly refers to a basic computer system but may also describe a telephone switching or environmental controlling system. The IS involves resources for shared or processed information, as well as the people who manage the system. People are considered part of the system because without them, systems would not operate correctly.

There are many types of information systems, depending on the need they are designed to fill. An operations support system, such as a transaction processing system, converts business data (financial transactions) into valuable information. Similarly, a management information system uses database information to output reports, helping users and businesses make decisions based on extracted data.

In a decision support system, data is pulled from various sources and then reviewed by managers, who make determinations based on the compiled data. An executive information system is useful for examining business trends, allowing users to quickly access custom strategic information in summary form, which can be reviewed in more detail.

Advantages

  • Communication – with help of information technologies the instant messaging, emails, voice and video calls becomes quicker, cheaper and much efficient.


  • Globalization and cultural gap – by implementing information systems we can bring down the linguistic, geographical and some cultural boundaries. Sharing the information, knowledge, communication and relationships between different countries, languages and cultures becomes much easier.


  • Availability – information systems has made it possible for businesses to be open 24×7 all over the globe. This means that a business can be open anytime anywhere, making purchases from different countries easier and more convenient. It also means that you can have your goods delivered right to your doorstep with having to move a single muscle.


  • Creation of new types of jobs – one of the best advantages of information systems is the creation of new and interesting jobs. Computer programmers, Systems analyzers, Hardware and Software developers and Web designers are just some of the many new employment opportunities created with the help of IT.


  • Cost effectiveness and productivity – the IS application promotes more efficient operation of the company and also improves the supply of information to decision-makers; applying such systems can also play an important role in helping companies to put greater emphasis on information technology in order to gain a competitive advantage. IS has a positive impact on productivity, however there are some frustrations can be faced by systems users which are directly linked to lack of training and poor systems performance because of system spread.


Disadvantages

  • Unemployment and lack of job security – implementing the information systems can save a great deal of time during the completion of tasks and some labor mechanic works. Most paperwork’s can be processed immediately, financial transactions are automatically calculated, etc. As technology improves, tasks that were formerly performed by human employees are now carried out by computer systems. For example, automated telephone answering systems have replaced live receptionists in many organizations or online and personal assistants can be good example also. Industry experts believe that the internet has made job security a big issue as since technology keeps on changing with each day. This means that one has to be in a constant learning mode, if he or she wishes for their job to be secure.


  • Dominant culture – while information technology may have made the world a global village, it has also contributed to one culture dominating another weaker one. For example it is now argued that US influences how most young teenagers all over the world now act, dress and behave. Languages too have become overshadowed, with English becoming the primary mode of communication for business and everything else.


  • Security issues – thieves and hackers get access to identities and corporate saboteurs target sensitive company data. Such data can include vendor information, bank records, intellectual property and personal data on company management. The hackers distribute the information over the Internet, sell it to rival companies or use it to damage the company’s image. For example, several retail chains were targeted recently by hackers who stole customer information from their information systems and distributed Social Security numbers and credit card data over the Internet.


  • Implementation expenses – to integrate the information system it require pretty good amount of cost in a case of software, hardware and people. Software, hardware and some other services should be rented, bought and supported. Employees need to be trained with unfamiliar information technology and software.


  • Information systems contribute to the efficient running of organizations. Information systems are showing the exponential growth in each decades. Today’s information technology has tremendously improved quality of life. Modern medicine has benefited the most with better information system using the latest information technology. By understanding and learning what advantages and disadvantages it can bring, we have to try, believe and put an effort with our best to make that existing advantage much better and navigate the disadvantages to have a less impact on organizations and society.


Data

  • factual information (such as measurements or statistics) used as a basis for reasoning, discussion, or calculation
  • information in digital form that can be transmitted or processed
  • information output by a sensing device or organ that includes both useful and irrelevant or redundant information and must be processed to be meaningful


Database

A database (DB), in the most general sense, is an organized collection of data. More specifically, a database is an electronic system that allows data to be easily accessed, manipulated and updated.
In other words, a database is used by an organization as a method of storing, managing and retrieving information. Modern databases are managed using a database management system (DBMS)

Database Server

The term database server may refer to both hardware and software used to run a database, according to the context. As software, a database server is the back-end portion of a database application, following the traditional client-server model. This back-end portion is sometimes called the instance. It may also refer to the physical computer used to host the database. When mentioned in this context, the database server is typically a dedicated higher-end computer that hosts the database.
Note that the database server is independent of the database architecture. Relational databases, flat files, non-relational databases: all these architectures can be accommodated on database servers.

Database Management System

A database management system (DBMS) is a software package designed to define, manipulate, retrieve and manage data in a database. A DBMS generally manipulates the data itself, the data format, field names, record structure and file structure. It also defines rules to validate and manipulate this data. A DBMS relieves users of framing programs for data maintenance. Fourth-generation query languages, such as SQL, are used along with the DBMS package to interact with a database.

  • Some other DBMS examples include:
  • MySQL
  • SQL Server
  • Oracle
  • dBASE
  • FoxPro


File and database

  • A File System is a collection of raw data files stored in the hard-drive, whereas a database is intended for easily organizing, storing and retrieving large amounts of data.
  • In File System, most tasks such as storage, retrieval and search are done manually and it is quite tedious whereas when using a database, the inbuilt DBMS will provide automated methods to complete these tasks
  • Redundancy is control on DBMS whereas in Filesystem it can’t control redundancy
  • Using a File System will lead to problems like data integrity, data inconsistency and data security, but these problems could be avoided by using a database.
  • File system requires excessive program maintenance but in Database minimum maintenance required
  • Unlike a File System, databases are efficient because reading line by line is not required, and certain control mechanisms are in place.


Different Types of Databases

There are different types of databases which are categorised on the basis of their function. The top 12 of these which you may come across are:

Relational Databases
This is the most common of all the different types of databases. In this, the data in a relational database is stored in various data tables. Each table has a key field which is used to connect it to other tables. Hence all the tables are related to each other through several key fields. These databases are extensively used in various industries and will be the one you are most likely to come across when working in IT.
Examples of relational databases are Oracle, Sybase and Microsoft SQL Server and they are often key parts of the process of software development. Hence you should ensure you include any work required on the database as part of your project when creating a project plan and estimating project costs.

Operational Databases
In its day to day operation, an organisation generates a huge amount of data. Think of things such as inventory management, purchases, transactions and financials. All this data is collected in a database which is often known by several names such as operational/ production database, subject-area database (SADB) or transaction databases.
An operational database is usually hugely important to Organisations as they include the customer database, personal database and inventory database ie the details of how much of a product the company has as well as information on the customers who buy them. The data stored in operational databases can be changed and manipulated depending on what the company requires.

Database Warehouses
Organisations are required to keep all relevant data for several years. In the UK it can be as long as 6 years. This data is also an important source of information for analysing and comparing the current year data with that of the past years which also makes it easier to determine key trends taking place. All this data from previous years are stored in a database warehouse. Since the data stored has gone through all kinds of screening, editing and integration it does not need any further editing or alteration.
With this database ensure that the software requirements specification (SRS) is formally approved as part of the project quality plan.

Distributed Databases
Many organisations have several office locations, manufacturing plants, regional offices, branch offices and a head office at different geographic locations. Each of these work groups may have their own database which together will form the main database of the company. This is known as a distributed database.
5.0 End-User Databases
There is a variety of data available at the workstation of all the end users of any organisation. Each workstation is like a small database in itself which includes data in spreadsheets, presentations, word files, note pads and downloaded files. All such small databases form a different type of database called the end-user database.

External Database
There is a sea of information available outside world which is required by an organisation. They are privately-owned data for which one can have conditional and limited access for a fortune. This data is meant for commercial usage. All such databases outside the organisation which are of use and limited access are together called external database.

Hypermedia Database
Most websites have various interconnected multimedia pages which might include text, video clips, audio clips, photographs and graphics. These all need to be stored and called from somewhere when the webpage if created. All of them together form the hypermedia database.
Please note that if you are creating such a database from scratch to be generous when creating a project plan, detailed when defining the business requirements documentation (BRD) and meticulous in your project cost controls. I have seen too many projects where the creation of one of these databases has caused scope creep and an out of control budget for a project.

Navigational Database
Navigational database has all the items which are references from other objects. In this, one has to navigate from one reference to other or one object to other. It might be using modern systems like XPath. One of its applications is the air flight management systems.

In-Memory Database
An in-memory databases stores data in a computers main memory instead of using a disk-based storage system. It is faster and more reliable than that in a disk. They find their application in telecommunications network equipments.
Document-Oriented Database
A document oriented database is a different type of database which is used in applications which are document oriented. The data is stored in the form of text records instead of being stored in a data table as usually happens.

Real-Time Database
A real-time database handles data which constantly keep on changing. An example of this is a stock market database where the value of shares change every minute and need to be updated in the real-time database. This type of database is also used in medical and scientific analysis, banking, accounting, process control, reservation systems etc. Essentially anything which requires access to fast moving and constantly changing information.
Assume that this will require much more time than a normal relational database when it comes to the software testing life cycle, as these are much more complicated to efficiently test within normal timeframes.

Analytical Database
An analytical database is used to store information from different types of databases such as selected operational databases and external databases. Other names given to analytical databases are information databases, management databases or multi-dimensional databases. The data stored in an analytical database is used by the management for analysis purposes, hence the name. The data in an analytical database cannot be changed or manipulated.

Difference between Big Data and Data Warehouse

Data Warehousing is one of the common words for last 1
0-20 years, whereas Big Data is a hot trend for last 5-10 years. Both of them hold a lot of data, used for reporting, managed by an electronic storage device. So one common thought of maximum people that recent big data will replace old data warehousing very soon. But still, big data and data warehousing is not interchangeable as they used totally for a different purpose. So let us start learning Big Data and Data Warehouse in a detail in this post.

Head to Head Comparison between Big Data vs Data Warehouse
Below is the Top 8 Difference Between Big Data vs Data Warehouse


Key Differences between Big Data vs Data Warehouse

The Difference Between Big Data vs Data Warehouse, are explained in the points presented below:

  1. Data Warehouse is an architecture of data storing or data repository. Whereas Big Data is a technology to handle huge data and prepare the repository.
  2. Any kind of DBMS data accepted by Data warehouse, whereas Big Data accept all kind of data including transnational data, social media data, machinery data or any DBMS data.
  3. Data warehouse only handles structure data (relational or not relational), but big data can handle structure, non-structure, semi-structured data.
  4. Big data normally used a distributed file system to load huge data in a distributed way, but data warehouse doesn’t have that kind of concept.
  5. From a business point of view, as big data has a lot of data, analytics on that will be very fruitful, and the result will be more meaningful which help to take proper decision for that organization. Whereas Data warehouse mainly helps to analytic on informed information.
  6. Data warehouse means the relational database, so storing, fetching data will be similar with a normal SQL query. And big data is not following proper database structure, we need to use hive or spark SQL to see the data by using hive specific query.
  7. 100% data loaded into data warehousing are using for analytics reports. But whatever data loaded by Hadoop, maximum 0.5% used on analytics reports till now. Others data are loaded into the system, but in not use status.
  8. Data Warehousing never able to handle humongous data (totally unstructured data). Big data (Apache Hadoop) is the only option to handle humongous data.
  9. The timing of fetching increasing simultaneously in data warehouse based on data volume. Means, it will take small time for low volume data and big time for a huge volume of data just like DBMS. But in case of big data, it will take a small period of time to fetch huge data (as it especially designed for handling huge data), but taken huge time if we somehow try to load or fetch small data in HDFS by using map reduce.



Big Data vs Data Warehouse Comparision Table
BASIS FOR COMPARISON
Data Warehouse
Big Data
Meaning
Data Warehouse is mainly an architecture, not a technology. It extracting data from varieties SQL based data source (mainly relational database) and help for generating analytic reports. In terms of definition, data repository, which using for any analytic reports, has been generated from one process, which is nothing but the data warehouse.
Big Data is mainly a technology, which stands on volume, velocity, and variety of data. Volumes define the amount of data coming from different sources, velocity refers to the speed of data processing, and varieties refer to the number of types of data (mainly support all type of data format).
Preferences
If an organization wants to know some informed decision (like what is going on in their corporation, next year planning based on current year performance data, etc), they prefer to choose data warehousing, as for this kind of report they need reliable or believable data from the sources.
If organization need to compare with a lot of big data, which contain valuable information and help them to take a better decision (like how to lead more revenue, more profitability, more customers, etc), they obviously preferred Big Data approach.
Accepted Data Source
Accepted one or more homogeneous (all sites use the same DBMS product) or heterogeneous (sites may run different DBMS product) data sources.
Accepted any kind of sources, including business transactions, social media, and information from sensor or machine specific data. It can come from a DBMS product or not.
Accepted type of formats
Handles mainly structural data (specifically relational data).
Accepted all types of formats. Structure data, relational data, and unstructured data including text documents, email, video, audio, stock ticker data, and financial transaction.
Subject-Oriented
A data warehouse is subject oriented because it actually provides information on the specific subject (like a product, customers, suppliers, sales, revenue, etc) not on organization ongoing operation. It does not focus on ongoing operation, it mainly focuses on the analysis or displaying data which help on decision making.
Big Data is also subject-oriented, the main difference is a source of data, as big data can accept and process data from all the sources including social media, sensor or machine specific data. It also main on provide exact analysis on data specifically on subject oriented.
Time-Variant
The data collected in a data warehouse is actually identified by a particular time period. As it mainly holds historical data for an analytical report.
Big Data has a lot of approaches to identified already loaded data, a time period is one of the approaches on it. Big data mainly processing flat files, so archive with date and time will be the best approach to identify loaded data. But it has the option to work with streaming data, so it not always holding historical data.
Non-volatile
Previous data never erase when new data added to it. This is one of the major features of a data warehouse. As it totally different from an operational database, so any changes on an operational database will not directly impact to a data warehouse.
For Big data, again previous data never erase when new data added to it. It stored as a file which represents a table. But here sometimes in case of streaming directly use Hive or Spark as an operation environment.
Distributed File System
Processing of huge data in Data Warehousing is really time-consuming and sometimes it took an entire day to complete the process.
This is one of the big utility of Big Data. HDFS (Hadoop Distributed File System) mainly defined to load huge data in distributed systems by using map reduce program.

application components communicate with files and databases

SQL Statements
SQL is a standard language for storing, manipulating and retrieving data in databases.
It is used to :
SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index

Prepared statements
In database management systems, a prepared statement or parameterized statement is a feature used to execute the same or similar database statements repeatedly with high efficiency. Typically used with SQL statements such as queries or updates, the prepared statement takes the form of a template into which certain constant values are substituted during each execution.
In other words, if you have a query that you want to execute with different parameters, it's preferred to use prepared statements. By using prepared statements, some bootstrapping operations before query execution (e.g. parsing, optimization, etc.) will be done only once.
Moreover, some attacks like SQL Injection would be prohibited by using prepared statements, as your query processing engine will know about the parameters and will only allow data to be filled in them, and not another piece of SQL.

Callable statements
A CallableStatement object provides a way to call stored procedures in a standard way for all RDBMSs. A stored procedure is stored in a database; the call to the stored procedure is what a CallableStatement object contains. This call is written in an escape syntax that may take one of two forms: one form with a result parameter, and the other without one. A result parameter, a kind of OUT parameter, is the return value for the stored procedure. Both forms may have a variable number of parameters used for input (IN parameters), output (OUT parameters), or both (INOUT parameters). A question mark serves as a placeholder for a parameter.

SQL Statements Vs Prepared statements Vs Callable statements

ORM(Hibernate,JPA)

If you are already familiar with Java, with Object/Relational Mapping, and with the Object/Relational mismatch, you may want to skip right to the Hibernate ORM benefits discussion.

Persistence
Hibernate ORM is concerned with helping your application to achieve persistence. So what is persistence? Persistence simply means that we would like our application’s data to outlive the applications process. In Java terms, we would like the state of (some of) our objects to live beyond the scope of the JVM so that the same state is available later.

Relational Databases
Specifically, Hibernate ORM is concerned with data persistence as it applies to relational databases (RDBMS). In the world of Object-Oriented applications, there is often a discussion about using an object database (ODBMS) as opposed to a RDBMS. We are not going to explore that discussion here. Suffice it to say that RDBMS remain a very popular persistence mechanism and will so for the foreseeable future.

The Object-Relational Impedance Mismatch
'Object-Relational Impedance Mismatch' (sometimes called the 'paradigm mismatch') is just a fancy way of saying that object models and relational models do not work very well together. RDBMSs represent data in a tabular format (a spreadsheet is a good visualization for those not familiar with RDBMSs), whereas object-oriented languages, such as Java, represent it as an interconnected graph of objects. Loading and storing graphs of objects using a tabular relational database exposes us to 5 mismatch problems…

Granularity
Sometimes you will have an object model which has more classes than the number of corresponding tables in the database (we says the object model is more granular than the relational model). Take for example the notion of an Address…

Subtypes (inheritance)
Inheritance is a natural paradigm in object-oriented programming languages. However, RDBMSs do not define anything similar on the whole (yes some databases do have subtype support but it is completely non-standardized)…

Identity
A RDBMS defines exactly one notion of 'sameness': the primary key. Java, however, defines both object identity a==b and object equality a.equals(b).

Associations
Associations are represented as unidirectional references in Object Oriented languages whereas RDBMSs use the notion of foreign keys. If you need bidirectional relationships in Java, you must define the association twice.

Likewise, you cannot determine the multiplicity of a relationship by looking at the object domain model.

Data navigation
The way you access data in Java is fundamentally different than the way you do it in a relational database. In Java, you navigate from one association to an other walking the object network.

This is not an efficient way of retrieving data from a relational database. You typically want to minimize the number of SQL queries and thus load several entities via JOINs and select the targeted entities before you start walking the object network. d will so for the foreseeable future.

Advantages of ORM
They write correct and optimized SQL queries, thereby eliminating the hassle for developers
They make the code easier to update, maintain, and reuse as the developer can think of, and manipulate data as objects
ORMs will shield your application from SQL injection attacks since the framework will filter the data for you!
ORMs provide the concept of Database Abstraction which makes switching databases easier and creates a consistent code base for your application.

Resources:
http://smallbusiness.chron.com/disadvantages-information-technology-business-4020.html
https://eternalsunshineoftheismind.wordpress.com/2013/02/16/advantages-and-disadvantages-of-information-systems-for-businesses/
https://answers.yahoo.com/question/index?qid=20101026165149AAB9bza
http://www.managementstudyguide.com/information-system-and-information-technology.htm
http://www.managementstudyguide.com/information-system-and-information-technology.htm
http://businesscasestudies.co.uk/canon/integrated-information-systems-seeing-the-whole-picture/#axzz3tYnnYRAQ
https://www.techopedia.com/definition/441/database-server
http://www.my-project-management-expert.com/different-types-of-databases-2.html
https://www.w3schools.com/whatis/whatis_sql.asp
https://www.quora.com/SQL-What-are-prepared-statements
https://www.cs.mun.ca/java-api-1.5/guide/jdbc/getstart/callablestatement.html
http://hibernate.org/orm/what-is-an-orm/
https://blog.yellowant.com/orm-rethinking-data-as-objects-8ddaa43b1410

Client-Side Development Rich Web based Applications

Client-Side Development Rich Web based Applications Rich Internet applications (RIA) are Web-based applications that have some characteri...