Shwetha FINAL
Shwetha FINAL
By
Shwetha G R
VI SEMESTER BCA
REG NO.
U03HW21S0131
UNDER THE GUIDANCE OF
Prof. Anjana . U
Department of Computer Applications
SHWETHA G R
REG NO. U03HW21S0131
VI SEMSTER BCA
This is to certify that the internship report entitled on the field of JAVA FULL STACK
DEVELOPMENT Submitted by SHWETHA G R (UO3HW21S0131) is prepared
under my guidance and supervision.
This internship is done in partial fulfilment for the award of ‘Bachelor of Computer
Applications’. This has not formed a basis for the award of any other degree, or
diploma under Bangalore University or any other university.
Signature
Date: Prof. Anjana . U
Place: Bangalore Assistant Prof.
(BCA) RNSFGC
(RNSFGC)
AKNOWLEDGEMENT
I would like to take the opportunity to thank and express my deep sense of gratitude to
my guide Anjana . U for providing his valuable guidance at all stages of the study, her
advice, constructive suggestions, positive and supportive attitude and continuous
encouragement, without which it could not have been possible to complete this
internship.
I would like to express gratitude to our beloved Principal Dr. Sudheer Pai K.L for
creating a wonder academic ambience in the college and providing all facilities enabling
satisfactory completion of this internship work.
I express my gratitude to our Vice-principal Prof. Shilpa Sarnad for her continuous
support and assistance during the course of my internship.
I sincerely thank Dr. Mohan S H, HOD, Department of BCA, RNS First Grade College,
encouraging me to undertake this internship work. Finally, I would like to express my
sincere thanks to my parents, teachers of the department, the librarian and my friends
for the moral support.
SHWETHA G R
(U03HW21S0131)
TABLE OF CONTENTS
Chapter PAGE
No. NO
TITLE OF CONTENTS
1 COMPANY PROFILE 1-2
2 HTML
2.1 Introduction to HTML
2.2 Forms in HTML
6-16
2.3 Simple Selectors
2.4 Navigation
2.5 Positions
3 CSS
3.1 Introduction
17-23
3.2 Styling in CSS
3.3 Method of applying CSS to HTML documents
4 FRONTEND
4.1 Display Properties
24-30
4.2 Child Properties
4.3 Hover Properties
5 BACKEND
5.1 MY SQL
5.2 Spring Framework
31-39
5.3 JDK
5.4 Unit Testing & Integration Testing
5.5 DB management & Optimization
6 MIDDLEWARE
6.1 Data Integration
6.2 API Gateway 40-46
6.3 Workflow Management
6.4 Middleware Security
TABLE OF CONTENTS
7 PROJECT
7.1 Introduction
7.2 Objectives
47-63
7.3 Coding
7.4 Screen Shots
7.5 Module Used In Project
CONCLUSION 64
REFERENCES 65
JAVA FULL STACK DEVELOPMENT
CHAPTER - 01
COMPANY PROFILE
Introduction to Company
JSPIDERS
Largest Software Training Organisation
JSpiders is the world’s ace Software course Training Organisation With an aim
to bridge the gap between the demands of the industry and the curriculum of
education institutions.
With centers across the Globe, the institute is a platform where young minds are
given the opportunity to build successful careers.
“JSpiders is a place where business find talent and dreams take flight.”
Their aim of providing quality training to all those aspiring for a successful
career in the IT industry.
CHAPTER 2
INTRODUCTION TO
INTERNSHIP
1. Introduction to company:
- Introduction to the company's culture, policies, and development environment.
- Setup of development tools and environments, including IDEs (Integrated
Development Environments), version control systems (such as Git), and project
management tools.
- Familiarization with coding standards, best practices, and documentation guidelines.
3. Project Assignments:
- Started with small, guided projects to apply the concepts learned during training.
- Progress to more complex projects that involve building websites from scratch.
- Collaborate with mentors and team members to understand project requirements,
design specifications, and development tasks.
4. Development Tasks:
- Participate in the full software development lifecycle, including requirements
analysis, design, implementation, testing, and deployment.
- Implement front-end interfaces using HTML, CSS, and JavaScript frameworks,
ensuring responsiveness and accessibility.
- Develop server-side components and business logic using Java and relevant
frameworks like Spring Boot.
- Integrate front-end and back-end components, handling data exchange and
communication between client and server.
CHAPTER 3
HTML
Forms in HTML are essential for collecting user input and interacting with website
visitors.
Here's an overview of how to create forms in HTML:
1. Form Element:
Start by enclosing the form content within the `<form>` element. This element defines the
boundaries of the form and specifies where the form data should be sent upon submission.
Example:
<html>
<form action="/submit-form" method="POST">
<!-- Form elements will go here -->
</form>
</html>
Example:
<html>
<label for="username">Username:</label>
<input type="text" id="username" name="username">
<label for="password">Password:</label>
<input type="password" id="password" name="password">
<label>Gender:</label>
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label>
</html>
3. Text Areas:
For longer text input, you can use the `<textarea>` element, which allows users to enter
multiline text.
Example:
<html>
<label for="message">Message:</label>
<textarea id="message" name="message" rows="4" cols="50"></textarea>
</html>
4. Dropdown Lists:
To create dropdown lists, you can use the `<select>` element along with `<option>`
elements for each selectable item.
Example:
<html>
<label for="country">Country:</label>
5. Submit Button:
Include a submit button within the form to allow users to submit their input.
Example:
<html>
<button type="submit">Submit</button>
</html>
6. Form Attributes: The `<form>` element can have attributes like `action` and `method`.
The `action` attribute specifies the URL where the form data will be submitted, and the
`method` attribute specifies the HTTP method to be used (e.g., GET or POST).
Example:
<html>
<form action="/submit-form" method="POST">
<!-- Form elements -->
</form>
</html>
7. Form Validation:
HTML5 introduced native form validation features, allowing you to specify required
fields, minimum and maximum values, patterns, etc., using attributes like `required`,
`min`, `max`, `pattern`, etc., on input elements.
Example:
<html>
<input type="text" name="email" id="email" required>
<input type="password" name="password" id="password" min length="8" required>
1.Element Selector: Targets elements based on their HTML tag name. For example, p selects
all <p> paragraphs on the page.
2.ID Selector: Targets elements with a specific ID attribute value. It is denoted by a hash (#)
followed by the ID name. For example, #header selects the element with id="header".
3.Class Selector: Targets elements with a specific class attribute value. It is denoted by a dot
(.) followed by the class name. For example, .btn selects all elements with class="btn".
4.Attribute Selector: Targets elements based on their attributes. It allows selecting elements
with specific attribute names, values, or containing certain values. For example, [type="text"]
selects all elements with type="text".
5.Universal Selector: Targets all elements on the page. It is denoted by an asterisk (*). For
example, * selects all elements.
7.Child Selector: Targets an element that is a direct child of another element. It is denoted by
the greater than symbol (>). For example, ul > li selects all <li> elements that are direct children
of <ul> elements.
These simple selectors can be combined and nested to create more complex and precise
selectors, enabling developers to style elements according to various criteria.
CSS (Cascading Style Sheets) is commonly used to apply styles to HTML elements using these
selectors, enhancing the visual presentation and layout of web pages.
3.4 NAVIGATION
Navigation in HTML typically involves creating links that allow users to navigate
between different pages or sections within a website. Here are some common methods for
implementing navigation:
Example:
<html>
<a href="https://www.example.com">Home</a>
<a href="about.html">About</a>
<a href="contact.html">Contact</a>
</html>
2. Navigation Menus:
Navigation menus are typically implemented using lists (`<ul>`, `<ol>`, `<li>`) and
styled with CSS to create horizontal or vertical menus.
Example:
<html>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</html>
3. Navigation Bars:
Navigation bars provide a consistent set of links across multiple pages and are often
placed at the top or side of a website. They can be styled using CSS to achieve various
designs.
Example:
<html>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
4. Dropdown Menu:
Dropdown menus allow for hierarchical navigation by displaying sub-menus when users
hover or click on parent menu items.
Example:
<html>
<ul>
<li><a href="index.html">Home</a></li>
<li>
<a href="#">Products</a>
<ul>
<li><a href="products.html">All Products</a></li>
<li><a href="category1.html">Category 1</a></li>
<li><a href="category2.html">Category 2</a></li>
</ul>
</li>
<li><a href="contact.html">Contact</a></li>
</ul>
5. Scrolling Navigation:
For single-page websites or long-scrolling pages, you can create navigation links that
scroll to specific sections within the page using anchor links.
Example:
<html>
<a href="#section1">Section 1</a>
<a href="#section2">Section 2</a>
<a href="#section3">Section 3</a>
6. Image Maps:
Image maps allow you to define clickable regions on an image, each linking to a different
destination.
Example:
<html>
<img src="diagram.jpg" usemap="#diagram-map">
<map name="diagram-map">
These methods provide flexibility in designing navigation systems for websites, catering
to different layout requirements and user experience goals.
3.5 POSITIONS
In HTML, positions refer to the layout behaviour of elements within a web page. The position
property in CSS allows developers to control the positioning of elements relative to their
normal position in the document flow. There are several values for the position property, each
with its own behaviour:
1. Static: This is the default position value. Elements are positioned according to the normal
flow of the document. Any top, right, bottom, or left values applied to a statically positioned
element will be ignored.
Example:
.element {
position: static;
}
2. Relative: Elements with position: relative are positioned relative to their normal position in
the document flow. They can be moved using the top, right, bottom, and left properties, without
affecting the position of other elements.
Example:
.element {
position: relative;
top: 10px;
left: 20px;
}
3. Absolute: Elements with position: absolute are removed from the normal document flow
and positioned relative to their nearest positioned ancestor. If no ancestor has a position other
than static, they are positioned relative to the initial containing block (usually the viewport).
Example:
.element {
position: absolute;
top: 50px;
left: 100px;
}
4. Fixed: Elements with position: fixed are removed from the normal document flow and
positioned relative to the viewport, meaning they will remain in the same position even when
the page is scrolled.
Example:
.element {
position: fixed;
top: 0;
right: 0;
}
5. Sticky: Elements with position: sticky are positioned based on the user's scroll position.
They behave like relatively positioned elements until they reach a specified threshold (e.g., top,
bottom, left, or right value), at which point they become fixed.
Example:
.element {
position: sticky;
top: 0;
}
6. Float: While not technically a position property, floating elements is a common technique
used for layout in CSS. Elements with float: left or float: right are removed from the normal
document flow and positioned to the left or right of their containing block, allowing other
content to flow around them. This is commonly used for creating multi-column layouts and
positioning elements side by side.
Example:
<div style="float: left; width: 50%;">Left Content</div>
7. Z-index: The z-index property determines the stacking order of positioned elements along
the z-axis (depth). Elements with a higher z-index value appear "on top" of elements with lower
values. This is particularly useful when dealing with overlapping elements or creating layered
effects.
Example:
<div style="position: absolute; z-index: 1;">Box 1</div>
<div style="position: absolute; z-index: 2;">Box 2</div>
8. Positioning Context: Understanding how the position property of an element affects its
containing block and the positioning of its children is crucial. For example, setting position:
relative on a parent element can establish a new positioning context for its children.
Example:
<div style="position: absolute; z-index: 1;">Box 1</div>
<div style="position: absolute; z-index: 2;">Box 2</div>
CHAPTER 4
CSS
4.1 INTRODUCTION
CSS (Cascading Style Sheets) is a fundamental technology used for styling and formatting web
pages. It controls the presentation and layout of HTML documents by specifying how elements
should be displayed on the screen, in print, or even as speech.
4. Selectors:
CSS provides various types of selectors to target elements based on different criteria. Basic
selectors include element selectors, class selectors, ID selectors, attribute selectors, and pseudo-
classes.
5. Box Model:
The CSS box model describes the layout and rendering of elements on a web page. Each
element is represented as a rectangular box, consisting of content, padding, borders, and
margins. CSS properties like `width`, `height`, `padding`, `border`, and `margin` control the
dimensions and spacing of these boxes.
7. Media Queries:
Media queries allow you to apply different styles based on various factors such as screen size,
device orientation, and resolution. They enable the creation of responsive designs that adapt to
different viewing environments, ensuring a consistent user experience across devices.
Styling in CSS involves applying visual properties to HTML elements to control their
appearance, layout, and behaviour.
Here's an overview of how styling works in CSS:
1. Selectors:
Selectors are used to target HTML elements that you want to style. There are various types of
selectors, including:
- Element selectors: Targets specific HTML elements (e.g., `p`, `h1`, `div`).
- Class selectors: Targets elements with a specific class attribute (e.g., `.my-class`).
- ID selectors: Targets elements with a specific ID attribute (e.g., `#my-id`).
- Attribute selectors: Targets elements based on their attributes (e.g., `[type="text"]`).
- Pseudo-classes: Targets elements in specific states (e.g., `:hover`, `:focus`).
3. Box Model:
The box model describes how elements are rendered as rectangular boxes, comprising content,
padding, border, and margin. CSS properties like `padding`, `margin`, `border`, and `box-
sizing` allow you to control the dimensions and spacing of these boxes.
5. Units:
CSS supports various units for specifying lengths, such as pixels (`px`), percentages (`%`), ems
(`em`), rems (`rem`), viewport units (`vw`, `vh`), and more. Choosing the appropriate unit
depends on the design requirements and accessibility considerations.
6. Media Queries:
Media queries allow you to apply different styles based on the characteristics of the device,
such as screen size, orientation, and resolution. This enables the creation of responsive designs
that adapt to different viewing environments.
7. Vendor Prefixes:
Some CSS properties require vendor prefixes (-webkit-, -moz-, -ms-, -o-) to ensure
compatibility with various web browsers. While modern browsers often support unprefixed
versions of these properties, older versions may require prefixes for proper rendering.
8. External Stylesheets:
CSS can be applied internally within an HTML document using `<style>` tags, inline within
HTML elements using the `style` attribute, or externally using separate CSS files linked to
HTML documents using the `<link>` element. External stylesheets promote maintainability
and separation of concerns by keeping styling separate from content.
By leveraging these techniques, developers can create visually appealing and responsive web
interfaces while maintaining clean and organized codebases.
1. Inline CSS:
Inline CSS involves styling HTML elements directly within the HTML markup using the
`style` attribute. Styles defined inline apply only to the specific element they are attached.
html
<div style="color: red; font-size: 16px;">This is a red text with font size of 16px.</div>
Pros:
- Quick and easy to implement.
- Overrides external and internal styles.
Cons:
- Lacks separation of concerns, making it harder to maintain.
- Decreases code readability and scalability.
2. Internal CSS:
Internal CSS involves embedding CSS styles within the HTML document using the `<style>`
element in the document's `<head>` section. Styles defined internally apply to all elements
within the document.
<html>
<head>
<style>
div {
color: blue;
font-size: 18px;
}
</style>
</head>
<body>
<div>This text is styled internally.</div>
</body>
Pros:
- Provides better separation of concerns than inline CSS.
- Allows styling multiple elements within the same document.
Cons:
- Styles apply globally to all elements, potentially leading to unintended consequences.
- Still mixes presentation with content, hindering maintainability in larger projects.
3. External CSS:
External CSS involves defining styles in a separate CSS file and linking it to the HTML
document using the `<link>` element in the `<head>` section. Styles defined externally can be
applied to multiple HTML documents, promoting consistency and maintainability.
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
CSS (styles.css):
<css>
div {
color: green;
font-size: 20px;
}
Pros:
- Promotes better organization and maintainability by separating content from presentation.
- Enables reusability of styles across multiple HTML documents.
- Facilitates caching, leading to faster page load times for subsequent visits.
Cons:
- Requires an additional HTTP request to fetch the external CSS file, potentially impacting
initial page load time (though this can be mitigated through proper optimization techniques).
Each method of applying CSS has its own use cases and trade-offs. While inline CSS is suitable
for quick styling adjustments, internal and external CSS are preferable for larger projects where
maintainability and scalability are important considerations.
CHAPTER 5
FRONTEND
Styling in front-end development is crucial for creating visually appealing and user-friendly
interfaces. It goes beyond just making things look pretty; it's about creating a cohesive design
language that enhances the overall user experience.
CSS (Cascading Style Sheets) is the primary language used for styling web pages. It allows
developers to control layout, typography, colours, spacing, and other visual aspects of a website
or application. With CSS, you can create responsive designs that adapt to different screen sizes
and devices, ensuring a consistent experience across platforms.
In modern front-end development, there are various tools and methodologies available to
streamline the styling process. CSS preprocessors like Sass and LESS enable developers to
write cleaner and more maintainable code by offering features like variables, mixins, and
nesting. Additionally, CSS frameworks like Bootstrap and Tailwind CSS provide pre-
designed components and utilities to speed up development and ensure consistency.
Beyond basic styling, front-end developers also need to consider accessibility and performance.
Accessibility involves making sure that the interface is usable by people with disabilities, such
as by providing adequate contrast ratios, semantic HTML, and keyboard navigation support.
Performance optimization techniques like CSS minification, lazy loading, and using efficient
CSS selectors help ensure fast page load times and smooth user interactions.
In HTML, the DISPLAY PROPERTY is a fundamental CSS property that determines how an
element is rendered in the layout. It specifies the type of box generated by an element. Here
are some of the common values for the display property:
1. Block: This value makes the element generate a block-level box. Block-level elements start
on a new line and take up the full width available.
2. Inline: This value makes the element generate an inline-level box. Inline elements do not
start on a new line and only take up as much width as necessary.
3. Inline-block: This is a combination of block and inline. It allows the element to behave like
a block element while still flowing with surrounding inline elements.
4. None: This value removes the element from the normal document flow, essentially hiding it
from view. The element and its content will not be rendered.
5. Flex: This value enables a flex container for the element, allowing flexible layouts to align
and distribute space among its children.
6. Grid: This value enables a grid container for the element, allowing complex layouts to be
created with rows and columns.
7. Table: This value makes the element behave like a table element. It can have table-related
properties like `table-row`, `table-cell`, etc., which can be useful for creating table-like layouts.
8. Inline-table: Similar to `table`, but the element behaves like an inline-level table instead of
a block-level one.
9. List-item: This value makes the element generate a list-item box. It's commonly used with
`<li>` elements in lists, indicating that they should be displayed as list items
8. Inline-table: Similar to `table`, but the element behaves like an inline-level table instead of
a block-level one.
9. List-item: This value makes the element generate a list-item box. It's commonly used with
`<li>` elements in lists, indicating that they should be displayed as list items.
10. Inline-flex: This value combines the inline behavior with flexbox capabilities, allowing the
element to be inline-level while also enabling flexible layouts using flexbox properties.
These values offer flexibility in how elements are displayed and positioned within the
document layout, allowing developers to create a wide range of designs and structures using
HTML and CSS.
CSS offers various properties to style child elements within a parent element. Here are some
key ones:
1. Child Selector (`>`): This selector targets only the immediate children of a parent element.
For example, `parent > child` would style only the direct child elements of the parent.
2. Descendant Selector (whitespace): This selector targets all descendants of a parent element,
not just immediate children. For example, `parent descendant` would style all elements inside
the parent, regardless of their depth.
3. :nth-child() Selector: This pseudo-class targets elements based on their position within a
parent element. For instance, `:nth-child(odd)` would select every odd-numbered child of the
paren
4. :first-child and :last-child: These pseudo-classes target the first and last child elements of
a parent, respectively.
5. :only-child: This pseudo-class selects elements that are the only child of their parent.
6. Child Element Properties: These are CSS properties that directly affect the styling or
behaviour of child elements within a parent. For example, `margin`, `padding`, `colour`, `font-
size`, etc., can be set for child elements to control their appearance within the parent container.
7. Child Combinators (`+` and `~`): These combinators allow you to select sibling elements
that come immediately after (`+`) or any sibling elements that come after (`~`) a specified
element.
9. Child-specific Styles: CSS allows you to apply styles to child elements based on their
context within the parent. For example, you can define styles for a `div` element with a specific
class only when it's a child of another element with a certain class.
10. Transforms and Transitions: CSS transforms (`transform`) and transitions (`transition`)
can be applied to child elements to create effects like scaling, rotating, or transitioning between
states.
By leveraging these CSS properties and techniques, we can create intricate and dynamic
layouts, styles, and effects for child elements within HTML structures, enhancing the overall
user experience of your web pages.
"HOVER PROPERTIES" typically refers to the CSS properties that dictate how an element
should appear or behave when a user hovers their cursor over it. These properties allow web
developers to enhance user experience by providing visual feedback or interactive elements.
1. Colour: This property changes the text colour of an element when it's hovered over. For
example, you could make the text change to a different colour to provide visual feedback that
the element is interactive.
3. Border: With the `border` property, you can add or modify the border around an element
when it's hovered over. This can be used to create effects like adding a border around an image
when the user hovers over it.
4. Opacity: Opacity controls the transparency of an element. When an element's opacity is set
to less than 1, it becomes partially transparent. This property can be used to create subtle effects
like fading an element in or out when hovered over.
5. Cursor: The `cursor` property specifies the type of cursor to be displayed when the mouse
pointer is over an element. For interactive
elements like links or buttons, you might change the cursor to a pointer to indicate to the user
that the element is clickable.
7. Box-shadow: With the `box-shadow` property, you can add a shadow effect to an element.
By changing the parameters of the box shadow when hovered over, you can create effects like
making the shadow more pronounced or changing its colour, giving the element a sense of
depth and interaction.
8. Text-decoration: This property controls the decoration added to text, such as underlining,
overlining, or striking through. It's commonly used to remove underlines from links by default
and then add them back when the user hovers over the link, providing visual feedback that the
text is clickable.
These properties and techniques, when used creatively, can significantly enhance the
interactivity and visual appeal of a website, making the user experience more engaging and
enjoyable.
________________________________________________________________
CHAPTER 6
BACKEND
6.1 MY SQL
MySQL is an open-source relational database management system (RDBMS) that allows users
to store, organize, and manage their data. It uses structured query language (SQL) for accessing
and manipulating the data stored in its databases. MySQL is widely used for web applications
due to its reliability, scalability, and ease of use. It supports various operating systems and is
compatible with many programming languages, making it a popular choice for developers and
businesses alike.
MySQL supports the SQL (Structured Query Language) standard, which is a powerful
language used for querying and managing databases. SQL allows users to perform various
operations such as retrieving data with SELECT statements, modifying data with INSERT,
UPDATE, and DELETE statements, and managing the database structure with CREATE,
ALTER, and DROP statements.
1. Scalability: MySQL can handle large amounts of data and is designed to scale efficiently as
your data grows.
2. High Performance: It's optimized for speed and can handle complex queries quickly,
making it suitable for high-traffic websites and applications.
4. Security: MySQL offers robust security features such as user authentication, encryption, and
access control to protect your data from unauthorized access and ensure data integrity.
5. Community Support: Being open-source, MySQL has a large and active community of
developers and users who contribute to its development, provide support, and share resources
and knowledge.
Overall, MySQL is a powerful and reliable choice for storing and managing data in a wide
range of applications, from small personal projects to large-scale enterprise systems.
1. Inversion of Control (IoC) / Dependency Injection (DI): Spring implements IoC, allowing
objects to be configured and wired together through configuration files or annotations rather
than being responsible for their own creation and management. This promotes loose coupling
and makes components easier to test and maintain.
3. Spring MVC: Spring MVC is a web framework built on top of the core Spring Framework,
providing a model-view-controller architecture for building web applications. It offers features
such as request mapping, data binding, validation, and view resolution, making it a powerful
choice for developing web applications.
4. Spring Data: Spring Data provides a consistent and easy-to-use programming model for
data access in Java applications. It offers support for various data stores including relational
databases, NoSQL databases, and distributed data stores, allowing developers to work with
data using a unified API.
6. Spring Boot: Spring Boot is a project within the Spring ecosystem that aims to simplify the
process of building and deploying Spring-based applications. It provides auto-configuration,
embedded servers, and production-ready features out of the box, allowing developers to
quickly bootstrap their applications with minimal configuration.
Overall, the Spring Framework offers a robust and flexible platform for building Java
applications, promoting best practices such as modularity, testability, and maintainability. Its
extensive ecosystem of modules and libraries makes it a popular choice for developers
worldwide.
2. Versions: The JDK is regularly updated with new features, performance enhancements, and
bug fixes. Each version introduces improvements and sometimes changes to the language
syntax and APIs. Developers can choose the JDK version that best suits their project
requirements and compatibility needs.
3. Platform Independence: One of Java's key features is its platform independence. The JDK
enables developers to write code once and run it on any device or platform that supports Java,
without needing to recompile the code for each platform.
4. Installation: The JDK can be downloaded and installed from the official Oracle website or
from other sources. It's available for various operating systems such as Windows, macOS, and
Linux.
5. OpenJDK: In addition to the JDK provided by Oracle, there's also OpenJDK, an open-
source implementation of the Java Platform. OpenJDK is maintained by the Java community
and often used as the basis for other JDK distributions, including Oracle JDK.
The JDK is an essential tool for Java developers, providing everything they need to create,
compile, debug, and run Java applications efficiently.
Unit testing and integration testing are both crucial components of the software testing
process, but they serve different purposes and focus on different aspects of testing.
Unit Testing:
1. Scope: Unit testing focuses on testing individual units or components of a software
application in isolation. A unit can be a single function, method, class, or module.
2. Purpose: The primary goal of unit testing is to validate that each unit of the software
performs as expected. It verifies that the code functions correctly according to its design and
requirements.
3. Isolation: Unit tests are typically designed to be independent of external dependencies such
as databases, networks, or other components. Mock objects or stubs may be used to simulate
the behavior of these dependencies during testing.
4. Automation: Unit tests are often automated, allowing them to be executed quickly and
frequently during the development process. Continuous integration (CI) systems can
automatically run unit tests whenever code changes are made, providing rapid feedback to
developers.
5. Tools: There are many unit testing frameworks and tools available for various programming
languages, such as JUnit for Java, PVtest for Python, NUnit for .NET, and others.
Integration Testing:
1. Scope: Integration testing focuses on testing the interactions and interfaces between different
units or components of a software application. ensures that these units work together as
intended when integrated into the larger system.
2. Purpose: The primary goal of integration testing is to uncover defects in the interactions
between components, such as incorrect data exchange, communication errors, or compatibility
issues.
3. Dependencies: Unlike unit testing, integration tests often involve real external
dependencies, such as databases, web services, or third-party APIs. These tests validate the
behaviour of the system as a whole, including its interactions with external systems.
4. Complexity: Integration testing can be more complex and time-consuming than unit testing
due to the need to set up and manage the environment for testing multiple components together.
5. Types: Integration testing can be further divided into various types, such as:
*Top-down integration testing: Testing begins with the highest-level modules and gradually
integrates lower-level modules.
*Bottom-up integration testing: Testing begins with the lowest-level modules and
gradually integrates higher-level modules.
*Big bang integration testing: All components are integrated simultaneously.
Both unit testing and integration testing are essential for ensuring the quality and reliability
of software applications. Unit tests catch issues at the lowest level of granularity, while
integration tests verify the interactions between components in the broader context of the
system. Combined, these testing approaches provide comprehensive coverage and help
developers identify and address defects throughout the software development lifecycle.
1. Database Design:
*Normalization: Organize data into logical structures to minimize redundancy and improve
data integrity.
*Indexing: Create indexes on columns frequently used in queries to speed up data retrieval.
*Partitioning: Divide large tables into smaller, more manageable partitions for better
performance and easier maintenance.
*Data Types: Choose appropriate data types and sizes to minimize storage space and improve
query performance.
2. Query Optimization:
*Use of Indexes: Ensure that queries utilize indexes effectively to minimize table scans and
improve performance.
*Query Tuning: Analyse and optimize SQL queries by examining execution plans,
identifying bottlenecks, and rewriting queries for better performance.
*Avoiding Cursors: Use set-based operations instead of row-by-row processing to improve
query performance.
*Normalization and Denormalization: Strike a balance between normalized and
denormalized data structures based on query patterns and performance requirements.
*Resource Allocation: Optimize resource allocation (CPU, memory, disk) based on workload
patterns and performance requirements.
4. Indexing Strategies:
*Covering Indexes: Create covering indexes that include all columns needed for a query to
avoid accessing the table's data pages.
*Composite Indexes: Create composite indexes on multiple columns frequently used together
in queries to improve index efficiency.
*Index Maintenance: Regularly monitor and maintain indexes by rebuilding or reorganizing
them to ensure optimal performance.
5. Data Maintenance:
*Data Purging: Regularly purge obsolete or unnecessary data to free up storage space and
improve query performance.
*Data Archiving: Archive historical data that is rarely accessed to reduce the size of active
databases and improve performance.
*Vacuuming and Reindexing: Perform routine maintenance tasks like vacuuming and
reindexing to reclaim space and optimize index performance.
OVERALL, Backend development is a crucial aspect of web development responsible for the
server-side logic, database management, and overall functionality of a web application. It
involves writing code that runs on the server and communicates with the client-side (frontend)
to deliver dynamic content, handle user requests, and process data. Common technologies used
in backend development include programming languages like JavaScript (Node.js), Python,
Ruby, Java, and PHP, as well as frameworks and tools such as Express.js, Django, Ruby on
Rails, Spring Boot, and Laravel. Backend developers focus on ensuring the security, scalability,
performance, and reliability of web applications, often working closely with frontend
developers, database administrators, and other stakeholders to deliver robust and efficient
solutions.
___________________________________________________________________________
CHAPTER 7
MIDDLEWARE
1. Connectivity: Middleware provides connectors and adapters that enable connectivity with
various data sources, including databases, file systems, web services, message queues, and
enterprise applications. These connectors abstract away the underlying communication
protocols and data formats, allowing middleware to interact with diverse systems uniformly.
4. Data Quality and Governance: Middleware can include functionalities for data quality
management and governance, such as data validation, cleansing, deduplication, and
enrichment. These features help ensure that the integrated data is accurate, consistent, and
compliant with regulatory requirements, thereby maintaining the integrity and reliability of the
organization's data assets.
6. Batch Processing: In addition to real-time integration, middleware may also support batch
processing for handling large volumes of data in scheduled or batch mode. Batch processing
workflows can be orchestrated within middleware environments to perform data extraction,
transformation, and loading (ETL) tasks efficiently and reliably, leveraging parallel processing
and fault tolerance mechanisms.
By leveraging Middleware for data integration, organizations can streamline the flow of data
across their IT infrastructure, break down data silos, and enable seamless collaboration and
insights-driven decision-making across departments and systems.
MAIN FUNCTIONS:
1. Request Routing: An API gateway routes client requests to the appropriate backend service
based on the endpoint and the HTTP method. It acts as a reverse proxy, hiding the internal
structure of the system from the clients.
4. Logging and Monitoring: API gateways can log requests and responses for auditing
purposes and monitoring system performance. They provide insights into traffic patterns, error
rates, and other metrics that help in troubleshooting and optimizing the system.
5. Rate Limiting: To prevent abuse or overuse of the backend services, API gateways can
enforce rate limiting policies. They limit the number of requests a client can make within a
certain time period, ensuring fair usage of resources.
6. Transformation and Aggregation: API gateways can transform request and response
payloads to adapt them to the specific requirements of different clients. They can also aggregate
data from multiple services into a single response, reducing the number of requests required by
clients.
Overall, API gateways play a crucial role in building scalable, secure, and efficient distributed
systems by providing a unified entry point for client applications to interact with backend
services.
3. Event Handling: Many workflows involve responding to events or triggers from external
sources. Middleware often includes capabilities for event handling, allowing workflows to be
triggered based on predefined conditions or events. Middleware can listen for events from
external systems, such as message queues, databases, or sensors, and initiate workflow
execution in response.
Ensuring the integrity of data and messages exchanged between components is paramount.
Middleware should implement integrity checking mechanisms such as digital signatures or
message authentication codes (macs) to verify message authenticity and prevent tampering
during transit. Comprehensive auditing and logging capabilities are indispensable for
monitoring security events and activities. Middleware should log authentication attempts,
access control decisions, configuration changes, and other security-relevant events
to detect and respond to security incidents promptly.
Regular security patching and updates are essential to address known vulnerabilities and
mitigate the risk of exploitation. Organizations should establish processes for monitoring
security advisories and applying patches promptly. Secure configuration of middleware
components is fundamental. Following best practices and security guidelines provided by
vendors or industry standards organizations ensures that middleware is configured securely,
with unnecessary features disabled and security features enabled.
CHAPTER 8
PROJECT
In today's digital age, e-commerce has become an indispensable aspect of modern business
operations. With the convenience of online shopping, businesses can reach a global audience
and customers can access a wide array of products and services from the comfort of their
homes. To tap into this lucrative market, we propose the development of a comprehensive e-
commerce website.
Our e-commerce website will serve as a platform where users can browse, select, and purchase
products effortlessly. It will feature intuitive navigation, secure payment gateways, and robust
functionality to enhance the overall shopping experience. With a user-friendly interface and
seamless integration of key features, our website aims to cater to the diverse needs of both
customers and administrators.
1. User Authentication: The website will support user authentication, allowing individuals to
create accounts, log in, and manage their profiles securely. This feature ensures personalized
experiences and facilitates order tracking and communication.
2. Product Catalog: A well-organized product catalog will showcase a wide range of items
available for purchase. Users can browse through categories, view detailed product
descriptions, and access high-quality images to make informed buying decisions.
3. Shopping Cart: The website will include a shopping cart functionality that enables users to
add desired products, review their selections, and proceed to checkout seamlessly. The cart will
dynamically update with each addition or removal of items, providing a transparent and
convenient shopping process.
4. Secure Checkout Process: We prioritize the security of our users' sensitive information.
Therefore, our website will integrate reliable payment gateways and encryption protocols to
ensure safe transactions during the checkout process. Multiple payment options will be
available to accommodate diverse preferences.
5. Admin Dashboard: Administrators will have access to a robust dashboard that facilitates
the management of products, orders, and user accounts. From the dashboard, admins can add
new products, update inventory, monitor sales metrics, and address customer inquiries
efficiently.
8.2 OBJECTIVES
1. Enhanced User Experience: Intuitive and user-friendly interface that enables seamless
navigation, product discovery, and purchasing processes to enhance overall user satisfaction.
4. Efficient Shopping Cart Functionality: A robust shopping cart system that allows users to
add, remove, and modify items easily from the cart, with real-time updates and the ability to
seamlessly proceed to checkout.
9. Search Engine Optimization (SEO): Implemented SEO best practices to improve the
website's visibility and ranking on search engine results pages, increasing organic traffic and
attracting potential customers.
10. Feedback and Iterative Improvement: Gather user feedback through surveys, analytics,
and customer support interactions to identify areas for improvement and implement iterative
updates and enhancements to continually enhance the website's functionality and user
experience.
WATERFALL MODEL
Waterfall model is the earliest SDLC approach that was used for software development. It is
also referred to as a linear-sequential life cycle model. It is very simple to understand and use.
In a waterfall model, each phase must be completed before the next phase can begin and there
is no overlapping in the phases.
Following is a diagrammatic representation of different phases of waterfall model.
Fig: 8.1
In "The Waterfall" approach, the whole process of software development is divided into
separate phases. In Waterfall model, typically, the outcome of one phase acts as the input for
the next phase sequentially. The sequential phases in Waterfall model are:
• System Design: The requirement specifications from first phase are studied in this phase and
system design is prepared. System Design helps in specifying hardware and system
requirements and also helps in defining overall system architecture.
• Implementation: With inputs from system design, the system is first developed in small
programs called units, which are integrated in the next phase. Each unit is developed and tested
for its functionality which is referred to as Unit Testing.
• Integration and Testing: All the units developed in the implementation phase are integrated
into a system after testing of each unit. Post integration the entire system is tested for any faults
and failures.
• Deployment of system: Once the functional and non-functional testing is done, the product
is deployed in the customer environment or released into the market.
• Maintenance: There are some issues which come up in the client environment. To fix those
issues patches are released. Also to enhance the product some better versions are released.
Maintenance is done to deliver these changes in the customer environment.
All these phases are cascaded to each other in which progress is seen as flowing steadily
downwards (like a waterfall) through the phases. The next phase is started only after the defined
set of goals are achieved for previous phase and it is signed off, so the name "Waterfall
Model". In this model phases do not overlap.
8.3 CODING
package com.s13sh.myshop;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MyShopApplication {
public static void main(String[] args) {
SpringApplication.run(MyShopApplication.class, args);
}
_______________________________________________________________
//ADD PRODUCTS CODE
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:insert="~{fragments/header}"></th:block>
<title>Add Product - MyShop</title>
<link rel="stylesheet" href="/css/addproduct.css">
</head>
<body>
<th:block th:insert="~{fragments/navbar}"></th:block>
<th:block th:insert="~{fragments/message}"></th:block>
<div class="container mt-4">
<h2>Add Product</h2>
<form action="/admin/add-product" method="post" th:object="${product}"
enctype="multipart/form-data">
<div class="form-group">
_______________________________________________________________
//LOGIN CODE
<!DOCTYPE html>
<html lang="en">
<head>
<th:block th:insert="~{fragments/header}"></th:block>
<title>MyShop - Login</title>
<link rel="stylesheet" href="/css/login.css">
</head>
<body>
<th:block th:insert="~{fragments/navbar}"></th:block>
<th:block th:insert="~{fragments/message}"></th:block>
<div class="container">
<h2>Login</h2>
<form action="/login" method="post">
<div class="form-group">
<label for="email">Email:</label>
<input type="text" class="form-control" id="email"
name="email" placeholder="Enter your email"
required>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control" id="password"
name="password"
placeholder="Enter your password" required>
</div>
<div class="d-flex justify-content-between align-items center">
<a href="/" class="btn btn-secondary">Back</a>
<button type="submit" class="btn btn-
success">Login</button>
</div>
</form>
</body>
</html>
// PAYMENT CODE
<!DOCTYPE html>
<html lang="en">
<head>
<th:block th:insert="~{fragments/header}"></th:block>
<title>Payment Page</title>
</head>
<body>
<h1>Final Order Details</h1>
<table border="1">
<tr th:each="item:${myOrder.items}">
<th th:text="${item.name}"></th>
<th th:text="${item.quantity}"></th>
<th>X</th>
<th th:text="${item.price/item.quantity}"></th>
<th>=</th>
<th th:text="${item.price}"></th>
</tr>
<tr>
<th>Total Price: </th>
<th colspan="5" th:text="${myOrder.totalPrice}"></th>
</tr>
<tr>
<th>Date TIme: </th>
<th colspan="5" th:text="${myOrder.dateTime}"></th>
</tr>
<tr>
<th>Name: </th>
<th colspan="5" th:text="${customer.name}"></th>
</tr>
<tr>
<th>Mobile: </th>
<th colspan="5" th:text="${customer.mobile}"></th>
</tr>
</table>
<button id="rzp-button1">Pay with Razorpay</button>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script th:inline="javascript">
var options = {
"key": /[[${key}]]/,
"amount": /[[${myOrder.totalPrice*100}]]/,
"currency": "INR",
"name": "s13sh-Shop",
"description": "Ecommerce Purchase",
"image":
"https://static.vecteezy.com/system/resources/previews/015/131/880/original/flat-woman-
holding-shopping-bags-cartoon-wallpaper-modern-design-for-shopping-online-website-
design-png.png",
"order_id": /[[${myOrder.orderId}]]/,
"callback_url": "http://localhost/confirm-order/[[${myOrder.id}]]",
"prefill": {
"name": /[[${customer.name}]]/,
"email": /[[${customer.email}]]/,
"contact": /[['+91'+${customer.mobile}]]/
},
"notes": {
"address": "Razorpay Corporate Office"
},
"theme": {
"color": "green"
}
};
var rzp1 = new Razorpay(options);
document.getElementById('rzp-button1').onclick = function (e) {
rzp1.open();
e.preventDefault();
}
</script>
</body>
</html>
_______________________________________________________________
// VIEW CART CODE
<!DOCTYPE html>
<html>
<head>
<th:block th:insert="~{fragments/header}"></th:block>
<title>View Cart</title>
<link rel="stylesheet" href="/css/dispproducts.css">
</head>
ADMIN LOGIN
Fig: 8.2
MANAGE MENU
Fig: 8.3
ADD PRODUCTS
Fig: 8.4
ADDING TO CART
Fig: 8.5
ORDER DETAILS
Fig: 8.6
1. Admin
• Log In: Admin can login to the application by providing the valid credentials i.e E-Mail ID
and Password to access the application.
• Manage Categories: Admin will be managing the categories of Products.
• Add Food Items to the Cart: Admin can add food items to the cart.
• Manage Orders: Admin can manage the orders by seeing the order details.
• View Orders: Admin can view orders.
• Log Out: Admin can log out from the website.
2. User/Customer
• Log In: Users can login to the application by providing valid Email and password.
• View Items in the Cart: Users can view items in cart.
• Ordering the Food: Users can order the food item.
• View History: Users can view the order history.
• Log Out: Users can log out from the website.
Conclusion
The e-commerce website project successfully demonstrates the implementation
of a fully functional platform where users can browse and purchase products
while administrators have the capability to manage inventory through a secure
login system. Throughout the development process, emphasis was placed on
creating an intuitive user interface, efficient database management, and robust
security measures to ensure a seamless shopping experience for customers and
effective product management for administrators.
Overall, the e-commerce website project and the internship experience have
significantly contributed to my development as a Java full-stack developer,
equipping me with the necessary skills and confidence to tackle complex software
projects in the future.
REFERENCES
LINKS:
• https://en.wikipedia.org/wiki/JavaScript
• https://www.w3schools.com/html/
BOOKS:
1.Software engineering, Skyward Publications.
2.Web Programming, Skyward Publications.