DOC-20250604-WA0025.
DOC-20250604-WA0025.
INTRODUCTION
3. accessing data, such as an article, from a database using an SQL queries
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.
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.
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 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.
Anyone with experience in mathematics or engineering may find more interest in back-end
development.
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
<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>
<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>
<button
onclick="document.getElementById('myImage').src='pic_bulboff.gif'">Turn
off the light</button>
</body>
</html>
PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
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:
● 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.
Ruby
Ruby is an interpreted, high-level, general-purpose programming language that was designed
and developed by Yukihiro "Matz" Matsumoto in the mid-1990s.
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.
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.
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!
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
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).
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:
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:
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
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".
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#
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 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.
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
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
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
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.
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:
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.
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.
● 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
●
● Proxy
An object representing another object
● 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
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
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.
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
What is AJAX?
AJAX = Asynchronous JavaScript And XML.
● 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