Client-side development – jQuery

jQuery

A framework is something that usually forces a certain way of implementing a solution, whereas jQuery is just a tool to make implementing what you want to do easier.

jQuery provided features

  • HTML/DOM manipulation.
  • CSS manipulation.
  • HTML event methods.
  • Effects and animations.

Advantage of jQuery

The 3 main advantages of jQuery are lightweight when compared to other javascript frameworks. it has a wide range of plugins available for various specific needs. it is easier for a designer to learn jQuery as it uses familiar CSS syntax

Disadvantage of jQuery

The most serious disadvantage ofjQuery is that it is overweight kb wise. jQuery is a single JavaScript file “jquery.js” which contains all its DOM, events, effects, and Ajax components. The file over time and development has gained a substantial amount of kb.

How the jQuery handles page to load in the browser

jQuery makes it straightforward to set up event-driven responses on page elements. These events are often triggered by the end user’s interaction with the page, such as when text is entered into a form element or the mouse pointer is moved. In some cases, such as the page load and unload events, the browser itself will trigger the event.

How selectors and their use in jQuery

A  jQuery Selector is a function which makes use of expressions to find out matching elements from a DOM based on the given criteria. Simply you can say, selectors, are used to selecting one or more HTML elements using jQuery.

What is jQuery’s DOM

A DOM element represents a visual or functional element on the page which was created from the original HTML document. A jQuery object is a convenience wrapper around a DOM element in Javascript which is a method to manipulate theDOM which is a representation of the page which was created from an HTML file.

Importance of DOM

The functions associated with these objects determine how the objects may be manipulated, and they are part of the object model. The Document Object Model currently consists of two parts, DOMCore and DOM HTML The DOM Core represents the functionality used for XML documents, and also serves as the basis for DOM HTML.

Benefits of using jQuery

  • Search Engine Optimized — While search engines are getting better at being able to read the content within some Flash, everything within jQuery is set up as text.
  • Save Time — Five lines Of jQuery are equivalent to 25 lines Of conventional JavaScript code

 

 

Data Persistence

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

Persistence is “the continuance of an effect after its cause is removed”. In the context of storing data in a computer system, this means that the data survives after the process with which it was created has ended. In other words, for a data store to be considered persistent, it must write to non-volatile storage.

Meaning of data in data persistence

Persistent data in the field of data processing denotes information that is infrequently accessed and not likely to be modified. Dynamic data (also known as transactional data) is information that is asynchronously updated as new information becomes available

Meaning of database in data persistence

Persistence is “the continuance of an effect after its cause is removed”. In the context of storing data in a computer system, this means that the data survives after the process with which it was created has ended. In other words, for a data store to be considered persistent, it must write to non-volatile storage.

Meaning of database server in data persistence

database server is a server which houses a database application that provides database services to other computer programs or to computers, as defined by the client-server model. … Each database understands its query language and converts each submitted query to server-readable form and executes it to retrieve results.

Different types of databases                          

  •        Network databases.
  •        Relational databases.
  •        Object-oriented databases.
  •        Graph databases.
  •        ER model databases.
  •        Document databases.

Data warehouse

large store of data accumulated from a wide range of sources within a company and used to guide management decisions

Big data

Extremely large data sets that may be analyzed computationally to reveal patterns, trends, and associations, especially relating to human behavior and interactions

Application components communicate types

  • Activities.
  • Services.
  • Broadcast receivers.
  • Content providers

Differentiate the SQL statements, Prepared statements, and Callable statements

JDBC – StatementsPreparedStatement and CallableStatement. Once a connection is obtained we can interact with the database. The JDBC StatementCallableStatement, and PreparedStatement interfaces define the methods and properties that enable you to send SQL or PL/SQL commands and receive data from your database.

Development with ORM

Object-Relational Mapping (ORM) is a technique that lets you query and manipulates data from a database using an object-oriented paradigm. When talking about ORM, most people are referring to a library that implements the Object-Relational Mapping technique, hence the phrase “an ORM

Hadoop concept

Any number of ‘slave’ or ‘worker’ nodes – HDFS to store data – MapReduce to process data Two ‘master‘ nodes – Name Node: manages HDFS – Job Tracker: manages MapReduce Hadoop Basic Concepts and HDFS The Hadoop Project and Hadoop Components The Hadoop Distributed File System (HDFS)

SERVER-SIDE DEVELOPMENT 2 REST

Message oriented & Resource oriented

Message oriented

Message-Oriented Communication. Message-oriented communication is a way of communicating between processes. Messages, which correspond to events, are the basic units of data delivered.In synchronous communication, the sender blocks waiting for the receiver to engage in the exchange.

Resource oriented

A resource-oriented architecture (ROA) is the structural design supporting the inter networking of resources. … In information technology, architecture refers to the overall structure of an information system and the interrelationships of entities that make up that system.

Resource based nature of the REST style

A RESTful approach to software development can greatly simplify the task of application integration, but this new approach can often cause troubles for those with more of a legacy background in distributed computing. That’s when developers finds themselves creating more problems than they fix. Louvel’s advice is not to take the usual, traditional approach when developing RESTful APIs. Forget what you learned from the service-oriented, RPC based world. Then, you’ll discover that you are working without limitations and you can really start to solve your business problems. Furthermore, the modularity involved in developing a RESTful architecture means developers have smaller, more agile parts that provide greater flexibility when designing solutions that really work.

The main takeaway Louvel has for Java developers is this: apply as many principle from the tenants of RESTful development and design as possible, but at the same time, use only as much as is needed. See everything as a resource. Use calls from the HTTP protocol, especially GETs, PUTs, POSTs and DELETEs to effectively create and update your resources. Eventually, approaching the problem domain in a RESTful manner becomes second hand. By applying these foundational concepts, developers get a lot of built-in features that are common to the world-wide-web such as caching and automatic compression for free. And once the development team has got the basics down, kick it up a notch and try to see every problem as having a RESTful solution.

“Representations” in REST style

It means REST architecture could have multi level cache at client and server ends. … Resource — There must be resources with their unique resource identifier i.e. unique url in REST APIs. Representations — Representation is the value/response of the Resource at a point in time based on the media-type.

REST Architectural Elements and Constraints

The Representational State Transfer (REST) style is an abstraction of the architectural elements within a distributed hypermedia system. REST distinguishes three classes of architectural elements, they are:

  • Connectors
  • Components
  • Data Elements

REST Constraints

REST constraints are design rules that are applied to establish the distinct characteristics of the REST architectural style. If you follow all constraints designed by the REST architectural style your systems is considered RESTful.

These constraints don’t dictate what kind of technology to use; they only define how data is transferred between components and what benefits we get following the guidelines. Therefore, a RESTful system can be implemented in any networking architecture available.

  • Client-Server
  • Stateless
  • Cacheable
  • Uniform Interface
  • Layered System
  • Code On Demand (Optional)
  •  

Implementations of Jax RS API

Implementations of JAX-RS include:

  • Apache CXF, an open source Web service framework.
  • Jersey, the reference implementation from Sun (now Oracle)
  • RESTeasy, JBoss’s implementation.
  • Restlet.
  • WebSphere Application Server from IBM: …
  • WebLogic Application Server from Oracle, see notes.
  • Everrest, Codenvy’s Implementation.

Web services and SOAP

difference between website and web application

A web application or Rich Internet Applications is a web site that does more than displaying content, it has a business logic. It’s intended for user interactions, performing actual business functions. Compared to web sites, i.e. blogs and news sites, web apps provide a richer user experience

WSDL

WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly and then bound to a concrete network protocol and message format to define an endpoint.

Structure of the WSDL document

WSDL Document Elements. A WSDL document has a definitions element that contains the other five elements, types, message, portType, binding and service. The following sections describe the features of the generated client code.

 

ElementDescription
<types>Defines the (XML Schema) data types used by the web service
<message>Defines the data elements for each operation
<portType>Describes the operations that can be performed and the messages involved.
<binding>Defines the protocol and data format for each port type

Port type and operation

For example, a <portType> can combine one request and one response message into a single request/response operation. This is most commonly used in SOAP services. A portType can define multiple operations. The portType element defines a single operation, called sayHello

Binding VS service

A Service that is both Bound and Started can have methods inside of that can be called by bound client components. Since a Service doesn’t have to be started for a client to bind to it, this is something that you must be aware of. This means that a client binding to a Service will call onCreate()

HOW SOAP is used with HTTP

All the browsers support HTTP for compatibility and its the most widely used Internet Protocol. A SOAP method is an HTTP request/HTTP response that complies with the SOAP encoding rules. using SOAP, a protocol submitted to the W3C data can be enclosed in XML and transmitted using any number of Internet Protocols

Structure of SOAP message

The structure of a SOAP message. A SOAP message is encoded as an XML document, consisting of an <Envelope> element, which contains an optional <Header> element, and a mandatory <Body> element. The <Fault> element, contained in <Body> , is used for reporting errors

MIME header means

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support: Text in character sets other than ASCII. Non-text attachments: audio, video, images, application programs etc. Message bodies with multiple parts. Header information in non-ASCII character sets

The annotations in JAX-WS

JAX-WS Annotations (JSR 224). Describes the supported JAX-WS annotations and their associated properties. The @Action annotation specifies the WS-Addressing action that is associated with a web service operation

How a web service can be tested using different approaches

Testing of web services is one of the important type of software testing approach, which is mainly used to determine the expectations for reliability, functionality, performance, etc.

As these days Automated testing is considered as one of the most trending methodology in the field of software testing, hence testing web apps based on RESTful APIs through automation will provide effective test results. Some of the best & popular tools for web services testing are:

  1. SoapUI,
  2. TestingWhiz,
  3. SOATest
  4. TestMaker,
  5. Postman

Industry Practices and Tools 2

Importance of maintaining the quality of the code

Code Quality,A group of different attributes and requirements, determined and prioritized by your business is called Code quality. Main attributes Clarity, Maintainable, Documented, Refactored ,Well-tested ,Extendible,Efficiency.There are three main reasons why code quality is important.

  • Readability
  • Maintainability
  • Lower technical debt

qualitative approach

We can also use a qualitative approach. Sometimes, the best measure of code quality is to ask someone to look at it and comment on it. This is easiest if we have a style guide and consistent rules for how we write our code.

Package Manager/dependency

These are commonly used to automate the process of removing programs configuring, upgrading, and installing.An external standalone program module that can be as small as a single file or as large as a collection of files and folders organized into packages that performs a specific task is called a Dependency .

Dependency Management Tools

  • NuGet
  • Composer
  • David
  • Nanny
  • Bower
  • Sprockets

Build Tool

Programs that automate the creation of executable applications from source code is called Build tools . Building includes compiling, packaging and linking the code into a executable form.Basically build automation is the act of scripting of tasks that software.developers do in their day-to-day activities. In small projects, developers will manually invoke the build process. In the larger projects, this is not practical. It is very complicate to keep track of what needs to be built, in what dependencies and what sequence are in the building process. Using an automation tool allows the build process to be more compatible.

Maven

Maven, a Yiddish word meaning accumulator of knowledge, was originally started as an attempt to simplify the build processes in the Jakarta Turbine project. There were several projects each with their own Ant build files that were all slightly different and JARs were checked into CVS.

Industry Practices and Tools

VCS(version controlling systems)

Version control systems are a category of software tools that help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database.There are three models of VCS,Local version control system,Centralized version control system and Distributed version Control system.

Git and GitHub

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.
You do not need GitHub to use Git.

Git commands

  • add
  • status
  • diff
  • commit
  • reset
  • rm
  • push

Those are basic commands of the Git. In this part we will learn about push and commit commands.
Basically git commit “records changes to the repository” while git push “updates remote refs along with associated objects”. So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository.

Staging area and Git directory

When you work on your project making changes you are dealing with your project’s working directory. This is the project directory on your computer’s filesystem. All the changes you make will remain in the working directory until you add them to the staging area (via git add command). The staging area is best described as a preview of your next commit. Meaning, when you do a git commit, git will take the changes that are in the staging area and make the new commit out of those changes.

CDN

CDN is short for content delivery network. A content delivery network (CDN) is a system of distributed servers (network) that deliver pages and other Web content to a user, based on the geographic locations of the user, the origin of the webpage and the content delivery server.Differences Between CDNs and Web Hosting. Web Hosting is used to host your website on a server and let users access it over the internet. … Web Hosting normally refers to one server. A content delivery network refers to a global network of edge servers which distributes your content from a multi-host environment.Best CDN Providers To Speed Up A Website Cloudflare, MaxCDN,Cachefly and Rackspace are the free and best CDN’s can be used to making websites.

Benefits of using CDN,

• Improving website load times.
• Reducing bandwidth cost.
• Increasing content availability and redundancy.
• Improving website security .

Virtualization

Virtualization describes a technology in which an application, guest operating system or data storage is abstracted away from the true underlying hardware or software. A key use of virtualization technology is server virtualization, which uses a software layer called a hypervisor to emulate the underlying hardware. Virtualization reduces the number of physical servers, reducing the energy required to power and cool them. Save time. … It’s also much faster to deploy a virtual machine than it is to deploy a new physical server. Reduce desktop management headaches.

There are three major types of virtualization

  • Server Virtualization.
  • Client (or Desktop) Virtualization.
  • Storage Virtualization.

A hypervisor or virtual machine monitor (VMM) is computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine .

Introduction to the frameworks

Programming Paradigms

There are seven main programming paradigm,each with different structures. Imperative,Structured,Procedural,Functional,Event-driven,Object oriented and Declarative Paradigm. Declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow.Imperative programming is a programming paradigm that uses statements that change a program’s state.Object-oriented programming is an approach to problem-solving where all computations are carried out using objects.The functional programming paradigm was explicitly created to support a pure functional approach to problem solving. Functional programming is a form of declarative programming. In contrast, most mainstream languages, including object-oriented programming languages such as C#, Visual Basic, C++, and Java, were designed to primarily support imperative (procedural) programming. event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs or threads.

Key features of Object Oriented Programming

Objects,Classes,Data Abstraction,Encapsulation,Inheritance and Polymorphism concepts are the key features of object oriented programming. An entity that has state and behavior is known as an object. Collection of objects is called class. It is a logical entity.
When one object acquires all the properties and behaviors of a parent object, it is known as inheritance. If one task is performed by different ways, it is known as polymorphism.Hiding internal details and showing functionality is known as abstraction. Binding (or wrapping) code and data together into a single unit are known as encapsulation.

Software run-time Architecture

Languages can be categorized as Compiled , Scripting and Markup languages.
Markup languages describing descriptions of how text and other forms of components should appear in a certain context (i.e. HTML, hypertext markup language – is the instructions for the context of a web page).
Scripting language usually use an interpreter or some running application to take programming commands and turn them into instructions to be executed. Scripting languages are programming languages, but they fit into a category called interpreted languages (i.e. Python, Ruby, PHP). You can write full featured applications with scripting languages.
compiled languages are not human readable, but instead is in an architecture-specific machine language. Creating a compiled program requires several steps. First, the programmer, using a development tool or even a simple text editor, writes the source code in a chosen computer language. If the program is complex, pieces of it may be spread across several files. The programmer then compiles the program, sorting and linking the modules and translating it all into machine code that the computer understands .

JavaScript code execution

JavaScript is an interpreted language, not a compiled language. A program such as C++ or Java needs to be compiled before it is run. The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute.

Framework,Library and Plugins

A framework is a collection of useful tools written for a particular programming language.Ex: ActiveX and .NET for Windows development, Cocoa for Mac OS X, Cocoa Touch for iOS, and the Android Application Framework for Android. A library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications.
In computing, a plug-in (or plugin) is a software component that adds a specific feature to an existing computer program. When a program supports plug-ins, it enables customization.