Saturday, April 27, 2019

Data Persistence

Role of data in information systems indicating the need for data persistence

Data storage is the collective methods and technologies that capture and retain digital information on electromagnetic,optical or silicon-based storage media. Storage is a key component of digital devices, as consumers and businesses have come to rely on it to preserve information ranging from personal photos to business-critical information.Storage is frequently used to describe the devices and data connected to the computer through input/output (I/O) operations,including hard disks,flash devices,tape systems and other media types.

Explain the Data, Database, Database Server, and Database Management System
Data

In computing data is information that has been translated into a form that is efficient for movement or processing.Relative to today's computers and transmission media,data is information converted into binary digital form.It is acceptable for data to be used as a singular subject or a plural subject.Raw data is a term used to describe data in its most basic digital format.

Database Server

Database server is the term used to refer to the back-end system of a database application using client/server architecture. The back-end, sometimes called adatabase server, performs tasks such as data analysis, storage, data manipulation, archiving, and other non-user specific tasks.

Database Management System

database management system (DBMS) is system software for creating and managing databases. The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data.

Compare Files and Databases, discussing pros and cons 

Pros of the File System
  • Performance can be better than when you do it in a database.To justify this, if you store large files in DB, then it may slow down the performance because a simple query to retrieve the list of files or filename will also load the file data if you used Select * in your query. In a files stem, accessing a file is quite simple and light weight.
  • Saving the files and downloading them in the file system is much simpler than it is in a database since a simple 'Save As' function will help you out.Downloading can be done by addressing a URL with the location of the saved file.

Cons of the File System

  • Loosely packed,There are no ACID (Atomicity, Consistency, Isolation, Durability) operations in relational mapping, which means there is no guarantee. Consider a scenario in which your files are deleted from the location manually or by some hacking dudes.You might not know whether the file exists or not.Painful. right?
  • Low security,Since your files can be saved in a folder where you should have provided write permissions, it is prone to safety issues and invites trouble, like hacking. It's best to avoid saving in the file system if you cannot afford to compromise in terms of security

Pros of Database

  • ACID consistency, which includes a rollback of an update that is complicated when files are stored outside the database.
  • Backups automatically include file binaries.
  • It's more secure than saving in a file system.

Cons of Database

  • You may have to convert the files to blob in order to store them in the database.
  • Database backups will be more hefty and heavy.

Discuss different arrangements of data, giving examples

Abstract
The representation tasks required learners to arrange and represent data through modelling, focusing on spontaneous representations.Successful trans numeration determine the ultimate success of a representation and the ability to organise data is regarded as critical. Arrangement types increased in sophistication with increased grade level and the hierarchical nature of arrangement types became apparent when regarded in the context of an adapted SOLO Taxonomy framework.A higher level arrangement strategy pointed to a higher SOLO level of statistical thinking.Learners in the two tasks produced a rich variety of representations which included idiosyncratic, unsophisticated responses as well as standard statistical representations. 


Different types of databases, providing examples for their use 

There are several types of database management systems.Here is a list of seven common database management systems:
  1. Hierarchical databases
  2. Network databases
  3. Relational databases
  4. Object-oriented databases
  5. Graph databases
  6. ER model databases
  7. Document databases

Hierarchical Databases

In a hierarchical database management systems (hierarchical DBMSs) model, data is stored in a parent-children relationship nodes.In a hierarchical database,besides actual data, records also contain information about their groups of parent/child relationships.In a hierarchical database model,data is organised into a tree like structure.The data is stored in form of collection of fields where each field contains only one value.The records are linked to each other via links into a parent-children relationship.In a hierarchical database model,each child record has only one parent.A parent can have multiple children.

Network Databases

Network database management systems (Network DBMSs) use a network structure to create relationship between entities. Network databases are mainly used on a large digital computers. Network databases are hierarchical databases but unlike hierarchical databases where one node can have one parent only, a network node can have relationship with multiple entities. A network database looks more like a cobweb or interconnected network of records.

Relational Databases

In relational database management systems (RDBMS), the relationship between data is relational and data is stored in tabular form of columns and rows.Each column if a table represents an attribute and each row in a table represents a record.Each field in a table represents a data value.

Data warehouse with Big data
 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.Data warehouse only handles structure data (relational or not relational),but big data can handle structure,non-structure, semi-structured data.
Preferences
Data Warehouse
If an organisation 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.
 Big Data
If organisation 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.

 how the application components communicate with files and databases 
Easy understand follow video link
  
Differentiate the SQL statements, Prepared statements, and Callable statements 

The Callable Statement object can use all the three. A parameter whose value is unknown when the SQL statement is created.You bind values to IN parameters with the set abc() methods. A parameter whose value is supplied by the SQL statement it returns.

Statement
Use this for general-purpose access to your database.Useful when you are using static SQL statements at run time. The Statement interface cannot accept parameters.

Prepared Statement
Use this when you plan to use the SQL statements many times.The Prepared Statement interface accepts input parameters at run time.

Callable Statement
Use this when you want to access the database stored procedures.The Callable Statement interface can also accept run time input parameters.

Argue the need for ORM, explaining the development with and without ORM
Object-relational-mapping is the idea of being able to write queries like the one above,as well as much more complicated ones,using the object-oriented paradigm of your preferred programming language.Long story short,we are trying to interact with our database using our language of choice instead of SQL.Here’s where the Object-relational-mapper comes in.When most people say "ORM" they are referring to a library that implements this technique. 
 POJO, Java Beans, and JPA, indicating their similarities and differences  
POJO classes
POJO stands for Plain Old Java Object. It is an ordinary Java object, not bound by any special restriction other than those forced by the Java Language Specification and not requiring any class path.It doesn’'t have special restrictions other than those forced by Java language.It can implement Serializable interface and Fields can be accessed by their names.
It is used when you don’t want to give restriction on your members and give user complete access of your entity
Java Beans
Beans are special type of Pojos. There are some restrictions on POJO to be a bean.
It is a special POJO which have some restrictions and It should implement serializable interface.Fields are accessed only by getters and setters and It is used when you want to provide user your entity but only some part of your entity.


JPA
As a specification, the Java Persistence API is concerned with persistence, which loosely means any mechanism by which Java objects outlive the application process that created them.Not all Java objects need to be persisted,but most applications persist key business objects.The JPA specification lets you define which objects should be persisted, and how those objects should be persisted in your Java applications.
NoSQL indicating the benefits also explain different types of NoSQL databases

Advantages

NoSQL databases have many advantages compared to traditional,relational databases.One major,underlying difference is that NoSQL databases have a simple and flexible structure.They are schema-free.Unlike relational databases, NoSQL databases are based on key-value pairs.Some store types of NoSQL databases include column store, document store, key value store, graph store, object store,XML store,and other data store modes.Usually, each value in the database has a key.This is because it’s done by horizontally scaling and distributing the load on all nodes,which is replacing the main host with a more powerful one.

Disadvantages

NoSQL databases are not perfect, and they are not always the right choice.For one thing, most NoSQL databases do not support reliability features that are naively supported by relational database systems.These reliability features can be summed up as atomicity, consistency, isolation,and durability. In order to support reliability and consistency features, developers must implement their own proprietary code, which adds more complexity to the system.This might limit the number of applications that can rely on NoSQL databases for secure and reliable transactions.Other forms of complexity found in most NoSQL databases include incompatibility with SQL queries. 


 Hadoop is, explaining the core concepts of it

Hadoop ecosystem consists of Hadoop core components and other associated tools. In the core components, Hadoop Distributed File System (HDFS) and the Map Reduce programming model are the two most important concepts.
If any failed node restarts,it automatically joins back to the cluster and than after master can assign it a new task whenever is required.
 If any node fails in between, the master will detect this failure and assign the same task to another node where the replica of the same data block is available.


Explain the concept of IR, identifying tools for IR

As with all spectroscopic techniques,it can be used to identify and study chemicals. Samples may be solid, liquid, or gas.The method or technique of infrared spectroscopy is conducted with an instrument called an infrared spectrometer (or spectrometer) to produce an infrared spectrum.

Introduction to client-side development

What are the main elements of client-side application components of distributed systems

The client-server model is basic to distributed systems.It is a response to the limitations presented by the traditional mainframe client-host model,in which a single mainframe provides shared data access to many dumb terminals.The client-server model is also a response to the local area network (LAN) model, in which many isolated systems access a file server that provides no processing power.
Client-server architecture provides integration of data and services and allows clients to be isolated from inherent complexities, such as communication protocols.The simplicity of the client-server architecture allows clients to make requests that are routed to the appropriate server.These requests are made in the form of transactions. Client transactions are often SQL or PL/SQL procedures and functions that access individual databases and services.

The Components of the Client-Server Model

The client server model consists of three parts-
  • The client
  • The server
  • The network



Discuss the Views development technologies for the browser-based client-components of web-based applications

Before moving on to the criteria for choosing a modern web technology stack, you should clearly understand what comprises the process of web application development.
  • HTML (HyperText Markup Language)
  • CSS (Cascading Style Sheets)
  • JavaScript
  • Ajax (Asynchronous JavaScript and XML)
  • jQuery (JavaScript Framework Library - commonly used in Ajax development)
  • Moo Tools (JavaScript Framework Library - commonly used in Ajax development)
  • Dojo Toolkit (JavaScript Framework Library - commonly used in Ajax development)

Server-Side Programming
  • Ruby (Ruby on Rails)
  • Python (Django, Flask, Pylons)
  • PHP (Laravel)
  • Java (Spring)
  • Scala (Play)
Web-based applications are dynamic web sites programmed on the server and delivered to the client through a browser. Any device, whether desktop or mobile, can function as a client. Web-based applications cover all sort of application types.today, it would not be possible to imagine online banking, social networking, e commerce,interactive games, online training and CMS without the existence of web-based apps.
Since the demand for web and mobile applications is growing, new approaches and new technologies are also emerging. In addition to mobile technologies, cloud technologies are also making a rapid and permanent impact on modern business. As businesses are slowly but surely migrating to the cloud, it's inevitable to convert all desktop applications to web-based ones in order to reach the target audience and keep up with the competition.

Controller development technologies for the browser-based client-components of web-based applications 

Model,view and controller (MVC) is a well-known three-layer development architecture used for web applications developments.This paper presents the key insight related to the MVC layers, its uses, advantages and practices concerning MVC during web applications developments.We explain the all three layers in detail and their functionalities.The main objective of the study is to provide holistic view about each layer of the MVC and main functionalities and advantages of the MVC.Specifically, we explain the best practices concerning MVC based web applications developments. Furthermore,we explain the related technologies which are used in conjunction with MVC based web applications.





client-Model development technologies for the browser-based clientcomponents of web-based applications 

In computing, a web application or web app is a client–server computer program which the client(including the user interface and client-side logic) runs in a web browser. Common web applications include web mail,online retail sales,and online auction.
  • HTTP.
  • CGI.
  • SCGI.
  • FCGI.
  • AJP.
  • WARP.
  • Web Socket.
  

Different categories of elements in HTML, proving examples for their use

CSS 3 a new version of CSS or cascading style sheet benefits from technical features and properties. From better maintenance, loading speed, and layout design properties CSS 3 is much more versatile.Designers get to implement the design elements from CSS 3 in a simpler manner.
Multi column layout
Multiple backgrounds
Text shadow 
Border Radius



3 main types of CSS selectors 

Introducing CSS Selectors

A CSS selector is the part of a CSS rule set that actually selects the content you want to style. Let’s look at all the different kinds of selectors available,with a brief description of each

Universal Selector

The universal selector works like a wild card character,selecting all elements on a page. Every HTML page is built on content placed within HTML tags.Each set of tags represents an element on the page.Look at the following CSS example, which uses the universal selector:

Element Type Selector

Also referred to simply as a "type selector," this selector must match one or more HTML elements of the same name. Thus,a selector of nav would match all HTML nav elements, and a selector of <ul> would match all HTML unordered lists,or <ul>elements.An ID selector is declared using a hash,or pound symbol (#) preceding a string of characters. The string of characters is defined by the developer.This selector matches any HTML element that has an ID attribute with the same value as that of the selector,but minus the hash symbol.
Advanced CSS selectors explaining the specificity 
With it we can completely transform the look of a website in just a couple of minutes, and without even having to touch the markup. But despite the fact that we are all well aware of its usefulness CSS selectors are still not used to their full potential and we sometimes have the tendency to litter our HTML with excessive and unnecessary classes and ids divs and spans.The best way to avoid these plagues spreading in your markup and keep it clean and semantic, is by using more complex CSS selectors,ones that can target specific elements without the need of a class or an id, and by doing that keep our code and our stylesheets flexible.

CSS Specificity


Before delving into the realms of advanced CSS selectors,it s important to understand how CSS specificity works, so that we know how to properly use our selectors and to avoid us spending hours debugging for a CSS issue that could be easily fixed if we had only payed attention to the specificity.

CSS media queries in responsive web development 

  • Responsive web design has exploded in popularity — thanks to the need to create sites that work across numerous devices.
  • responsive design comes with some problems of its own.
  • One of these tricks is the use of media queries,which work to call styles to the user device based on its dimensions.

Additional expalne follw this link


Identify the pros and cons of 3 ways of using CSS (inline, internal, external) 

Internal CSS
Internal CSS code is put in the <head> section of a particular page.The classes and IDs can be used to refer to the CSS code,but they are only active on that particular page. CSS styles embedded this way are downloaded each time the page loads so it may increase loading speed.However,there are some cases when using internal stylesheet is useful.One example would be sending someone a page template – as everything is in one page, it is a lot easier to see a preview. Internal CSS is put in between <style></style> tags. An example of internal stylesheet.
Advantages of Internal CSS:
  • Only one page is affected by stylesheet.
  • Classes and IDs can be used by internal stylesheet.
  • There is no need to upload multiple files. HTML and CSS can be in the same file.
Disadvantages of Internal CSS:
  • Increased page loading time.
  • It affects only one page – not useful if you want to use the same CSS on multiple documents.
External CSS
Probably the most convenient way to add CSS to your website, is to link it to an external css file. That way any changes you made to an external CSS file will be reflected on your website globally.A reference to an external CSS file is put in the <head> section of the page:
Advantages of External CSS:
  • Smaller size of HTML pages and cleaner structure.
  • Faster loading speed.
  • Same .css file can be used on multiple pages.
Disadvantages of External CSS:
  • Until external CSS is loaded, the page may not be rendered correctly.

Inline CSS

Inline CSS is used for a specific HTML tag. <style> attribute is used to style a particular HTML tag. Using CSS this way is not recommended, as each HTML tag needs to be styled individually. Managing your website may become too hard if you only use inline CSS. However, it can be useful in some situations. For example, in cases when you don’t have an access to CSS files or need to apply style for a single element only. An example of HTML page with inline CSS would look like this:
Advantages of Inline CSS:
  • Useful if you want to test and preview changes.
  • Useful for quick-fixes.
  • Lower HTTP requests.
Disadvantages of Inline CSS:
  • Inline CSS must be applied to every element.

 client-side component development related aspects in browser-based web applications 

The internet is steadily moving towards active user engagement and extended functionality offered by web apps. As they are replacing websites, more and more developers are interested in how to develop web apps and attract more visitors to their web resources.
One of the challenges any aspiring developer can encounter before trying their hand in web application development is choosing the type and the component model of web application architecture.Our article will dot the is on the matter and help you choose well.
Discuss the new features in JS version 6 
  • arrows
  • classes
  • enhanced object literals
  • template strings
  • restructuring
  • default + rest + spread
  • let + const
  • iterators + for..of
  • generators
  • Unicode
  • modules
  • module loaders
  • map + set + weak map + weakest
  • proxies
  • symbols
  • subclass able built-ins
  • promises
  • math + number + string + array + object APIs
  • binary and octal literals
  • reflect api
  • tail calls

Arrows

Arrows are a function shorthand using the => syntax. They are syntactically similar to the related feature in C#, Java 8 and Coffee Script. They support both statement block bodies as well as expression bodies which return the value of the expression. Unlike functions, arrows share the same lexical this as their surrounding code.

Classes

ES6 classes are a simple sugar over the prototype-based OO pattern.Having a single convenient declarative form makes class patterns easier to use,and encourages inseparability. Classes support prototype-based inheritance,super calls,instance and static methods and constructors.




Thursday, April 4, 2019

RESTful Web services

Message oriented communication with resource oriented communication 

Message oriented communication
Asynchronous communication does not require both the sender and the receiver to execute simultaneously. So, the sender and recipient are loosely-coupled.The amount of time messages are stored determines whether the communication is transient or persistent.


follow this link additional
https://www.youtube.com/watch?v=hcvBDQUifHc


Discuss the resource based nature of the REST style

A URL a resource identifier that identifies/locates a resource in the server.Representational State Transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web. REST-style architectures consist of clients and servers.

The fundamental concept in any Restful API is the resource. A resource is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it. It is similar to an object instance in an object-oriented programming language, with the important difference that only a few standard methods are defined for the resource (corresponding to the standard HTTP GET,POST,PUT and DELETE methods),while an object instance typically has many methods.
Resources can be grouped into collections.Each collection is homogeneous so that it contains only one type of resource,and underscored.Resources can also exist outside any collection.In this case,we refer to these resources as singleton resources.Collections are themselves resources as well.
Collections can exist globally,at the top level of an API,but can also be contained inside a single resource. In the latter case,we refer to these collections as sub-collections.Sub-collections are usually used to express some kind of "contained in" relationship. We go into more detail on this in Relationships.

Explain the meaning of “representations” in REST style 

Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services Web resources were first defined on the World Wide Web as documents or files identified by their URLs.REST uses various representations to represent a resource where Text, J SON, XML. The most popular representations of resources are XML and J SON.

 REST, indicating their use in the domain of web 

REST (Representational State Transfer) is an architectural style for developing web services. REST is popular due to its simplicity and the fact that it builds upon existing systems and features of the internet's HTTP in order to achieve its objectives, as opposed to creating new standards, frameworks and technologies.
language-independent architectural style.REST-based applications can be written using any language, be it Java, Kotlin,NET, Angular or JavaScript. As long as a programming language can make web-based requests using HTTP, it is possible for that language to be used to invoke a Restful API or web service.On the server side,there are a variety of REST-based frameworks for helping developers create Restful web services,including Rest let and Apache CXF. From the client side,all of the new JavaScript frameworks,such as JQuery, Node.js,Angular and EmberJS,all have standard libraries built into their APIs that make invoking Restful web services and consuming the XML- or J SON-based data they return a relatively straightforward endeavour Similarly,Restful web services can be written using any language,so developers tasked with implementing such services can choose technologies that work best for their situation.

Identify contemporary examples of different types of implementations for the elements of REST style 

  • Client–server architecture.
  • Statelessness.
  • Cache ability.
  • Layered system.
  • Code on demand (optional)
  • Uniform interface.
  • Relationship between URI and HTTP methods.

The Representational State Transfer (REST) architectural style is a worldview that elevates information into a first-class element of architectures.REST allows us to achieve the architectural properties of performance,sociability,generality,simplicity,modifiable, and extensible.

Explain how to define the API of RESTful web services using RESTful URLs

Every system uses resources.These resources can be pictures,Video files,Web pages, business information, or anything that can be represented in a computer-based system.The purpose of a service is to provide a window to its clients so that they can access these resources. Service architects and developers want this service to be easy to implement, maintainable, extensible, and scalable. A Restful design promises that and more. In general, Restful services should have following properties and features, which I'll describe in detail:
  • Representations
  • Messages
  • URLs
  • Uniform interface
  • Stateless
  • Links between resources
  • Caching

pros and cons of using MVC for RESTful web service development, indicating the application of MVC in RESTful web service design 

The most common discussion I've seen regarding the pros and cons of REST tends to frame that discussion relative to SOAP.I have no experience in either.I am currently faced with a decision which my lack of experience is making hard for me to evaluate.I am beginning to develop an application that has several components - primarily an administrative aspect that allows the owner to administer several sites - and a public facing user interface that allows the user to interact with data held on the host.I need to evaluate the implications of allowing the latter part to be hosted anywhere and communicate with the former via a Restful architecture - or demanding that both components reside on the same host.What are the key implications of developing Restful architecture,particularly with regards to it's capacity in the following areas.

JAX-RS API and its implementations 

Developing Restful Web services that seamlessly support exposing your data in a variety of representation media types and abstract away the low-level details of the client-server communication is not an easy task without a good toolkit. In order to simplify development of Restful Web services and their clients in Java, a standard and portable JAX-RS API has been designed. Jersey Restful Web Services framework is open source,production quality,framework for developing Restful Web Services in Java that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation.
Jersey framework is more than the JAX-RS Reference Implementation. Jersey provides it’s own API that extend the JAX-RS toolkit with additional features and utilities to further simplify Restful service and client development. Jersey also exposes numerous extension SPIs so that developers may extend Jersey to best suit their needs.
Goals of Jersey project can be summarised in the following points
  • Track the JAX-RS API and provide regular releases of production quality Reference Implementations that ships with Glass Fish;
  • Provide APIs to extend Jersey & Build a community of users and developers; and finally
  • Make it easy to build Restful Web services utilising Java and the Java Virtual Machine.
  • Apache CXF, an open source Web service framework
  • Jersey, the reference implementation from Sun (now Oracle)
  • Rest easy, J Boss's implementation
  • Rest let
  • WebSphere Application Server from IBM




Identify the annotations in JAX-RS, explaining their use 

Annotations in the JAX-RS API are used to provide meta-data around the web resource. A typical example is to use the @GET annotation with the @Path annotation to identify the method that should handle a GET request to the specified URI in the @Path annotation.
What follows is a very quick overview of the annotations available to mark the methods and classes used to construct web resources. This is not an exhaustive list, there are a few more annotations in the JAR-RS arsenal, however, as the majority of the work of JAX-RS is in configuration and handling web resources, this is where you will find the majority of the API's annotations put to use.
This is the first in a three-part series looking at JAX-RS annotations.

@GETimport javax.ws.rs.GET;
@Producesimport javax.ws.rs.Produces;
@Pathimport javax.ws.rs.Path;
@PathParamimport javax.ws.rs.PathParam;
@QueryParamimport javax.ws.rs.QueryParam;
@POSTimport javax.ws.rs.POST;
@Consumesimport javax.ws.rs.Consumes;
@FormParamimport javax.ws.rs.FormParam;
@PUTimport javax.ws.rs.PUT;
@DELETEimport javax.ws.rs.DELETE;