GTU Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 38

AN INTERNSHIP REPORT

ON

WEB DEVELOPMENT USING

JAVASCRIPT

(EXPRESS FRAMEWORK)

Submitted by

PRASAD KHUSHI KUMARI


RAJKUMAR (200140111033)

Student of

Bachelor of Engineering
In

ELECTRONICS & COMMUNICATION ENGINEERING

GOVERNMENT ENGINEERING COLLEGE,


I
BHARUCH

II
DECLARATION

I do hereby solemnly declare that the work presented in this Internship Report has
been carried out by me and has not been previously submitted to any other
University, College, and Organization for any academic Qualification and
Certificate.

I hereby warrant that the work I have presented does not breach any existing
copyright acts.

Student Name:
Prasad Khushi Kumari Rajkumar

III
CONFIRMATION LETTER

IV
CERTIFICATE OF COMPLETION

V
ABSTRACT

This report encapsulates a 15-day internship dedicated to exploring the realm of


backend development, focusing on essential technologies that power modern web
applications and services. The internship journey encompassed a deep dive into
JavaScript, Node.js, Express, and MongoDB, shedding light on their core
functionalities and practical applications. From mastering JavaScript's foundational
concepts to deciphering the asynchronous nature of Node.js, this report provides a
comprehensive overview of the intricacies involved in building robust backend
systems. The significance of the Express framework in simplifying routing,
middleware handling, and request processing is highlighted, followed by an
exploration of MongoDB's role as a NoSQL database for flexible data storage and
real-time analytics. Practical projects, including the creation of a RESTful API
with Express and MongoDB, underscore the hands-on experiences that solidified
the understanding of each technology. This report serves as a valuable resource for
anyone seeking insights into backend development, offering a concise yet
informative overview of JavaScript, Node.js, Express, and MongoDB in the
context of modern application architecture.

VI
VII
TABLE OF CONTENT

WEEK / DAY NO CONTENT PAGE NO


Declaration II
Confirmation Letter III
Completion Certificate IV
Abstract V

WEEK 1 27JULY 2023


COMPANY PROFILE 1

INTRODUCTION 2

JAVASCRIPT 3
- What is js
- Why js was developed
- When and where js is used
- Why js is used

VII
WEEK 1 28 JULY 2023
4
SOME JS FUNDAMENTAL
- Variables and data types
- Functions

WEEK 1
31 JULY 2023
5
- Asynchronous programming
- Control flow
- Objects and class

WEEK 1 01 AUGUST 2023


8
INTRODUCTION TO NODE JS

WEEK 1 02 AUGUST 2023


10
HANDS 0N EXPERIENCE WITH NODE JS

WEEK 2 03 AUGUST 2023

MONGO DB 11

WEEK 2 04 AUGUST 2023

SETTING ENVIRONMENT VARIABLE 12

WEEK 2 07 AUGUST 2023


EXPRESS FRAMEWORK 15

IX
WEEK 2
08 AUGUST 2023
16
INSTALL EXPRESS MODULES

WEEK 2 09 AUGUST 2020


PROJECT 20

WEEK 2
10 AUGUST 2023
PROJECT
25
CONCLUSION

REFRENCE 26

X
COMPANY LOGO

COMPANY PROFILE

THE FURATION.TECH SOLUTION specialize in providing comprehensive


solutions in Blockchain and Human Resource Management (HRM), Customer
Relationship Management (CRM), Enterprise Resource Planning (ERP), and custom E-
commerce solutions. They offer expertise in cutting-edge technologies such as Machine
Intelligence (MI), Artificial Intelligence (AI), and Data Engineering. Our aim is to
provide innovative solutions that cater to the unique needs of each client and drive their
business forward.

COMPANY’s MISSION
At Furation Tech Solutions, our mission is to empower businesses with innovative
technology solutions that drive growth, increase efficiency, and elevate the customer
experience.

1
INTRODUCTION

This report documents a comprehensive 15-day internship journey focused on backend


development, during which I delved into key technologies that power the backend of
modern web applications and services.

Throughout this internship, I gained practical experience and insights into JavaScript,
Node.js, Express, and MongoDB – integral components of contemporary backend
architecture.

This report outlines my learning process, hands-on experiences, and projects undertaken,
providing a thorough understanding of the fundamental concepts and tools essential for
building efficient and dynamic server-side applications. From mastering JavaScript
fundamentals to delving into the intricacies of Express and MongoDB, this report
encapsulates my journey into the world of backend development, showcasing the
significance and real-world applications of each technology.

2
JAVASCRIPT

WHAT IS JAVASCRIPT

JavaScript is a versatile and widely-used programming language primarily used for


building interactive and dynamic features in web applications. It is an essential
component of web development, enabling developers to create engaging user interfaces
and responsive web experiences. JavaScript is a client-side scripting language, meaning it
runs directly in the web browser of the user.

WHY JAVASCRIPT WAS DEVELOPED

JavaScript was developed to address the need for client-side interactivity in web
browsers. When the World Wide Web was in its early stages, web pages were
predominantly static, displaying text and images without much user interaction.
JavaScript was created to enable dynamic, interactive, and responsive web applications.

WHEN AND WHERE JAVA SCRIPT IS USED

JavaScript is used in a wide range of contexts across web development and beyond. Here
are some common scenarios and places where JavaScript is used:

Web Development
Web Applications
Server-Side Development
Mobile App Development
Game Development
Browser Extensions
Internet of Things (IoT)

JavaScript's versatility and wide adoption have led to its use in diverse fields, making it
an essential programming language for modern software development.

3
WHY JAVA SCRIPT IS USED
JavaScript's versatility, browser compatibility, and extensive ecosystem make it an
essential tool for creating modern web applications, user interfaces, interactive features,
and a wide range of other software solutions.

SOME JAVASCRIPT FUNDAMENTALS:

During the 15-day internship, I delved into the core concepts of JavaScript, which is the foundation of modern
web development. JavaScript is a versatile programming language that enables dynamic and interactive web
applications. Here are some key concepts, tools, and techniques I explored:

Variables and Data Types:

JavaScript allows the declaration of variables to store data. Data types include numbers, strings, booleans, objects,
arrays, and more.

Functions:
Functions are blocks of reusable code that perform specific tasks. They can take parameters and return values.

4
Output

Control Flow:

JavaScript supports conditional statements (if, else if, else) and loops (for, while) to
control the flow of the program.

5
output

Objects and Classes:

group related data and functions. Classes provide blueprints for creating objects with
shared properties and methods.

output

6
Asynchronous Programming:

JavaScript supports asynchronous operations using promises and async/await to


handle tasks like fetching data from APIs.

output

7
INTRODUCTION TO NODE
JS

What is node js

Node.js is an open-source, cross-platform runtime environment that allows developers to


build server-side applications using JavaScript. It was developed to enable efficient and
scalable server-side programming, leveraging the same programming language that is
commonly used for frontend development.

Node.js has played a significant role in revolutionizing server-side development by


introducing a new approach that prioritizes speed, efficiency, and real-time capabilities. It
has become a popular choice for building modern web applications, APIs, and
microservices.

Why node js was developed


Node.js was developed to address the limitations of traditional server-side technologies
and to provide a platform that enables scalable and efficient server-side applications. It
was created to cater to the demands of real-time and data-intensive web applications,
which were becoming more prevalent.

Node.js was developed to provide developers with a fast, scalable, and efficient platform
for building real-time, data-intensive applications that could easily integrate with existing
JavaScript knowledge and frontend technologies. It revolutionized the server-side
development landscape by introducing an event-driven, non-blocking architecture that
aligned well with the demands of modern web applications.

When and where node js is used

Node.js is used in a wide range of scenarios across web development and beyond. Its
versatility and performance characteristics make it suitable for various applications. Here
are some common use cases for Node.js:

Web Applications
API Development
Server-Side Rendering (SSR)
Streaming Applications

8
why node js is used

Node.js is used for several compelling reasons due to its unique features and capabilities
that make it suitable for a wide range of applications

Node.js's asynchronous capabilities, event-driven architecture, scalability, and versatility


have led to its widespread adoption in various domains, making it a popular choice for
building modern, efficient, and real-time applications.

What problems does node js solves

Node.js addresses several common challenges that developers face when building modern
web applications and services

Node.js addresses challenges related to concurrency, real-time communication, blocking


I/O, scalability, code consistency, and more. Its unique features make it particularly well-
suited for building modern web applications that require high performance, real-time
interactivity, and efficient handling of concurrent connections.

INTRODUCTION TO NODE JS

Node.js is a runtime environment that allows developers to run JavaScript code on the
server-side. It's built on the V8 JavaScript engine, which compiles JavaScript to
machine code for improved performance. Node.js is event-driven and non-blocking,
making it particularly suitable for building scalable and real-time applications.

9
Hands-On Experience with Node.js
During my internship, I had the opportunity to work on a real-time chat application using
Node.js and Socket.IO. Here's a simplified example demonstrating how to set up a basic
chat server:
Setting Up the Environment: First, you need to install Node.js from
“https://nodejs.org/en/download” and create a project directory. In the project directory,
use the terminal to initialize a package.json file and install necessary packages:

outcome

Next step

Outcome

1
1
MONGO DB

MongoDB is a popular NoSQL database that stores data in a flexible, document-oriented


format. Unlike traditional relational databases, MongoDB does not rely on a fixed
schema, allowing for dynamic and scalable data storage. Its advantages include high
performance, horizontal scalability, and the ability to handle unstructured or semi-
structured data.

Interaction with MongoDB, Data Modeling, and Queries: During my internship, I had the
opportunity to work with MongoDB for data storage:

Data Modeling:
With MongoDB, data is stored in collections, which are similar to tables in relational
databases. Each document within a collection is a JSON-like object. I modeled data by
designing documents that represented the relevant entities and their attributes.
Queries:
MongoDB's query language allowed me to retrieve, filter, and manipulate data
effectively. The flexibility of MongoDB made it easy to query nested and complex data
structures.
Inserts and Updates:
I utilized MongoDB's API to insert new documents and update existing ones. The ability
to add new fields without altering the schema simplified data updates.
Challenges and Solutions:
While working with MongoDB, I encountered a few challenges:
Data Structure Design:
Designing the right structure for documents was crucial to ensure efficient queries and
data retrieval. I overcame this challenge by considering the application's data access
patterns and using embedded documents when needed.
Data Consistency:
As MongoDB is eventually consistent, ensuring data consistency across multiple
documents or collections required careful consideration. I addressed this challenge by
choosing appropriate data structures and using transactions when necessary.

1
install mongo db from “https://www.mongodb.com/try/download/community”

setting the environment variable for mongo db

1
why mongo db was developed
MongoDB was developed to provide a more flexible, scalable, and agile database solution
for modern applications that deal with diverse and rapidly changing data requirements. Its
design aligns with the needs of big data, real-time processing, and developer productivity
in today's fast-paced software development landscape.

What problems does mongodb solves

MongoDB was developed to address several challenges that arise when dealing with
modern data requirements and application needs. Here are some of the problems
that MongoDB solves:

Flexible Schema:

Traditional relational databases require a fixed schema definition before data can be
stored. This can be restrictive when dealing with dynamic or evolving data structures.
MongoDB's flexible schema allows you to store data without a predefined schema,
accommodating changes and variations in data over time.

Handling Unstructured Data:

MongoDB is well-suited for storing unstructured or semi-structured data, such as


documents, JSON-like objects, and arrays. This flexibility makes it easier to store and
query data with varying formats.

Scalability and Performance:

MongoDB's architecture is designed for horizontal scalability, allowing you to distribute


data across multiple servers to handle high traffic and large datasets. This addresses
performance bottlenecks and ensures smooth operation as data volume grows.

Complex Data Relationships:

Traditional relational databases require complex JOIN operations to retrieve data from
related tables. MongoDB's document-oriented structure allows you to embed related data
within a document, reducing the need for complex joins and improving query
performance.
1
Agile Development:

In agile development environments, requirements often change rapidly. MongoDB's


schema-less nature allows developers to iterate quickly, accommodating changes in data
structure without requiring extensive schema modifications.

High Write Throughput:

MongoDB's write-intensive workloads benefit from its architecture's focus on high write
throughput. It's designed to efficiently handle insert and update operations, making it
suitable for applications with frequent data changes.

Real-Time Analytics:

MongoDB's aggregation framework and flexible querying capabilities enable real-time


analytics and reporting. It's well-suited for applications that require dynamic data analysis
and insights.

Ease of Development:

MongoDB's JSON-like document structure aligns well with modern programming


languages, making it easier for developers to work with data directly in their application's
native format.

MongoDB addresses challenges related to data flexibility, scalability, complex


relationships, rapid development, and performance, making it suitable for a wide range of
modern applications and use cases.

1
EXPRESS
FRAMEWORK

INTRODUCTION TO EXPRESS
Express.js, commonly referred to as Express, is a web application framework for Node.js.
It provides a set of tools and features that make it easier to build web applications and
APIs using Node.js. Express simplifies tasks like handling routes, middleware, and
requests, allowing developers to create robust and efficient backend applications more
easily.

What is express .js


Express is a minimalistic yet powerful web application framework for Node.js, designed to simplify the creation
of backend applications and APIs. It provides an intuitive and efficient way to handle routes, middleware, and
requests, allowing developers to build robust and scalable web applications with ease. Express streamlines tasks
like defining routes for different HTTP methods, processing middleware functions, and serving static files. Its
modular design encourages code organization, and its flexibility makes it suitable for various use cases, from
creating APIs to building full-fledged web applications. Express's popularity stems from its ability to accelerate
development while providing the tools needed to create efficient, feature-rich, and high-performance server-side
applications in the Node.js environment.

Why express was developed


Express was developed to address the need for a more straightforward and flexible web application framework for
Node.js. As Node.js gained traction, developers sought a tool that would simplify the process of building server-
side applications and APIs. Express was created to fill this gap by providing a minimalistic yet feature-rich
framework that focuses on essential tasks like routing, middleware, and request handling. By streamlining these
aspects, Express enables developers to build web applications with greater efficiency, speed, and scalability. Its
design philosophy emphasizes simplicity, modularity, and extensibility, making it an ideal choice for both
newcomers to backend development and experienced developers seeking a reliable and versatile tool to create
Node.js applications.

When and where express is used


Express is used extensively in a wide range of applications and industries where backend
development is a requirement. It has found its place in various contexts, including web
applications, APIs, and microservices. Express is employed to build dynamic websites,
content management systems, e-commerce platforms, and social media applications,
offering a structured approach to handle routes and requests. Its middleware capabilities
are valuable in implementing authentication, logging, and data validation

1
Additionally, Express's simplicity and flexibility make it an excellent choice for
prototyping, enabling developers to rapidly create and test ideas. Whether in startups,
enterprises, or personal projects, Express is frequently used to streamline backend
development, resulting in efficient and scalable applications that cater to modern web and
API needs.

TO INSTALL EXPRESS MODULES TYPE:

OUTCOME

1
Open a browser and navigate to http://localhost:3000/ to see the default Express welcome
page.

to run the code need to type in termial:

1
code

Out put

1
Express routes are a fundamental concept in the Express.js web application framework
for Node.js. Routes define how your application responds to different HTTP requests and
URL paths. They allow you to map specific URLs to functions that handle the
corresponding requests, enabling you to create the various endpoints and functionalities
of your web application or API.

Express routes consist of two main components:

HTTP Methods:

Each route is associated with an HTTP method, such as GET, POST, PUT, or DELETE.
The HTTP method indicates the type of operation you want to perform on the specified
URL.
URL Patterns:

Routes are defined by specifying the URL pattern or path that the route should match.
These patterns can include placeholders for dynamic segments of the URL, allowing you
to capture and use parameters from the URL in your route handlers.

An Express controller refers to a logical component within an Express.js application that


handles the business logic for specific routes. In the context of the Model-View-
Controller (MVC) design pattern, controllers act as intermediaries between the incoming
requests and the application's data models and views. Controllers encapsulate the actions
and logic associated with different routes, making code organization and maintenance
more manageable. They extract data from the request, interact with the appropriate data
models or services to perform operations, and then send back the appropriate response to
the client. By separating concerns and keeping route-specific logic in controllers, Express
applications become more modular, easier to understand, and more maintainable as they
grow in complexity.

2
project

codes:

2
2
2
output

2
code

Out put

2
CONCLUSION

In conclusion, my 15-day internship focused on backend development provided valuable


insights into key technologies and concepts. I delved into JavaScript fundamentals,
gaining a strong foundation in the language's syntax, data types, and control structures.
The experience with Node.js was particularly enlightening, as I grasped its asynchronous
nature, event-driven architecture, and versatility in building server-side applications.

Exploring the Express framework showcased its significance in backend development,


streamlining routing, middleware handling, and request processing. By implementing
routes, middleware functions, and handling HTTP methods, I realized how Express
simplifies backend development and promotes efficient code organization.

Throughout the internship, I gained hands-on experience by creating projects such as a


RESTful API using Express for a blogging platform. These projects enabled me to apply
learned concepts in practical scenarios, solidifying my understanding.

In summary, the internship provided comprehensive exposure to JavaScript, Node.js,


Express, and MongoDB, enhancing my backend development skills. The knowledge
gained in these technologies equips me with the proficiency needed to contribute
effectively to modern web applications and services. The journey was both informative
and rewarding, nurturing a solid foundation for future endeavors in backend development.

2
REFERENCE

https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/development_environment

https://expressjs.com/en/starter/hello-world.html

https://javascript.info/function-basics

https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose

2
2

You might also like