web development1
web development1
web development1
Bachelor of Technology In
By
GUNTUR
1
Accredited by NAAC with 'A+' Grade VISADALA(V),
MEDIKONDURU(M), GUNTUR(Dt) -522428
Department Of Computer Science and Engineering
GUNTUR
I, JAVVAJI TRISHA here by declare that the course entitled WEB
DEVELOPMENT/JAVA INTERNSHIP done by me at NRI Institute of
Technology is submitted for partial fulfillment of the requirements for the
award of Credits in Department of CSE.The results embodied in this have
not been submitted to any other University for the same purpose.
2
NRI INSTITUTE OF TECGNOLOGY GUNTUR
Department Of Computer Science and Engineering
K.NAGESWARAO
(prof.Department of CSE)
3
ABSTRACT
Full Stack Java development has emerged as a versatile and robust
solution for building end-to-end applications, catering to a diverse range of industry needs. This
development paradigm involves proficiency in Java-based backend technologies and
complementary frontend frameworks to deliver cohesive, scalable, and maintainable solutions.
Java, known for its platform independence and extensive ecosystem, serves as the backbone for
server-side logic, while frontend technologies like HTML, CSS, and JavaScript ensure intuitive and
responsive user interfaces.
The backend stack typically comprises Spring Framework, Hibernate, and RESTful APIs
for building secure and efficient server-side components. For the frontend, integration with
frameworks like Angular, React, or Vue.js enhances interactivity and user engagement. Full stack
Java developers leverage tools like Maven, Jenkins, and Docker for continuous integration, testing,
and deployment, ensuring streamlined workflows and high-quality deliverables.
This comprehensive skill set enables developers to bridge the gap between frontend and
backend, fostering a seamless application development process. Organizations benefit from reduced
communication overhead, faster development cycles, and a unified codebase. As businesses
increasingly seek agile and scalable digital solutions, Full Stack Java development remains pivotal in
delivering cutting-edge applications that meet evolving market demands.
This abstract underscores the significance of mastering Full Stack Java to harness its
potential for modern software development, highlighting its role in transforming ideas into fully
functional and efficient applications.
The goal of Full Stack Java development is to build end-to-end applications by integrating
backend and frontend technologies seamlessly. It focuses on creating efficient, scalable, and
usercentric solutions using tools like Spring, Hibernate, and JavaScript frameworks. This approach
enables rapid development and deployment of robust applications that meet diverse business needs.
4
CERTIFICATE OF INTERNSHIP
5
ACKNOWLEDGEMENT
We take this opportunity to express our deepest gratitude and
appreciation to all those people who made this Internship work easier with words of
encouragement, motivation, discipline, and faith by offering different places to look to expand my
ideas and help me towards the successful completion of this Internship work.
First and foremost, we express our deep gratitude to Dr.Alapati Ravindra, Chairman,
NRI Institute of Technology for providing necessary facilities throughout the Internship program.
We express our sincere thanks to Dr. Kota Srinivasarao, Principal, NRI Institute of
Technology for his constant support and cooperation throughout the Internship program.
We would like to express our sincere gratitude to our NRIIT INTERNSHIP I/C
Ms.G.Sowmya, SPOC and our Internship Coordinator Ms.----------for his insightful advice,
motivating suggestions, invaluable guidance, help and support in successful completion of this
Internship.
We would like to take this opportunity to express our thanks to the teaching and non-
teaching staff in the Department of Computer Science & Engineering NRIIT for their invaluable
help and support.
Javvaji Trisha-22KP1A0553
6
Table of Contents:
FullStackJava Virtual Internship
Module Module Contents Dates Page
No:
Module 1:
Front End Introduction to Front End
1.HTML
1.1 Introduction to html 10
1.2 Structure , Basic Tags. 15-05-2024 to 22
1.3 Forms , Media. To
1.4 Semantic Tags , Attributes. 01-06-2024
2.CSS
2.1 Introduction to Css
2.2 Selectors & Specificity
2.3 Box Model & Layouts
2.4 Styling & Animations
2.5 Frameworks & Integration
3.JAVASCRIPT
3.1 Introduction to JS
3.2 Basics& Functions
3.3 Objects & Arrays
3.4 DOM Manipulation
3.5 ES6+ Features & Asynchronous JS
3.6 Error Handling & Advanced Topics
7
Module 2:
Back End Introduction to Back End
1.JAVA 23
1.1 Introduction to Java 02-06-2024 to 35
1.2 Core Java Concepts To
1.3 Object-Oriented Programming (OOP) 22-06-2024
1.4 Java Collections
1.5 Exception Handling
1.6 File Handling and I/O
2. Spring
2.1 Introduction to Spring
2.2 Spring Framework
3. Spring Boot
3.1 Introduction and Architecture
3.2 Application Development
3.3 Database Integration
3.4 Security and Testing
3.5 Microservices and Deployment
3.6 Real-World Applications
Module 4: 1.GitHub
VersionControl
1.1 Introduction to Git and GitHub 03-07-2024 42 to
1.2 Git Basics To 45
1.3 Collaborating with GitHub 07-07-2024
1.4 GitHub Repositories and Workflows
1.5 Version Control Best Practices
1.6 GitHub for Full Stack Java Projects
8
1.HTML
1.1 Introduction to HTML
HTML (HyperText Markup Language) is the standard language for creating web pages.
structures web content and enables the inclusion of text, images, links, and other
elements.
• HyperText: Refers to the ability to link text.
• Markup Language: Utilizes tags to define elements within a document.
Features of HTML:
1. Easy to learn and use.
2. Supported by all modern browsers.
3. Platform-independent.
HTML File Structure: HTML documents are text files saved with a .html or .htm
extension. They can be created and edited using simple text editors.
Important Tags:
9
• <body>: Contains visible content.
• <h1> to <h6>: Headings, <h1> being the largest.
• <p>: Paragraphs.
• <a>: Hyperlinks (e.g., <a href="https://example.com">Link</a>).
Code
<label for="name">Name:</label>
<br>
<label for="email">Email:</label>
<br>
</form>
• Attributes:
o action: URL to send the data.
o method: HTTP method (GET/POST). o type: Defines input type
(text, email, password, etc.).
Media Elements:
1. Images:
Code
2. Audio Code
10
<audio controls>
3. Video
Code
</video>
Semantic tags clearly define the purpose of content, improving SEO and accessibility.
<header>
<h1>Website Title</h1>
<nav>
<a href="#home">Home</a> |
<a href="#about">About</a>
</nav>
</header>
11
<main>
<article>
<h2>Article Title</h2>
</article>
</main>
<footer>
<p>Copyright © 2024</p>
</footer>
HTML Attributes
Attributes provide additional information about elements. They are placed within the opening tag
and follow a name="value" syntax.
Common Attributes:
Example:
12
2.CSS
2.1 Introduction to CSS
CSS (Cascading Style Sheets) is a language used to style and format the appearance of HTML
documents. It separates content (HTML) from design, ensuring flexibility and consistency.
Features of CSS:
Types of CSS:
<style>
p { color: blue; }
</style>
Code
Types of Selectors:
* { margin: 0; }
p { font-size: 16px; }
13
3.Class Selector (.): Targets elements with a specific class
Specificity Rules:
14
2px solid black;
margin: 20px;
CSS Layouts:
Center vertically */
3. Positioning:
Styling Basics:
1.Colors:
color: #333; /* Text color */
background-color: #f0f0f0; /* Background */
2.Typography: font-
center;
15
CSS Transitions: Smooth changes over time.
div:hover { background-
color: lightblue;
transform: translateX(-100%); } to {
transform: translateX(0); }
1s ease-in-out;
Popular Frameworks:
document.querySelector("div").style.color = "red";
16
3.JavaScript
• Features:
o Cross-platform.
Example: <script>
console.log("Hello, JavaScript!");
</script>
Variables
scoped
Data Types
Operators
Functions
Example function
17
greet(name) { return
`Hello, ${name}!`;
console.log(greet("Alice"));
. Arrow Functions:
b) => a + b;
console.log(add(3, 5));
Objects
age: 30 }; console.log(person.name); //
"Alice"
Methods: Example
person.greet = function() {
};
console.log(person.greet());
Arrays
"banana"]; fruits.push("cherry");
console.log(fruits[1]); // "banana"
18
const squares = numbers.map(n => n * n);
console.log(squares); // [1, 4, 9]
document.querySelector("h1"); console.log(heading.textContent);
Event Listeners
document.querySelector("button").addEventListener("click", () => {
alert("Button clicked!");
});
document.createElement("p");
document.body.appendChild(para);
ES6+ Features
• Template Literals:
console.log(`Hello, ${name}!`);
age } = person;
console.log(name, age);
Spread Operator:
19
...numbers];
console.log(arr); // [1, 2, 1, 2, 3]
Asynchronous JS
• Promises: Example
fetch("https://api.example.com")
Error Handling
• Try-Catch: Example
occurred:", err);
constructor(message) {
super(message); this.name =
"CustomError";
20
Advanced Topics
• Modules:
Example
// file.js
from "./file.js";
console.log(greet("Alice"));
};
console.log(increment()); // 1
21
1. JAVA
1.1 Introduction to Java
Java is a high-level, object-oriented, platform-independent programming language developed by Sun
Microsystems in 1995. It is widely used for building robust, scalable applications across diverse
platforms.
Java's core principles are foundational for application development. Key concepts include:
• Example:
main(String[] args) {
System.out.println("Hello, World!");
• Data Types: Includes primitive types (int, double, char, etc.) and reference types.
22
• Heap and Stack: Memory allocation areas.
• Classes and Objects: Classes define properties and behaviors. Objects are instances of
classes.
void drive() {
Inheritance: Enables a class (child) to inherit properties from another class (parent).
System.out.println("Vehicle started"); }
System.out.println("Riding bike"); } }
• Abstraction: Defines essential features, hiding details (via abstract classes or interfaces).
• Encapsulation: Bundles data and methods, restricting access using access modifiers.
23
1.4 Java Collections
ArrayList Example:
list.add("Apple"); list.add("Banana");
System.out.println(list);
HashMap Example:
System.out.println(map);
1.4.3 Benefits
• Try-Catch: try {
int result = 10 / 0;
} catch (ArithmeticException e) {
24
System.out.println("Cannot divide by zero");
} finally {
System.out.println("Cleanup");
Java provides extensive support for file operations through its java.io and java.nio packages.
public static void main(String[] args) throws IOException { FileWriter writer = new
reader.read()) != -1) {
System.out.print((char) ch);
reader.close();
25
}
Example
System.out.println(line);
br.close();
26
2. Spring
Spring is a powerful and flexible open-source framework designed to simplify Java application
development. It provides comprehensive infrastructure support for developing Java applications,
enabling developers to focus on the core functionality of their software.
• Lightweight: The core container is lightweight, making Spring suitable for a range of
projects, from simple standalone applications to complex enterprise systems.
• Integration: Seamlessly integrates with popular frameworks like Hibernate, JPA, and various
web frameworks.
• Testability: Simplifies unit and integration testing by providing mock objects and eliminating
the need for a full application server during tests.
Spring aims to address common challenges in Java development, offering solutions that reduce
boilerplate code, enhance modularity, and improve maintainability.
1. Core Container:
2. Spring AOP:
o Simplifies database interaction with support for JDBC, JPA, Hibernate, and
transaction management.
27
4. Spring Web:
o Supports web application development with MVC architecture, REST APIs, and
integration with web servers.
5. Spring Security:
6. Spring Boot:
• Integration Ready: Works with various tools and frameworks like Kafka, RabbitMQ, and
Elasticsearch.
• Community Support: A large, active community ensures timely updates and extensive
documentation.
Spring has become a standard for modern Java development, powering millions of applications
across industries.
28
3.Spring Boot
3.1 Introduction and Architecture
Key Features
• Embedded Servers: Provides servers like Tomcat, Jetty, or Undertow for standalone
deployment.
Architecture
2. Choose dependencies like Spring Web, Spring Data JPA, and Thymeleaf.
3. Import the project into your IDE and add business logic.
Key Components
29
Sample REST Endpoint
Code
@RestController
@RequestMapping("/api") public
class ExampleController {
@GetMapping("/hello") public
Code
spring.datasource.url=jdbc:mysql://localhost:3306/db_name
spring.datasource.username=root
spring.datasource.password=password spring.jpa.hibernate.ddl-
auto=update
Creating Entities
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
30
private Long id;
Repository Integration
Service Layer
code
@Service
userRepository;
return userRepository.findAll();
Security
Spring Boot simplifies security with the spring-boot-starter-security module. Add the dependency
and configure basic authentication: code
spring.security.user.name=admin spring.security.user.password=admin123
31
Override default settings using
WebSecurityConfigurerAdapter:
code
@Configuration
@EnableWebSecurity
.authorizeRequests()
.antMatchers("/public/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin();
Testing
Code
UserServiceTest {
@Autowired private
UserService userService;
@Test void
testGetAllUsers() {
32
List<User> users = userService.getAllUsers();
assertNotNull(users);
Tools: Spring Cloud, Eureka for service discovery, and Hystrix for fault tolerance.
Sample Microservice
Code
@EnableEurekaClient @SpringBootApplication
SpringApplication.run(MicroserviceApplication.class, args);
Deployment Options
· Embedded Server Deployment: Package as a JAR using mvn clean package and run via java -jar
app.jar.
Create a Dockerfile:dockerfile
Code
33
FROM openjdk:11
Cloud Deployment: Deploy on AWS, GCP, or Azure using their respective platforms.
Use Cases
1. E-Commerce Platform: Build REST APIs for product catalog, user authentication, and order
processing.
2. Banking System: Use secure endpoints for transactions, account management, and reporting.
3. IoT Data Processing: Integrate with MQTT brokers to process IoT sensor data in real-time.
6. Scalability: Implement load balancing and caching using Spring Cloud and Redis
34
1.Java Database Connectivity (JDBC)
Java Database Connectivity (JDBC) is a Java API that enables Java applications to interact with
relational databases. It provides methods for querying and updating data, ensuring database
independence through a standard interface. Features of JDBC
1. Database Independence: Supports a wide range of databases like MySQL, PostgreSQL, and
Oracle.
JDBC Components
JDBC Workflow
1.Load Driver:
code
Class.forName("com.mysql.cj.jdbc.Driver");
Establish Connection:
35
Connection conn = DriverManager.getConnection(
Create Statement:
Execute Query:
(rs.next()) {
System.out.println(rs.getString("username"));
Close Resources:
rs.close(); stmt.close();
conn.close();
Best Practices
code
pstmt.setInt(1, 1);
ResultSet rs = pstmt.executeQuery();
4.Use connection pooling for efficient resource management (e.g., with HikariCP).
Advantages
Platform independence.
36
2. Structure Query Language (SQL)
2.1 Introduction and Database Basics
SQL (Structured Query Language) is a standardized programming language used for managing and
manipulating relational databases. It enables users to retrieve, insert, update, and delete data within a
database. Key components include:
37
2.2 Core SQL Operations
Aggregating Data
Joins
Joins combine rows from two or more tables based on a related column.
• Inner Join:
• Left Join:
Effective database design is critical for scalability and performance. Key principles:
Normalization
Relationships
38
• One-to-One: One record in Table A corresponds to one record in Table B.
Example:
Name VARCHAR(100));
CustomerID INT,
Java provides libraries like JDBC (Java Database Connectivity) to interact with SQL databases.
Steps to Integrate
2. Establish a Connection:
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname",
"username", "password");
while (rs.next()) {
System.out.println(rs.getString("column_name"));
conn.close();
39
Prepared Statements
Used for parameterized queries to enhance security and prevent SQL injection.
PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM table_name WHERE
column = ?"); pstmt.setString(1, "value");
ResultSet rs = pstmt.executeQuery();
Transactions
• ACID Properties:
after completion.
• SQL Syntax:
COMMIT;
To rollback:
ROLLBACK;
Optimization Techniques
2. Query Optimization:
40
3. Denormalization: In specific scenarios, duplicate data to improve read performance.
By mastering these SQL concepts, developers can efficiently design, manage, and optimize databases
for robust applications.
What is Git?
Git is a distributed version control system that tracks changes in source code during software
development. It enables multiple developers to collaborate efficiently and maintain version history.
What is GitHub?
GitHub is a cloud-based hosting service for Git repositories. It provides additional features such as
issue tracking, collaboration tools, and CI/CD integration.
Key Features
41
1.2 Git Basics
Setting Up Git
2. Configure Git:
1. Initialize a Repository:
2. Clone a Repository:
3. Check Status:
4. Stage Changes:
5. Commit Changes:
6. View Log:
Branching
• Create a branch:
• Switch branches:
• Merge branches:
42
Code: git merge <branch-name>
Pull Requests
Resolving Conflicts
2.Edit conflicting files and mark them as resolved: Code: git add
<resolved-file>
git commit
Creating a Repository
2.Provide a name and description, and choose visibility (public/private). Popular Git
Workflows
feature.
o Merge feature branches into the main branch after code review.
43
2. Gitflow Workflow o Separate branches for features,
• Automate CI/CD workflows with GitHub Actions using .yml files in the .github/workflows
directory.
Project Setup
Repository Structure
Code: project/
44
├── frontend/ # Frontend application code
1. Initialize Git:
Collaborative Practices
jobs:
45
Conclusion on Full Stack Java
Full Stack Java development offers a robust and versatile skill set for building dynamic, scalable, and
secure web applications. By leveraging Java's reliability and ecosystem, developers can manage both
the front-end and back-end aspects of application development seamlessly.
On the back-end, Java’s frameworks like Spring Boot and Hibernate facilitate rapid development of
secure and high-performance APIs, handling complex business logic and database management. For
the front-end, technologies like React, Angular, or Vue.js integrate smoothly with Java backends,
enabling the creation of engaging and responsive user interfaces. The full-stack skill set empowers
developers to bridge gaps between user experience, server-side processing, and data management.
Java’s platform independence and its extensive libraries and frameworks make it a preferred choice
for enterprise-level applications. Its ability to support microservices architecture ensures that Full
Stack Java developers are well-equipped to build modular and scalable systems tailored for modern
demands.
Furthermore, Full Stack Java developers bring value to teams by understanding and contributing to
all aspects of the software development lifecycle, ensuring efficient communication and
problemsolving across the stack. As businesses increasingly seek versatile developers, Full Stack
Java expertise provides a competitive edge in the job market.
In conclusion, mastering Full Stack Java is a strategic investment for developers aspiring to stay
relevant in the fast-evolving software landscape. It combines the power of Java's back-end
capabilities with front-end technologies, ensuring that developers can create comprehensive, end-
toend solutions.
46
47