0% found this document useful (0 votes)
17 views36 pages

DOC-20250604-WA0025.

The document provides an overview of backend and frontend programming, highlighting their roles in web development. It explains the differences between frontend (user interface) and backend (server-side processes), along with examples of programming languages used for each. Additionally, it covers specific languages like JavaScript, PHP, Ruby, and Rust, detailing their features and applications in web development.

Uploaded by

crushpra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views36 pages

DOC-20250604-WA0025.

The document provides an overview of backend and frontend programming, highlighting their roles in web development. It explains the differences between frontend (user interface) and backend (server-side processes), along with examples of programming languages used for each. Additionally, it covers specific languages like JavaScript, PHP, Ruby, and Rust, detailing their features and applications in web development.

Uploaded by

crushpra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Unit 1

INTRODUCTION

Introduction to backend programming


In the computer world, the "backend" refers to any part of a website or software program that
users do not see. It contrasts with the frontend, which refers to a program's or website's user
interface. In programming terminology, the backend is the "data access layer," while the
frontend is the "presentation layer."
Most modern websites are dynamic, meaning webpage content is generated on-the-fly. A
dynamic page contains one or more scripts that run on the web server each time the page is
accessed. These scripts generate the content of the page, which is sent to the user's web
browser. Everything that happens before the page is displayed in a web browser is part of the
backend.
Examples of backend processes include:

1.​ processing an incoming webpage request

2.​ running a script (PHP, ASP, JSP, etc.) to generate HTML

3.​ accessing data, such as an article, from a database using an SQL queries

4.​ storing or updating records in a database

5.​ encrypting and decrypting data

6.​ handling file uploads and downloads

7.​ processing user input via JavaScript

All of the examples above, besides the last one, are server-side processes that run on the web
server. JavaScript is a client-side process, meaning it runs in the web browser. JavaScript may
be considered a backend or a frontend process, depending on if the code affects the user
interface or not.

The backend and frontend work together to create the full user experience. Data generated in
the backend is passed to the frontend and presented to the user. While some organizations
have separate backend and frontend development teams, the line between the two layers is
rarely black and white. Therefore, many developers write code for both the backend and
frontend. This is known as full-stack development.

What is Frontend

Front-end web development is a huge name in the world of the internet and computers. Most
people will know what they are because those people could be working as web developers.

Now, it is their work to develop the web and it is possible that they have come across the term
‘frontend’ many times.
Now, what do you mean by the term frontend or front-end web development? Well, it is
nothing but the part that can be seen by the users whenever they are using the internet.

Suppose you are on the internet looking for something like ‘Facebook’ then you see there are
search results coming after your search that is what the frontend is basically.

Difference between Frontend & Backend

The difference between frontend and backend is that frontend web development is the
user-interface whereas back-end means the application for the servers that cannot be seen by
the users.

In other words, backend means all the processes and applications that work behind the scenes
whenever a particular web page pops up.

Parameters of
Frontend Backend
Comparison

Meaning Frontend is the part of a web page where Backend is the part of a web page where
the users can see like GUI. the users cannot see this part.

Role Frontend is where users can perform Backend, on the other hand, plays a
their tasks like reading texts, design, and crucial role for making the user
other kinds of stuff. interface possible in a particular
webpage.

Client-side/Serv Frontend is the client-side application of Backend is considered as the server-side


er-side a web page. of the application.

Essentials In the case of frontend, the essentials Backend, on the other hand, essentials
include HTML, JavaScript, and CSS. like Ruby, Python, and many others.

Front-end vs. back-end languages

Front-end languages are primarily concerned with the ‘user’ aspect of the software. The
front end deals with all of the text, colors, buttons, images, and navigation that the user will
face when navigating your website or application. Anyone with a background in graphic
design or art may be more inspired to begin learning one of the front-end languages.

Some examples of front-end programming languages include:


●​ HTML
●​ CSS
●​ JavaScript
●​ React
Back-end languages deal with storage and manipulation of the server side of software. This
is the part of the software that the user does not directly come into contact with but supports
their experience behind the scenes. This includes data architecture, scripting, and
communication between applications and underlying databases.

Anyone with experience in mathematics or engineering may find more interest in back-end
development.

Some examples of back-end programming languages include:


●​ JavaScript
●​ PHP
●​ Java
●​ Python
●​ Ruby
●​ C#

Scripting languages

Programmers use scripting languages to automate repetitive tasks, manage dynamic web
content, or support processes in larger applications. Some common scripting languages
include:
●​ PHP
●​ Ruby
●​ Python
●​ bash
●​ Perl
●​ Node.js

Various backend programming languages such as PHP, Python,


Ruby, Java, Rust, C# etc.
JavaScript
JavaScript is a dynamic computer programming language. It is lightweight and most
commonly used as a part of web pages, whose implementations allow client-side script to
interact with the user and make dynamic pages. It is an interpreted programming language
with object-oriented capabilities.
JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript,
possibly because of the excitement being generated by Java. JavaScript made its first
appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of
the language has been embedded in Netscape, Internet Explorer, and other web browsers.
The ECMA-262 Specification defined a standard version of the core JavaScript language.
●​ JavaScript is a lightweight, interpreted programming language.
●​ Designed for creating network-centric applications.
●​ Complementary to and integrated with Java.
●​ Complementary to and integrated with HTML.
●​ Open and cross-platform
<!DOCTYPE html>
<html>
<body>

<h2>My First JavaScript</h2>

<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>

<p id="demo"></p>

</body>
</html>
ii)​ Program

<!DOCTYPE html>
<html>
<body>

<h2>What Can JavaScript Do?</h2>

<p>JavaScript can change HTML attribute values.</p>

<p>In this case JavaScript changes the value of the src (source) attribute of an
image.</p>

<button
onclick="document.getElementById('myImage').src='pic_bulbon.gif'">Turn
on the light</button>

<img id="myImage" src="pic_bulboff.gif" style="width:100px">

<button
onclick="document.getElementById('myImage').src='pic_bulboff.gif'">Turn
off the light</button>

</body>
</html>

What Can JavaScript Do?


JavaScript can change HTML attribute values.
In this case JavaScript changes the value of the src (source) attribute of an image.
Turn on the light Turn off the light

PHP(Personal Home Page)


PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web
pages.

PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

PHP is the abbreviation of Hypertext Preprocessor and earlier it was abbreviated as


Personal Home Page. It is a general-purpose programming language used to design a
website or web application. It is the server-side scripting language embedded with HTML to
develop Static website, Dynamic website, or Web applications.
The syntax of PHP is similar to C, C++, and Java. It manages the dynamic content, database,
session, cookies, etc of a dynamic website.
The websites like www.facebook.com, www.yahoo.com are also built on PHP. It can be easily
embedded with HTML files and HTML codes can also be written in a PHP file. The thing
that differentiates PHP and HTML is, PHP codes are executed on the server whereas HTML
codes are directly rendered on the browser. PHP codes are first executed on the server and
then the result is returned to the browser. The only information that the client or browser
knows is the result returned after executing the PHP script on the server and not the actual
PHP codes present in the PHP file. Also, PHP files can support other client-side scripting
languages like CSS and JavaScript.
Syntax:
<!DOCTYPE html>​
<html>​
<body>​

<?php​
echo "My first PHP script!";​
?>​

</body>​
</html>

Characteristics of PHP: ​
●​ Open Source: It is an open-source programming language so it can download freely.
●​ Simplicity: Since PHP does not include libraries like C/C++ so its structure is simple. It
contains lots of pre-defined functions to secure your data. Execution of PHP starts from
(<?php) and end with closing escape sequence (?>).
●​ Efficiency: PHP 4.0 uses resource allocation mechanisms and object-oriented
programming, in addition to session management features. It eliminates unnecessary
memory allocation.
●​ Security: Many encryption functions are supported by PHP to secure the data.
●​ Flexibility: It is a very flexible language because it can be embedded with HTML, CSS,
JavaScript, XML, and many other languages. Also, the PHP code can be run on any
device like Phone, Tabs, Laptops etc.
●​ Object-Oriented: The object-oriented programming features are added in PHP 4.0.

Advantages of PHP: ​

●​ It is supported by all Operating Systems like Windows, Linux, Unix, etc.


●​ It is integrated with other programming languages (HTML, CSS, JavaScript, etc) and
databased.
●​ It is easy to connect with the database to store and retrieve data from the database.
Multiple databases can also be integrated with PHP.
●​ It is the fastest programming language compared to other programming languages.
●​ PHP frameworks and tools are used to protect web applications from outer attacks and
security threats.
Disadvantages of PHP: ​

●​ Since PHP is open-source so its code is visible to all programmers. If any bugs exist in
the source code then its weakness can be explored by other programmers.
●​ It is not suitable for large applications because its maintenance is difficult.
●​ The error handling of a PHP framework is not good.

What Can PHP Do?

●​ PHP can generate dynamic page content


●​ PHP can create, open, read, write, delete, and close files on the server
●​ PHP can collect form data
●​ PHP can send and receive cookies
●​ PHP can add, delete, modify data in your database
●​ PHP can be used to control user-access
●​ PHP can encrypt data

Ruby
Ruby is an interpreted, high-level, general-purpose programming language that was designed
and developed by Yukihiro "Matz" Matsumoto in the mid-1990s.

Some of it's features include:

●​ dynamic typing and duck typing


●​ multiple paradigms support(object-oriented/procedural/functional)
●​ reflective typing
●​ garbage collection
●​ centralized package management through Ruby Gems
●​ exception handling
The inspirations behind Ruby were Perl, Smalltalk, Ada, BASIC, and Lisp.
Semantics
Ruby has taken it's semantics, as well as language structures, from a bunch of other
pre-existing languages.

1.​ Variables in Ruby always refer to their objects.


2.​ Every function is a method, and methods are always called on objects.
3.​ Ruby supports inheritance - features include dynamic dispatch, mixins and singleton
methods.
4.​ Ruby does not support multiple inheritance directly - but instead, classes can
import modules as mixins. A mixin is a class, that has been mixed with a module.
5.​ Ruby is also a multi-paradigm programming language - it can be written as procedural as
well as functional programming language.

Philosophy
Ruby was designed to make programming extremely easy, and readable for better
productivity and fun. Usually, programming languages can be quite overwhelming for a
beginner, but this is not the case with Ruby.

in Ruby, it can be written on a single line-

5.times{puts("hello world")}

Syntax
Ruby has it's syntax similar to Python or Perl. Classes and methods are defined by keywords,
whereas code blocks can be defined by either keywords, or braces.

One of the features that makes Ruby different from Python or Perl, is that Ruby keeps it's
instance variables completely private to the class and only exposes them through accessor
methods(unlike the conventional "getter" and "setter" methods).

Installing Ruby
This article assumes that you have never installed Ruby on you computer before, be it
for Rails framework, or Shoes GUI toolkit, etc.
For Windows:
Head to the following link (this version is known as the RubyInstaller), and download current
stable version (2.7.2 at the time of writing this article).

You may also see another setup with it, called the Ruby Installer for Windows 2. Just press
[ENTER], and it will auto-select the required dependencies.​
Now, to see if Ruby has been installed, open the command prompt, and try typing this-

ruby -v
Interaction
Similar to Python's shell(iPython), Ruby has it's own REPL called the IRB(Interactive Ruby
Shell). This can be accessed by typing the following command in the terminal-

$ irb
irb(main):001:0>

Rust
Since its launch in 2010, Rust has forged a path directly to the heart of the developer’s
community, reaching the enviable top position among the most loved languages, according to
the Stack Overflow Developer Surveys.

Part of that success is the language’s flexibility: Rust can be used to create game engines,
operating systems, file systems, browser components, websites and tools, and more.

In short, Rust is a static multi-paradigm programming language, more focused on


performance and security. In practice, its usage resembles a lot of C++, being very light,
simple, and fast.

It was created by Graydon Hoare for Mozilla and later refined until it reached a stable version
for release.

In this article, we’ll take some time to analyze the language at its very introductory topics.
Let’s go!

Why Use Rust?

Rust is really fast, to the point of almost reaching C++ performance numbers.
It plays very well with systems that require intense safety and concurrency by defining
strong security barriers, ensuring the system’s protection at its core.

This focus on safety can be seen everywhere within Rust, from the syntax to the basic
data structure definitions

For example, whenever you declare a variable in Rust, it is going to create it as a


constant. Yes, you read that right! If you want that variable to be, well, variable…
you’d have to explicitly say that to Rust.

Rust also worries a lot about memory safety by not allowing, for example, null
pointers. When it comes to data values, you can only initialize them via a bunch of
predefined ways (all of which require a default value to work).

Regarding garbage collection, none of the common systems used by Java or C# is


adopted by Rust. It, instead, makes use of a convention called Resource acquisition is
initialization (RAII) on which the references to the objects, disk space, etc., are kept
stored in a specific part of the memory and auto managed by Rust whenever the
memory needs to be emptied.

Set Up & Hello World

If you just want to test it out without installing it, Rust offers an online
playground for that.

Otherwise, just follow the instructions on the Install page. You only
need a single command for that:

curl –proto ‘=https’ –tlsv1.2 -sSf https://sh.rustup.rs | sh

Once you enter the Playground page, you see a Hello World example
already there:

fn main() {

println!(“Hello, world!”);

It’s nice to have that when getting started, since it demonstrates the
basic structure of a Rust program:

●​ You need a main function, like many other languages;

●​ Each function is preceded by the identifier fn;


●​ To print something to the default system’s output, use
the println! function.

You should see a result like the one below:

Figure 1: “Hello World” in Rust Playground

Python :-

Python is a widely used general-purpose, high level programming language. It was created by
Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was
designed with an emphasis on code readability, and its syntax allows programmers to express
their concepts in fewer lines of code.
Python is a programming language that lets you work quickly and integrate systems more
efficiently.
There are two major Python versions: Python 2 and Python 3.
Syntax:-

print("Hello, world!")
Reason for increasing popularity

1.​ Emphasis on code readability, shorter codes, ease of writing


2.​ Programmers can express logical concepts in fewer lines of code in comparison to
languages such as C++ or Java.
3.​ Python supports multiple programming paradigms, like object-oriented, imperative and
functional programming or procedural.
4.​ There exists inbuilt functions for almost all of the frequently used concepts.
5.​ Philosophy is “Simplicity is the best”.

LANGUAGE FEATURES

●​ Interpreted
●​ There are no separate compilation and execution steps like C and C++.
●​ Directly run the program from the source code.
●​ Internally, Python converts the source code into an intermediate form
called bytecodes which is then translated into native language of specific
computer to run it.
●​ No need to worry about linking and loading with libraries, etc.
●​ Platform Independent
●​ Python programs can be developed and executed on multiple operating
system platforms.
●​ Python can be used on Linux, Windows, Macintosh, Solaris and many
more.
●​ Free and Open Source; Redistributable
●​ High-level Language
●​ In Python, no need to take care about low-level details such as managing
the memory used by the program.
●​ Simple
●​ Closer to English language;Easy to Learn
●​ More emphasis on the solution to the problem rather than the syntax
●​ Embeddable
●​ Python can be used within C/C++ program to give scripting capabilities
for the program’s users.
●​ Robust:
●​ Exceptional handling features
●​ Memory management techniques in built
●​ Rich Library Support
●​ The Python Standard Library is very vast.
●​ Known as the “batteries included” philosophy of Python ;It can help
do various things involving regular expressions, documentation
generation, unit testing, threading, databases, web browsers, CGI, email,
XML, HTML, WAV files, cryptography, GUI and many more.
●​ Besides the standard library, there are various other high-quality
libraries such as the Python Imaging Library which is an amazingly
simple image manipulation library.

1)​ C#
●​ C# (C-Sharp) is a programming language developed by Microsoft that
runs on the .NET Framework.
●​ C# is used to develop web apps, desktop apps, mobile apps, games
and much more.

What is C#

C# is pronounced "C-Sharp".

It is an object-oriented programming language created by Microsoft that runs on the .NET


Framework.

C# has roots from the C family, and the language is close to other popular languages
like C++ and Java.

The first version was released in year 2002. The latest version, C# 11, was released in
November 2022.

C# is used for:

●​ Mobile applications
●​ Desktop applications
●​ Web applications
●​ Web services
●​ Web sites
●​ Games
●​ VR
●​ Database applications
●​ And much, much more!

Why Use C#

●​ It is one of the most popular programming language in the world


●​ It is easy to learn and simple to use
●​ It has a huge community support
●​ C# is an object oriented language which gives a clear structure to programs and
allows code to be reused, lowering development costs
●​ As C# is close to C, C++ and Java, it makes it easy for programmers to switch to C#
or vice versa

Program.cs
using System;

namespace HelloWorld

classProgram

staticvoidMain(string[]args)

{
Console.WriteLine("Hello World!");

Result:

Hello World!

Framework
A framework is a set of tools in programming on which to build well-structured, reliable
software and systems. In this guide, we will explain what is a framework in programming in
simple terms, explain why a framework is necessary, and detail various framework examples.

What is a Framework

The dictionary definition of framework as a “basic structure underlying a system” is not far
off from understanding what is a framework in programming. Whether the system is a house,
a car, a theory, or a mobile app, the concept of the framework is the same: it provides the
support and basic ‘guide’ of the structure being built.

A framework in programming is a tool that provides ready-made components or solutions


that are customized in order to speed up development. A framework may include a library,
but is defined by the principle of inversion of control (IoC). With traditional programming,
the custom code calls into the library to access reusable code. With IoC, the framework calls
on custom pieces of code when necessary.

A framework can include support programs, compilers, code libraries, toolsets, and APIs to
develop software and create systems. Open-source frameworks are always being updated and
improved.
Why Frameworks are Used in Software Development?
The purpose of a framework is to assist in development, providing standard, low-level
functionality so that developers can focus efforts on the elements that make the project
unique.
The use of high-quality, pre-vetted functionality increases software reliability, speeds up
programming time, and simplifies testing. With an active base of users and ongoing code
improvements, frameworks help improve security and offer a base of support.
Ultimately, frameworks are used to save time and money.

What are the Features of a Good Framework


There are many kinds of frameworks, with some more popular than others. Developers often
choose frameworks they are most familiar with, but that framework may not be the right for
the job. Instead, consider the following features of good frameworks when deciding on the
right framework for the project at hand:
●​ Functionality – choose a framework that provides the functionality needed for the
project at hand, respecting that each framework has its limits and not investing in a
framework that does far more than your project will ever need.
●​ Consistency – a framework can assist in consistency for large or distributed teams
●​ Documentation – choose a framework that has well-documented code and that
provides implementation training
●​ Active Community – frameworks are only as strong as the user base of support.
Choose a framework that is well-established with an active user base.
Challenges of Using a Software Framework
Software frameworks can become a costly crutch if developers are not strong in the language
the framework is based upon or if the developer over-relies on the framework instead of
custom code, a problem which can lead to software bloat and performance issues.
There are risks in choosing a framework that is too new or not well supported, which could
require costly re-tooling if the framework becomes obsolete. Similarly, if the framework has
limitations that are not well understood up front, this could impact the project.

Types of Programming Frameworks


There are a variety of different programming frameworks, each built upon a programming
language and specializing in its function, whether it’s working on a web app, database,
or mobile app. In this section, we will break down various types of programming
frameworks, popular frameworks for each type, and common examples.
1. Web Frameworks
Web application frameworks (WAF), or web frameworks (WF), support the development of
web applications with web services, web resources, and web APIs. There are different web
frameworks for both the front-end (how the web app looks) and the back-end (how it works).

2. Front-End Frameworks
Front-end frameworks (client-side frameworks) provide basic templates and components of
HTML, CSS, and JavaScript for building the front-end of a website or web app.
Angular
What is Angular? Angular is an open-source web application framework based on
TypeScript and maintained by the Angular Team at Google. Angular features a large
ecosystem of tools and solutions contributed by a wide user base. Angular is ideally suited for
highly customized web apps and progressive web apps (PWAs).
AngularJS refers to all 1.X versions of the framework that previously were JavaScript-based,
with Angular being a complete rewrite using TypeScript for all versions 2 and up. There are
over 1.4 million live websites using Angular.
Angular Framework Examples: PayPal, Upwork, Google, Nike
React JS
What is React JS? React JS (React) is an open-source framework for JavaScript for building
user interfaces (UI) and their components. While its narrow focus may be a limiting factor,
React is easy to use, has a rich package ecosystem, and is ideally suited for feature-rich apps.
React is maintained by Facebook and the wider community and is currently the most popular
front-end framework download in the past year.
React JS Framework Examples: Facebook, Instagram, Uber, Netflix, Airbnb
Vue JS
What is Vue JS? Vue JS (Vue.js) is another JavaScript-based framework, but with greater
flexibility around the use of HTML and CSS and the model-view-viewmodel (MVVM)
architecture. Vue is easy to learn and has a very large community of support.
Vue is currently the second most popular download behind React, but ahead of Angular.
Vue JS Framework Examples: Trustpilot, Nintendo, Behance
3. Back-End Frameworks
Back-end frameworks (server-side frameworks) provide generic functionalities that can be
assembled or built upon to assist in development. The choice in framework will be dictated
by the programming language chosen for development as well as the target platform(s).

Ruby on Rails
What is Ruby on Rails? Ruby on Rails is an open-source framework written with the Ruby
language. Ruby runs on Linux and is based upon the model-view-controller (MVC)
architecture. Ruby on Rails is secure and scalable and benefits from large third party libraries
to speed up development.
Nearly 17% of the top 10k websites leverage Ruby on Rails.
Ruby on Rails Framework Examples: Airbnb, Kickstarter, BaseCamp, CafePress

PHP Frameworks (Laravel, CodeIgniter, CakePHP)


What are PHP Frameworks? PHP runs on diverse platforms and is widely compatible,
making it popular as a language for back-end development. The most popular PHP
frameworks are Laravel, CodeIgniter and CakePHP.
Laravel features expressive and elegant syntax, helping make coding faster, and leveraging a
powerful Blade template engine. CodeIgniter offers a light framework that has one of the
smallest footprints, saving time with less coding needed. CakePHP is considered the
“workhouse” of the three, leveraging a scaffolding system and deferring to convention over
configuration, which saves time in development.
PHP Framework Examples: MyRank (Laravel), Casio (CodeIgniter), Nissan (CodeIgniter),
10FastFingers (CakePHP)

Django
What is Django? Django is an open-source framework for Python that encourages rapid,
scalable development and clean design. Django’s aim is to provide almost everything you
need, making it fast to piece together what you need from existing extras. Django is popular
for visual effects, games, and interactive services.
Django Framework Examples: Disqus, Instagram, Spotify, YouTube

ASP.NET and ASP.NET Core


What is ASP.NET? ASP.NET is a cross-platform open-source framework developed by
Microsoft, with ASP.NET Core a re-implementation as a modular web framework. ASP.net
supports web apps and services with .NET, C#, F#, and Visual Basic programming languages.
ASP.Net Framework Examples: Microsoft, StackOverflow, GoDaddy
4. Mobile App Development Frameworks
A mobile development framework (mobile app development framework) supports the
development of mobile applications for a specific environment, classified as native (platform
specific), hybrid (native back end shell with web app front-end), or cross-platform (shared
codebase for all). There are many mobile app development frameworks not covered here
including, among many, Swiftic, Native Scripts, and Ionic.

React Native
What is React Native? React Native is an open-source JavaScript UI framework created by
Facebook and used to develop applications for Android, iOS, macOS, tvOS, web, Windows,
and UWP. React Native uses the React library for UIs, targeting mobile platforms instead of
the browser.
React Native Framework Examples: Facebook, Skype, Facebook, Instagram, Tesla
Flutter
What is Flutter? Flutter is Google’s open-source mobile UI framework for creating
cross-platform applications and, most recently with Flutter 2, web and desktop (native) apps.
Flutter is based upon Dart and is considered a modern framework, being simple to use and
leveraging hot reload to see results in real-time.
Flutter Framework Examples: Amazon, Microsoft, Adobe, eBay, Google ads
Xamarin
What is Xamarin? Xamarin is an open-source framework using C# and .NET for creating
apps, owned by Microsoft. Xamarin is a cross-platform framework that allows you to reuse a
shared codebase. With Xamarin, UI components convert into platform-specific elements at
runtime, allowing a more native experience for iOS, Android, and Windows.
Xamarin Framework Examples: Alaska Airlines, Microsoft Azure, Outback, BBC
Goodfood
5. Content Management Frameworks
A Content Management System (CMS) is software that enables users to build, organize,
deliver, and modify different content including blog posts, eBooks, mobile apps, or other
online solutions. A content management framework (CMF), sometimes referred to as a CMS
platform, is a tool that supplies reusable components for managing web content, sharing
aspects of a web app framework and a CMS.
Decisions around CMS frameworks extend beyond simply pricing, language, or ease of use
to important considerations around SEO, personalization, and security.
WordPress
What is WordPress? WordPress is the leading free open-source CMS platform, used by
over 42% of all websites.
WordPress is very user-friendly, making it ideal for the non-technical user developing a small
blog or for larger brands supporting everything from microsites to large eCommerce stores.
Many plug-ins, themes, and extensions create a backbone for a personalized, flexible site that
has the potential to be sure – as long as you choose vetted, regularly updated plugins.
WordPress Framework Examples: Sony Music, Angry Birds, TechCrunch, The New
Yorker, BBC America
Drupal
What is Drupal? Drupal is a free open-sourced modular CMS written in PHP that is
supported by a large community. Drupal does, however, require more technical knowledge
than some other frameworks.
Drupal is known for its flexible taxonomy, making it ideally suited for projects that have a lot
of content and/or many community features and large webmaster teams.
Drupal Framework Examples: Arsenal FC, InStyle, Mattel, Tesla, Warner Bros. Records
Joomla
What is Joomla? Joomla is a free open-sourced CMS that, like Drupal and WordPress, is
easy to customize with templates and extensions. Joomla is easier to use than Drupal for the
non-technical, but a bit harder than WordPress. Joomla is the third most popular CMS
platform, SEO-optimized out of the box and has a great security track record.
Joomla Framework Examples: IKEA, LINUX, Holiday Inn, Harvard University
Kentico
What is Kentico? Kentico is a commercial framework / platform built in ASP.NET and
Microsoft SQL Server, offering the benefit of a faster implementation with more ready-made
options. Kentico leverages simple page building and editing tools.
Kentico Framework Examples: Skype.com, NewsMax, Swagger.io, Gibson, First American
Bank
6. Data Science Frameworks
Data science is a broad field related to the application of statistics, scientific methods,
algorithms or systems to extract knowledge from data. Today, data science is a booming area
of interest, driven in part by the opportunities of artificial intelligence and machine learning.
While the vast majority of data science involves the use of Python, there is a growing use of
data science frameworks including TensorFlow, PyTorch, Apache Spark, and NumPy. This
guide will outline one such framework:
Tensorflow
What is TensorFlow? TensorFlow is an open-source machine learning (ML) platform,
developed by Google, that is based on deep learning neural networks. TensorFlow provides
an open source library and tools to build and deploy ML powered apps. On-device deep
learning takes the form of speech recognition, image recognition, gesture recognition, object
localization, translation, optical character recognition, voice synthesis and text classification.
Tensorflow Framework Examples: Google Translate, FaceNet, Mozilla’s Deep Speech,
Google RankBrain

Common Misconceptions About Programming Frameworks


There may be some lingering misconceptions or confusions about programming frameworks,
including:

Framework vs Programming Language


It is a common mistake to confuse a framework and a programming language, given that both
are used to develop software. The best way to distinguish the two is by purpose: while a
language can help you build many things, a programming framework is purpose-built for one
purpose only – whether a web app, mobile app, CMS, or data science (as above).

A specific programming language is the foundation for each programming framework: the
instructions telling the framework what to do. The framework then is the platform to help you
develop software. You do not have to use a framework to develop software, but all software
is developed with programming language(s).

Framework vs Library
It is very common to confuse the term framework and library, as both are tools used within
programming. In fact, as described above in the section “What is a Framework?,” a library is
just one tool available within a framework.
A framework is your structure or environment to build your software: it contains access to
various tools, including libraries, to assist in your build.
A library is a set of low-level components that can be invoked (called) for a specific outcome.
You can access a library directly, called from the code, or a framework can supply access to
libraries and call out to the code (inversion of control).
●​ Window Object: Window Object is object of the browser which is always at top of the
hierarchy. It is like an API that is used to set and access all the properties and methods of
the browser. It is automatically created by the browser.
●​ Document object: When an HTML document is loaded into a window, it becomes a
document object. The ‘document’ object has various properties that refer to other objects
which allow access to and modification of the content of the web page. If there is a need
to access any element in an HTML page, we always start with accessing the ‘document’
object. Document object is property of window object.
●​ Form Object: It is represented by form tags.
●​ Link Object: It is represented by link tags.
●​ Anchor Object: It is represented by a href tags.
●​ Form Control Elements:: Form can have many control elements such as text fields,
buttons, radio buttons, checkboxes, etc.

Foundation Paradigms: OOPs, Design Patterns,


Object Oriented Design, JSON, DOM, AJAX
Paradigm can also be termed as method to solve some problem or do some
task. Programming paradigm is an approach to solve problem using some
programming language or also we can say it is a method to solve a problem
using tools and techniques that are available to us following some approach.
There are lots for programming language that are known but all of them need
to follow some strategy when they are implemented and this
methodology/strategy is paradigms. Apart from varieties of programming
language there are lots of paradigms to fulfil each and every demand. They
are discussed below:​
1. Imperative programming paradigm: ​
It is one of the oldest programming paradigm. It features close relation to
machine architecture. It is based on Von Neumann architecture. It works by
changing the program state through assignment statements. It performs step
by step task by changing state. The main focus is on how to achieve the goal.
The paradigm consist of several statements and after execution of all the
result is stored.
Advantage:
1.​ Very simple to implement
2.​ It contains loops, variables etc.
Disadvantage:
1.​ Complex problem cannot be solved
2.​ Less efficient and less productive
3.​ Parallel programming is not possible
Examples of Imperative programming paradigm:

C : developed by Dennis Ritchie and Ken Thompson


Fortran : developed by John Backus for IBM
Basic : developed by John G Kemeny and Thomas E Kurtz

Imperative programming is divided into three broad categories: Procedural,


OOP and parallel processing. These paradigms are as follows:
●​ Procedural programming paradigm – ​
This paradigm emphasizes on procedure in terms of under lying machine
model. There is no difference in between procedural and imperative
approach. It has the ability to reuse the code and it was boon at that time
when it was in use because of its reusability.
Examples of Procedural programming paradigm:

C : developed by Dennis Ritchie and Ken Thompson


C++ : developed by Bjarne Stroustrup
Java : developed by James Gosling at Sun Microsystems
ColdFusion : developed by J JAllaire
Pascal : developed by Niklaus Wirth
Then comes OOP,
●​ Object oriented programming – ​
The program is written as a collection of classes and object which are
meant for communication. The smallest and basic entity is object and all
kind of computation is performed on the objects only. More emphasis is on
data rather procedure. It can handle almost all kind of real life problems
which are today in scenario.
Advantages:
●​ Data security
●​ Inheritance
●​ Code reusability
●​ Flexible and abstraction is also present
Examples of Object Oriented programming paradigm:

Simula : first OOP language


Java : developed by James Gosling at Sun Microsystems
C++ : developed by Bjarne Stroustrup
Objective-C : designed by Brad Cox
Visual Basic .NET : developed by Microsoft
Python : developed by Guido van Rossum
Ruby : developed by Yukihiro Matsumoto
Smalltalk : developed by Alan Kay, Dan Ingalls, Adele Goldberg
●​ Parallel processing approach – ​
Parallel processing is the processing of program instructions by dividing
them among multiple processors. A parallel processing system posses
many numbers of processor with the objective of running a program in less
time by dividing them. This approach seems to be like divide and conquer.
Examples are NESL (one of the oldest one) and C/C++ also supports
because of some library function.
2. Declarative programming paradigm: ​
It is divided as Logic, Functional, Database. In computer science
the declarative programming is a style of building programs that expresses
logic of computation without talking about its control flow. It often considers
programs as theories of some logic.It may simplify writing parallel programs.
The focus is on what needs to be done rather how it should be done basically
emphasize on what code is actually doing. It just declares the result we want
rather how it has be produced. This is the only difference between imperative
(how to do) and declarative (what to do) programming paradigms. Getting into
deeper we would see logic, functional and database.
●​ Logic programming paradigms – ​
It can be termed as abstract model of computation. It would solve logical
problems like puzzles, series etc. In logic programming we have a
knowledge base which we know before and along with the question and
knowledge base which is given to machine, it produces result. In normal
programming languages, such concept of knowledge base is not available
but while using the concept of artificial intelligence, machine learning we
have some models like Perception model which is using the same
mechanism. ​
In logical programming the main emphasize is on knowledge base and the
problem. The execution of the program is very much like proof of
mathematical statement, e.g., Prolog
sum of two number in prolog:

predicates
sumoftwonumber(integer, integer)
clauses

sum(0, 0).
sum(n, r):-
n1=n-1,
sum(n1, r1),
r=r1+n
●​ Functional programming paradigms – ​
The functional programming paradigms has its roots in mathematics and it
is language independent. The key principle of this paradigms is the
execution of series of mathematical functions. The central model for the
abstraction is the function which are meant for some specific computation
and not the data structure. Data are loosely coupled to functions.The
function hide their implementation. Function can be replaced with their
values without changing the meaning of the program. Some of the
languages like perl, javascript mostly uses this paradigm.
Examples of Functional programming paradigm:

JavaScript : developed by Brendan Eich


Haskell : developed by Lennart Augustsson, Dave Barton
Scala : developed by Martin Odersky
Erlang : developed by Joe Armstrong, Robert Virding
Lisp : developed by John Mccarthy
ML : developed by Robin Milner
Clojure : developed by Rich Hickey
The next kind of approach is of Database.
●​ Database/Data driven programming approach – ​
This programming methodology is based on data and its movement.
Program statements are defined by data rather than hard-coding a series
of steps. A database program is the heart of a business information system
and provides file creation, data entry, update, query and reporting
functions. There are several programming languages that are developed
mostly for database application. For example SQL. It is applied to streams
of structured data, for filtering, transforming, aggregating (such as
computing statistics), or calling other programs. So it has its own wide
application.
CREATE DATABASE databaseAddress;
CREATE TABLE Addr (
PersonIDint,
LastNamevarchar(200),
FirstNamevarchar(200),
Address varchar(200),
City varchar(200),
State varchar(200)
);

Object-Oriented Paradigm
Introduction to OO Paradigm
OO paradigm is a significant methodology for the development of any software. Most of the
architecture styles or patterns such as pipe and filter, data repository, and component-based
can be implemented by using this paradigm.
Basic concepts and terminologies of object–oriented systems −
Object
An object is a real-world element in an object–oriented environment that may have a physical
or a conceptual existence. Each object has −
●​ Identity that distinguishes it from other objects in the system.
●​ State that determines characteristic properties of an object as well as values of
properties that the object holds.
●​ Behavior that represents externally visible activities performed by an object in terms
of changes in its state.
Objects can be modeled according to the needs of the application. An object may have a
physical existence, like a customer, a car, etc.; or an intangible conceptual existence, like a
project, a process, etc.
Class
A class represents a collection of objects having same characteristic properties that exhibit
common behavior. It gives the blueprint or the description of the objects that can be created
from it. Creation of an object as a member of a class is called instantiation. Thus, an object is
an instance of a class.
The constituents of a class are −
●​ A set of attributes for the objects that are to be instantiated from the class. Generally,
different objects of a class have some difference in the values of the attributes.
Attributes are often referred as class data.
●​ A set of operations that portray the behavior of the objects of the class. Operations are
also referred as functions or methods.

Design Pattern
In software engineering, a design pattern is a general repeatable solution to a commonly
occurring problem in software design. A design pattern isn't a finished design that can be
transformed directly into code. It is a description or template for how to solve a problem that
can be used in many different situations.
Design patterns represent the best practices used by experienced object-oriented
software developers. Design patterns are solutions to general problems that software
developers faced during software development. These solutions were obtained by trial
and error by numerous software developers over quite a substantial period of time.

Usage of Design Pattern


Design Patterns have two main usages in software development.
Common platform for developers
Design patterns provide a standard terminology and are specific to particular scenario. For
example, a singleton design pattern signifies use of single object so all developers familiar
with single design pattern will make use of single object and they can tell each other that
program is following a singleton pattern.
Best Practices
Design patterns have been evolved over a long period of time and they provide best solutions
to certain problems faced during software development. Learning these patterns helps
unexperienced developers to learn software design in an easy and faster way.
Types of Design Patterns
As per the design pattern reference book Design Patterns - Elements of Reusable
Object-Oriented Software , there are 23 design patterns which can be classified in three
categories: Creational, Structural and Behavioral patterns. We'll also discuss another category
of design pattern: J2EE design patterns.

S.N. Pattern & Description

1 Creational_Patterns​
These design patterns provide a way to create objects while hiding the creation logic,
rather than instantiating objects directly using new operator. This gives program more
flexibility in deciding which objects need to be created for a given use case.

2 Structural_Patterns​
These design patterns concern class and object composition. Concept of inheritance
is used to compose interfaces and define ways to compose objects to obtain new
functionalities.

3 Behavioral_Patterns​
These design patterns are specifically concerned with communication between
objects.

4 J2EE_Patterns​
These design patterns are specifically concerned with the presentation tier. These
patterns are identified by Sun Java Center.

Creational design patterns


These design patterns are all about class instantiation. This pattern can be further
divided into class-creation patterns and object-creational patterns. While
class-creation patterns use inheritance effectively in the instantiation process,
object-creation patterns use delegation effectively to get the job done.
●​ Abstract Factory​
Creates an instance of several families of classes
●​ Builder​
Separates object construction from its representation
●​ Factory Method​
Creates an instance of several derived classes
●​ Object Pool​
Avoid expensive acquisition and release of resources by recycling objects that are no
longer in use
●​ Prototype​
A fully initialized instance to be copied or cloned
●​ Singleton​
A class of which only a single instance can exist

Structural design patterns


These design patterns are all about Class and Object composition. Structural
class-creation patterns use inheritance to compose interfaces. Structural
object-patterns define ways to compose objects to obtain new functionality.

●​ Adapter​
Match interfaces of different classes
●​ Bridge​
Separates an object’s interface from its implementation
●​ Composite​
A tree structure of simple and composite objects
●​ Decorator​
Add responsibilities to objects dynamically
●​ Facade​
A single class that represents an entire subsystem
●​ Flyweight​
A fine-grained instance used for efficient sharing
●​

Private Class Data​


Restricts accessor/mutator access

●​ Proxy​
An object representing another object

Behavioral design patterns


These design patterns are all about Class's objects communication. Behavioral
patterns are those patterns that are most specifically concerned with communication
between objects.

●​ Chain of responsibility​
A way of passing a request between a chain of objects
●​ Command​
Encapsulate a command request as an object
●​ Interpreter​
A way to include language elements in a program
●​ Iterator​
Sequentially access the elements of a collection
●​ Mediator​
Defines simplified communication between classes
●​ Memento​
Capture and restore an object's internal state
●​ Null Object​
Designed to act as a default value of an object
●​ Observer​
A way of notifying change to a number of classes

●​

State​
Alter an object's behavior when its state changes
●​ Strategy​
Encapsulates an algorithm inside a class
●​ Template method​
Defer the exact steps of an algorithm to a subclass
●​ Visitor​
Defines a new operation to a class without change

Object-Oriented Design
After the analysis phase, the conceptual model is developed further into an object-oriented
model using object-oriented design (OOD). In OOD, the technology-independent concepts in
the analysis model are mapped onto implementing classes, constraints are identified, and
interfaces are designed, resulting in a model for the solution domain. The main aim of OO
design is to develop the structural architecture of a system.
The stages for object–oriented design can be identified as −
●​ Defining the context of the system
●​ Designing the system architecture
●​ Identification of the objects in the system
●​ Construction of design models
●​ Specification of object interfaces
OO Design can be divided into two stages − Conceptual design and Detailed design.
Conceptual design
In this stage, all the classes are identified that are needed for building the system. Further,
specific responsibilities are assigned to each class. Class diagram is used to clarify the
relationships among classes, and interaction diagram are used to show the flow of events. It is
also known as high-level design.
Detailed design
In this stage, attributes and operations are assigned to each class based on their interaction
diagram. State machine diagram are developed to describe the further details of design. It is
also known as low-level design.
System Design
Object-oriented system design involves defining the context of a system followed by
designing the architecture of the system.
●​ Context − The context of a system has a static and a dynamic part. The static context
of the system is designed using a simple block diagram of the whole system which is
expanded into a hierarchy of subsystems. The subsystem model is represented by
UML packages. The dynamic context describes how the system interacts with its
environment. It is modelled using use case diagrams.
●​ System Architecture − The system architecture is designed on the basis of the context
of the system in accordance with the principles of architectural design as well as
domain knowledge. Typically, a system is partitioned into layers and each layer is
decomposed to form the subsystems.
Object-Oriented Decomposition
Decomposition means dividing a large complex system into a hierarchy of smaller
components with lesser complexities, on the principles of divide–and–conquer. Each major
component of the system is called a subsystem. Object-oriented decomposition identifies
individual autonomous objects in a system and the communication among these objects.
The advantages of decomposition are −
●​ The individual components are of lesser complexity, and so more understandable and
manageable.
●​ It enables division of workforce having specialized skills.
●​ It allows subsystems to be replaced or modified without affecting other subsystems.
Identifying Concurrency
Concurrency allows more than one objects to receive events at the same time and more than
one activity to be executed simultaneously. Concurrency is identified and represented in the
dynamic model.
To enable concurrency, each concurrent element is assigned a separate thread of control. If
the concurrency is at object level, then two concurrent objects are assigned two different
threads of control. If two operations of a single object are concurrent in nature, then that
object is split among different threads.
Concurrency is associated with the problems of data integrity, deadlock, and starvation. So a
clear strategy needs to be made whenever concurrency is required. Besides, concurrency
requires to be identified at the design stage itself, and cannot be left for implementation stage.
Identifying Patterns
While designing applications, some commonly accepted solutions are adopted for some
categories of problems. These are the patterns of design. A pattern can be defined as a
documented set of building blocks that can be used in certain types of application
development problems.
Some commonly used design patterns are −
●​ Façade pattern
●​ Model view separation pattern
●​ Observer pattern
●​ Model view controller pattern
●​ Publish subscribe pattern
●​ Proxy pattern
Controlling Events
During system design, the events that may occur in the objects of the system need to be
identified and appropriately dealt with.
An event is a specification of a significant occurrence that has a location in time and space.
There are four types of events that can be modelled, namely −
●​ Signal Event − A named object thrown by one object and caught by another object.
●​ Call Event − A synchronous event representing dispatch of an operation.
●​ Time Event − An event representing passage of time.
●​ Change Event − An event representing change in state.
Handling Boundary Conditions
The system design phase needs to address the initialization and the termination of the system
as a whole as well as each subsystem. The different aspects that are documented are as
follows −
●​ The start–up of the system, i.e., the transition of the system from non-initialized state
to steady state.
●​ The termination of the system, i.e., the closing of all running threads, cleaning up of
resources, and the messages to be sent.
●​ The initial configuration of the system and the reconfiguration of the system when
needed.
●​ Foreseeing failures or undesired termination of the system.
Boundary conditions are modelled using boundary use cases.
Object Design
After the hierarchy of subsystems has been developed, the objects in the system are identified
and their details are designed. Here, the designer details out the strategy chosen during the
system design. The emphasis shifts from application domain concepts toward computer
concepts. The objects identified during analysis are etched out for implementation with an
aim to minimize execution time, memory consumption, and overall cost.
Object design includes the following phases −
●​ Object identification
●​ Object representation, i.e., construction of design models
●​ Classification of operations
●​ Algorithm design
●​ Design of relationships
●​ Implementation of control for external interactions
●​ Package classes and associations into modules
Object Identification
The first step of object design is object identification. The objects identified in the
object–oriented analysis phases are grouped into classes and refined so that they are suitable
for actual implementation.
The functions of this stage are −
●​ Identifying and refining the classes in each subsystem or package
●​ Defining the links and associations between the classes
●​ Designing the hierarchical associations among the classes, i.e., the
generalization/specialization and inheritances
●​ Designing aggregations
Object Representation
Once the classes are identified, they need to be represented using object modelling
techniques. This stage essentially involves constructing UML diagrams.
There are two types of design models that need to be produced −
●​ Static Models − To describe the static structure of a system using class diagrams and
object diagrams.
●​ Dynamic Models − To describe the dynamic structure of a system and show the
interaction between classes using interaction diagrams and state–chart diagrams.
Classification of Operations
In this step, the operation to be performed on objects are defined by combining the three
models developed in the OOA phase, namely, object model, dynamic model, and functional
model. An operation specifies what is to be done and not how it should be done.
The following tasks are performed regarding operations −
●​ The state transition diagram of each object in the system is developed.
●​ Operations are defined for the events received by the objects.
●​ Cases in which one event triggers other events in same or different objects are
identified.
●​ The sub–operations within the actions are identified.
●​ The main actions are expanded to data flow diagrams.
Algorithm Design
The operations in the objects are defined using algorithms. An algorithm is a stepwise
procedure that solves the problem laid down in an operation. Algorithms focus on how it is to
be done.
There may be more than one algorithm corresponding to a given operation. Once the
alternative algorithms are identified, the optimal algorithm is selected for the given problem
domain. The metrics for choosing the optimal algorithm are −
●​ Computational Complexity − Complexity determines the efficiency of an algorithm in
terms of computation time and memory requirements.
●​ Flexibility − Flexibility determines whether the chosen algorithm can be implemented
suitably, without loss of appropriateness in various environments.
●​ Understandability − This determines whether the chosen algorithm is easy to
understand and implement.
Design of Relationships
The strategy to implement the relationships needs to be chalked out during the object design
phase. The main relationships that are addressed comprise of associations, aggregations, and
inheritances.
The designer should do the following regarding associations −
●​ Identify whether an association is unidirectional or bidirectional.
●​ Analyze the path of associations and update them if necessary.
●​ Implement the associations as a distinct object, in case of many–to-many
relationships; or as a link to other object in case of one–to-one or one–to-many
relationships.
Regarding inheritances, the designer should do the following −
●​ Adjust the classes and their associations.
●​ Identify abstract classes.
●​ Make provisions so that behaviors are shared when needed.
Implementation of Control
The object designer may incorporate refinements in the strategy of the state–chart model. In
system design, a basic strategy for realizing the dynamic model is made. During object
design, this strategy is aptly embellished for appropriate implementation.
The approaches for implementation of the dynamic model are −
●​ Represent State as a Location within a Program − This is the traditional
procedure-driven approach whereby the location of control defines the program state.
A finite state machine can be implemented as a program. A transition forms an input
statement, the main control path forms the sequence of instructions, the branches form
the conditions, and the backward paths form the loops or iterations.
●​ State Machine Engine − This approach directly represents a state machine through a
state machine engine class. This class executes the state machine through a set of
transitions and actions provided by the application.
●​ Control as Concurrent Tasks − In this approach, an object is implemented as a task in
the programming language or the operating system. Here, an event is implemented as
an inter-task call. It preserves inherent concurrency of real objects.
Packaging Classes
In any large project, meticulous partitioning of an implementation into modules or packages
is important. During object design, classes and objects are grouped into packages to enable
multiple groups to work cooperatively on a project.
The different aspects of packaging are −
●​ Hiding Internal Information from Outside View − It allows a class to be viewed as a
“black box” and permits class implementation to be changed without requiring any
clients of the class to modify code.
●​ Coherence of Elements − An element, such as a class, an operation, or a module, is
coherent if it is organized on a consistent plan and all its parts are intrinsically related
so that they serve a common goal.
●​ Construction of Physical Modules − The following guidelines help while constructing
physical modules −
o​ Classes in a module should represent similar things or components in the same
composite object.
o​ Closely connected classes should be in the same module.
o​ Unconnected or weakly connected classes should be placed in separate
modules.
o​ Modules should have good cohesion, i.e., high cooperation among its
components.
o​ A module should have low coupling with other modules, i.e., interaction or
interdependence between modules should be minimum.
Design Optimization
The analysis model captures the logical information about the system, while the design model
adds details to support efficient information access. Before a design is implemented, it should
be optimized so as to make the implementation more efficient. The aim of optimization is to
minimize the cost in terms of time, space, and other metrics.
However, design optimization should not be excess, as ease of implementation,
maintainability, and extensibility are also important concerns. It is often seen that a perfectly
optimized design is more efficient but less readable and reusable. So the designer must strike
a balance between the two.
The various things that may be done for design optimization are −
●​ Add redundant associations
●​ Omit non-usable associations
●​ Optimization of algorithms
●​ Save derived attributes to avoid re-computation of complex expressions
Addition of Redundant Associations
During design optimization, it is checked if deriving new associations can reduce access
costs. Though these redundant associations may not add any information, they may increase
the efficiency of the overall model.
Omission of Non-Usable Associations
Presence of too many associations may render a system indecipherable and hence reduce the
overall efficiency of the system. So, during optimization, all non-usable associations are
removed.
Optimization of Algorithms
In object-oriented systems, optimization of data structure and algorithms are done in a
collaborative manner. Once the class design is in place, the operations and the algorithms
need to be optimized.
Optimization of algorithms is obtained by −
●​ Rearrangement of the order of computational tasks
●​ Reversal of execution order of loops from that laid down in the functional model
●​ Removal of dead paths within the algorithm
Saving and Storing of Derived Attributes
Derived attributes are those attributes whose values are computed as a function of other
attributes (base attributes). Re-computation of the values of derived attributes every time they
are needed is a time–consuming procedure. To avoid this, the values can be computed and
stored in their computed forms.
However, this may pose update anomalies, i.e., a change in the values of base attributes with
no corresponding change in the values of the derived attributes. To avoid this, the following
steps are taken −
●​ With each update of the base attribute value, the derived attribute is also re-computed.
●​ All the derived attributes are re-computed and updated periodically in a group rather
than after each update.
Design Documentation
Documentation is an essential part of any software development process that records the
procedure of making the software. The design decisions need to be documented for any
non–trivial software system for transmitting the design to others.
Usage Areas
Though a secondary product, a good documentation is indispensable, particularly in the
following areas −
●​ In designing software that is being developed by a number of developers
●​ In iterative software development strategies
●​ In developing subsequent versions of a software project
●​ For evaluating a software
●​ For finding conditions and areas of testing
●​ For maintenance of the software.
Contents
A beneficial documentation should essentially include the following contents −
●​ High–level system architecture − Process diagrams and module diagrams
●​ Key abstractions and mechanisms − Class diagrams and object diagrams.
●​ Scenarios that illustrate the behavior of the main aspects − Behavioural diagrams
Features
The features of a good documentation are −
●​ Concise and at the same time, unambiguous, consistent, and complete
●​ Traceable to the system’s requirement specifications
●​ Well-structured
●​ Diagrammatic instead of descriptive

JSON or JavaScript Object Notation


JSON or JavaScript Object Notation is a lightweight text-based open standard designed for
human-readable data interchange. Conventions used by JSON are known to programmers,
which include C, C++, Java, Python, Perl, etc.
●​ JSON stands for JavaScript Object Notation.
●​ The format was specified by Douglas Crockford.
●​ It was designed for human-readable data interchange.
●​ It has been extended from the JavaScript scripting language.
●​ The filename extension is .json.
●​ JSON Internet Media type is application/json.
●​ The Uniform Type Identifier is public.json.

Uses of JSON

●​ It is used while writing JavaScript based applications that includes browser extensions
and websites.
●​ JSON format is used for serializing and transmitting structured data over network
connection.
●​ It is primarily used to transmit data between a server and web applications.
●​ Web services and APIs use JSON format to provide public data.
●​ It can be used with modern programming languages.

Characteristics of JSON

●​ JSON is easy to read and write.


●​ It is a lightweight text-based interchange format.
●​ JSON is language independent.

2)​ DOM(DOM (Document Object Model)

we will discuss Document Object Model(DOM) along with its properties and methods used
to manipulate Documents, & understand their implementation through the examples.
The Document Object Model (DOM) is a programming
interface for HTML(HyperTextMarkup Language) and XML(Extensible markup
language) documents. It defines the logical structure of documents and the way a document
is accessed and manipulated.
Note: It is called a Logical structure because DOM doesn’t specify any relationship between
objects.
DOM is a way to represent the webpage in a structured hierarchical way so that it will
become easier for programmers and users to glide through the document. With DOM, we can
easily access and manipulate tags, IDs, classes, Attributes, or Elements of HTML using
commands or methods provided by the Document object. Using DOM, the JavaScript gets
access to HTML as well as CSS of the web page and can also add behavior to the HTML
elements. so basically Document Object Model is an API that represents and interacts
with HTML or XML documents.

Why DOM is required?


HTML is used to structure the web pages and Javascript is used to add behavior to our web
pages. When an HTML file is loaded into the browser, the javascript can not understand the
HTML document directly. So, a corresponding document is created(DOM). DOM is
basically the representation of the same HTML document but in a different format with
the use of objects. Javascript interprets DOM easily i.ejavascript can not understand the
tags(<h1>H</h1>) in HTML document but can understand object h1 in DOM. Now,
Javascript can access each of the objects (h1, p, etc) by using different functions.
Structure of DOM: DOM can be thought of as a Tree or Forest(more than one tree). The
term structure model is sometimes used to describe the tree-like representation of a
document. Each branch of the tree ends in a node, and each node contains objects Event
listeners can be added to nodes and triggered on an occurrence of a given event. One
important property of DOM structure models is structural isomorphism: if any two DOM
implementations are used to create a representation of the same document, they will create
the same structure model, with precisely the same objects and relationships.

Why called an Object Model?​

Documents are modeled using objects, and the model includes not only the structure
of a document but also the behavior of a document and the objects of which it is
composed like tag elements with attributes in HTML.
Properties of DOM: Let’s see the properties of the document object that can be
accessed and modified by the document object.

AJAX

AJAX is a developer's dream, because you can:

●​ Update a web page without reloading the page


●​ Request data from a server - after the page has loaded
●​ Receive data from a server - after the page has loaded
●​ Send data to a server - in the background

What is AJAX?
AJAX = Asynchronous JavaScript And XML.

AJAX is not a programming language.

AJAX just uses a combination of:

●​ A browser built-in XMLHttpRequest object (to request data from a web server)
●​ JavaScript and HTML DOM (to display or use the data)

AJAX is a misleading name. AJAX applications might use XML to transport data, but it is
equally common to transport data as plain text or JSON text.

AJAX allows web pages to be updated asynchronously by exchanging data with a web server
behind the scenes. This means that it is possible to update parts of a web page, without
reloading the whole page.
●​ 1. An event occurs in a web page (the page is loaded, a button is clicked)
●​ 2. An XMLHttpRequest object is created by JavaScript
●​ 3. The XMLHttpRequest object sends a request to a web server
●​ 4. The server processes the request
●​ 5. The server sends a response back to the web page
●​ 6. The response is read by JavaScript
●​ 7. Proper action (like page update) is performed by JavaScript

You might also like