GTU Report
GTU Report
GTU Report
ON
JAVASCRIPT
(EXPRESS FRAMEWORK)
Submitted by
Student of
Bachelor of Engineering
In
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
VI
VII
TABLE OF CONTENT
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
MONGO DB 11
IX
WEEK 2
08 AUGUST 2023
16
INSTALL EXPRESS MODULES
WEEK 2
10 AUGUST 2023
PROJECT
25
CONCLUSION
REFRENCE 26
X
COMPANY LOGO
COMPANY PROFILE
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
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 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.
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.
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:
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
group related data and functions. Classes provide blueprints for creating objects with
shared properties and methods.
output
6
Asynchronous Programming:
output
7
INTRODUCTION TO NODE
JS
What is node js
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.
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 addresses several common challenges that developers face when building modern
web applications and services
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
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”
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.
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.
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:
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:
Ease of Development:
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.
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.
OUTCOME
1
Open a browser and navigate to http://localhost:3000/ to see the default Express welcome
page.
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.
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.
2
project
codes:
2
2
2
output
2
code
Out put
2
CONCLUSION
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