Professional Documents
Culture Documents
BACHELOR OF TECHNOLOGY
(Electronics & Communication Engineering)
BY:
JYOTI KUMARI (01015007321)
8
CANDIDATE’S DECLARATION
Jyoti Kumari
01015007321
ECE-1
Maharaja Surajmal Institute of Technology
9
CERTIFICATE
10
II
ACKNOWLEDGEMENT
I take this golden opportunity to thank my mentor at Angela Yu who with her
unstinted support and venerated guidance made this training a real success. I
express my sincere thanks to my instructorAngela who taught me the basic
concepts of web designing and taught us thereal- life application based on
concepts using HTML, CSS, JavaScript and many more…
JYOTI KUMARI
01015007321
11
III
ABSTRACT
12
IV
LIST OF FIGURES
13
V
List of abbreviations
DB – Databas
14
VI
CONTENTS
Certificate.................................................................................................. I
Acknowledgement.................................................................................... III
Abstract.....................................................................................................IV
List of Figures............................................................................................V
List of abbreviations..................................................................................VI
Chapter 1 – Introduction
2.1 HTML................................................................................................14
2.2 CSS....................................................................................................15
2.3 JavaScript..........................................................................................16
2.4 NodeJs...............................................................................................18
2.5 ExpressJs............................................................................................22
2.6 MongoDB..........................................................................................23
Bibliography................................................................................................................41
Appendices...................................................................................................................42
15
Chapter 1- Introduction
The Internet is the global system of interconnected computer networks that use the Internet
protocol suite (TCP/IP) to link devices worldwide. It is a network of networks that consists of
private, public, academic, business, and government networks of local to global scope, linked
by a broad array of electronic, wireless, and optical networking technologies. Internet was
started as a project of US Military project named ARPANET directed by Robert Taylor and
managed by Lawrence Roberts. The World Wide Web (abbreviated WWW or the Web) is an
information space where documents and other web resources are identified by Uniform
Resource Locators (URLs), interlinked by hypertext links, and accessible via the Internet.
The “Back End” refers to the guts of the application, which live on the server. They
manipulate data appropriately to make sure the Front End has what it needs. This can
become very complicated as things scale. Back End Developers make use of
programming languages like Java, Python, and Ruby (among many others) to work
with data.
Backend development is not all ones and zeros though. Much like frontend
development, backend development has a human aspect to it as well. Since
most of the code for an application is written on the backend, it should be easy to
understand and work with. Most backend languages – like Ruby and Python – have
16
standardized styles and idioms that make reading and writing code more efficient and
enjoyable.
A back-end developer might write the code that makes that button work by figuring
out what data to fetch from the database for the appropriate customer and delivering it
back to the front-end, where it is eventually displayed. A back-end developer might
also be heavily involved in the architecture of a system, deciding how to organize the
logic of the system so that it can be maintained and run properly. He might be
involved in building frameworks or the architecture of a system to make it easier to
program against. Back-end developers tend to spend much more time implementing
algorithms and solving problems than front-end developers do. I’ve always liked
back-end development work because it feels like more of a challenge.
That’s not to say that front-end developers don’t ever solve difficult problems, but
often front-end development work is more about creating user interfaces and hooking
them up rather than implementing the actual business logic that makes the app work .
1.2 Methodology
We use the HTML(Hyper text markup language) ,CSS(cascading style sheet) javascript,
Express.js, node.js and mongoDB for our project. There are 6 different levels of security in
the Secrets website with the most secure one being OAuth 2.0.
17
Fig 1.1
for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring,
and embedded Git.
Users can change the theme, keyboard shortcuts, preferences, and install extensions thatadd
additional functionality. Microsoft has released Visual Studio Code's source code on the
VSCode repository of GitHub.com, under the permissive MIT License,while the compiled
releases are freeware.
In the Stack Overflow 2019 Developer Survey, Visual Studio Code was ranked the most
popular developer environment tool, with 50.7% of 87,317 respondents reporting that they
use it. visual studio code was announced on April29,2015,by Microsoft at the 2015 Build
conference. A Preview build was released shortly thereafter. On November 18, 2015, Visual
Studio Code was released under the Expat License, and its source code posted to GitHub.
Extension support was also announced. On April 14, 2016, Visual Studio Code graduated
the public preview stage and was released to the Web.
18
Code to learn
Visual Studio Code highlights keywords in your code in different colors to help you easily
identify coding patterns and learn faster. You can also take advantage of 8 features like
IntelliSense and Peek Definition, which helps you understand how functions can be used,
and how they relate to one another.
Use the built-in source control to save your work over time so you don't lose progress. See a
graphical side- by-side view to compare versions of your code from different points in time.
Check out this quick video on how to get a side-by-side "diff".
19
Chapter 2- Technology tools studied
2.1 HTML
The Hyper Text Markup Language or HTML is the standard markup language for
documents designed to be displayed in a web browser. It can be assisted by technologies such
as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.
Web browsers receive HTML documents from a web server or from local storage
and render the documents into multimedia web pages.HTML describes thestructure of a web
page semantically and originally included cues for the appearance of the document.
Fig 2.1
HTML elements are the building blocks of HTML pages. With HTML
constructs, images and other objects such as interactive forms may be embedded into the
rendered page. HTML provides a means to create structured documents by denoting
structural semantics for text such as headings, paragraphs, lists, links, quotes, and other
items. HTML elements are delineated by tags, written using angle brackets. Tags such
as <img /> and <input /> directly introduce content into the page. Other tags such
as <p> surround and provide information about document text and may include other tags as
sub-elements. Browsers do not display the HTML tags but use them to interpret the content
of the page.
HTML can embed programs written in a scripting language such as JavaScript, which affects
the behavior and content of web pages. The inclusion of CSS defines the look and layout of
20
content. The World Wide Web Consortium (W3C), former maintainer of the HTML and
current maintainer of the CSS standards, has encouraged the use of CSS over explicit
presentational HTML since 1997. A form of HTML, known as HTML5, is used to display
video and audio, primarily using the <canvas> element, in collaboration with javascript.
2.2 CSS
What is CSS?
CSS describes how HTML elements are to be displayed on screen, paper, or in other media.
CSS saves a lot of work. It can control the layout of multiple web pages all at once.
Fig 2.2
CSS is used to define styles for your web pages, including the design, layout and variations
in display for different devices and screen sizes.
21
more flexibility and control in the specification of presentation characteristics; enable
multiple web pages to share formatting by specifying the relevant CSS in a separate .css file,
which reduces complexity and repetition in the structural content; and enable the .css file to
be cached to improve the page load speed between the pages that share the file and its
formatting.
2.3 JavaScript
JavaScript , often abbreviated as JS, is a programming language that is one of the core
technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of
websites use JavaScript on the client side for webpage behavior, often incorporating
third-party libraries. All major web browsers have a dedicated JavaScript engine to
execute the code on users' devices.
The ECMAScript standard does not include any input/output(I/O), such as net working,
storage, or graphics facilities. In practice, the web browser or other runtime system
provides JavaScript APIs for I/O.
JavaScript engines were originally used only in web browsers, but are now core
components of some servers and a variety of applications. The most popular runtime
system for this is nodejs. popular runtime system for this is node js.
Although Java and JavaScript are similar in name, syntax, and respective standard
libraries, the two languages are distinct and differ greatly in design.
22
Fig 2.3
History
Creation at Netscape
The first web browser with a graphical user interface, Mosaic, was released in 1993.
Accessible to non-technical people, it played a prominent role in the rapid growth of
the nascent World Wide Web. The lead developers of Mosaic then founded the
Netscape corporation, which released a more polished
browser, Netscape Navigator, in 1994. This quickly became the most-used. During
these formative years of the Web, web pages could only be static, lacking the
capability for dynamic behavior after the page was loaded in the browser. There was a
desire in the flourishing web development scene to remove this limitation, so in 1995,
Netscape decided to add a scripting language to Navigator. They pursued two routes to
achieve this: collaborating with Sun Microsystems to embed the Java programming
language, while also hiring Brendan Eich to embed the Scheme language.
Netscape management soon decided that the best option was for Eich to devise a new
language, with syntax similar to Java and less like Scheme or other extant scripting
languages. Although the new language and its interpreter implementation were called
LiveScript when first shipped as part of a Navigat orbetain September 1995, the name
was changed to JavaScript for the official release in December.
23
The choice of the JavaScript name has caused confusion, implying that it is directly
related to Java. At the time, the dot-com boom had begun and Java was the hot new
language, so Eich considered the JavaScript name a marketing ploy by Netscape.
2.4 NodeJs
Node.js is an open-source, cross-platform JavaScript run-time environment that
executes JavaScript code outside the browser. According to official node.js
website,
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the
world.
24
Node.js has an event-driven architecture capable of asynchronous I/O. These
design choices aim to optimize throughput and scalability in web applications
with many input/output operations, as well as for real-time Web applications
(e.g., real-time communication programs and browser games)
History
Node.js was originally written by Ryan Dahl in 2009. He was inspired to create
Node.js after seeing a file upload progress bar on Flickr. The browser did not
know how much of the file had been uploaded and had to query the Web server.
He desired an easier way. He demonstrated the project at the inaugural European
JSConf on November 8, 2009. Node.js combined Google's V8 JavaScript engine,
an event loop, and a low-level I/O API.
Why Node.js?
25
thread context switching. It uses asynchronous programming. A common task for
a web server can be to open a file on the server and return the content to the
client but servers should not be used for simple tasks when you can get them
done without the help of servers.
About Nodejs
As an asynchronous event driven JavaScript runtime, Node is designed to build
scalable network applications. In the following "hello world" example, many
connections can be handled concurrently. Upon each connection the callback is
fired, but if there is no work to be done, Node will sleep.
26
Fig 2.5
Node.js eliminates the waiting, and simply continues with the next request. Node.js runs
single-threaded, non-blocking, asynchronously, which is very memory efficient.
2.5 Expressjs
Express is a minimal and flexible Node.js web application framework that provides a
robust set of features for web and mobile applications.
27
Why use Express
o Ultra fast I/O
o Asynchronous and single threaded
o MVC like structure
o Robust API makes routing easy
Performance
Express provides a thin layer of fundamental web application features, without
obscuring Node.js features that you know and love.
Fig 2.7
2.6 MongoDB
HISTORY
10gen software company began developing MongoDB in 2007 as a component of a
planned platform as a service product. In 2009, the company shifted to an opensource
development model, with the company offering commercial support and other services.
In 2013, 10gen changed its name to MongoDB Inc.
28
MongoDB is a global company with US headquarters in New York City, USA and
International headquarters in Dublin, Ireland.
On October 30, 2019, MongoDB teamed up with Alibaba Cloud, who will offer its
customers a MongoDB-as-a-service solution. Customers can use the managed offering
from BABA's global data centers.
Editions
MongoDB Atlas
MongoDB is also available as an on-demand fully managed service. MongoDB Atlas
runs on AWS, Microsoft Azure, and Google Cloud Platform.
On March 10, 2022, MongoDB warned its users in Russia and Belarus that their data
stored on the MongoDB Atlas platform will be destroyed.
Main Features
Ad-hoc queries
MongoDB supports field, range query, and regular-expression searches. Queries can
return specific fields of documents and also include user defined JavaScript functions.
Queries can also be configured to return a random sample of results of a given size.
Indexing
Fields in a MongoDB document can be indexed with primary and secondary indices or
index.
Replication
MongoDB provides high availability with replica sets. A replica set consists of two or
more copies of the data. Each replica-set member may act in the role of primary or
secondary replica at any time. All writes and reads are done on the primary replica by
default. Secondary replicas maintain a copy of the data of the primary using built-in
replication. When a primary replica fails, the replica set automatically conducts an
election process to determine which secondary should become the primary.
29
Secondaries can optionally serve read operations, but that data is only eventually
consistent by default.
Load balancing
MongoDB scales horizontally using sharding. The user chooses a shard key, which
determines how the data in a collection will be distributed.
30
Chapter 3- Demonstration and implementation
of project
PROJECT
Technology used:
1. HTML
2. CSS
3. Bootstrap
4. Nodejs
5. Expressjs
6. EJS
7. MongoDB
8. OAuth 2.0 authentication
This website underwent 6 levels of security with each level being an upgrade to its
previous one. The levels include:
1. Register username and password
2. Database encryption
3. Hashing passwords
4. Salting and hashing passwords with bcrypt
5. Cookies and sessions
6. OAuth 2.0 authentication
25
Dependencies:
We need to install the following dependencies using npm and require them in our project.
npm:
npm (Node Package Manager) is a package manager for the JavaScript programming
language maintained by npm, Inc. npm is the default package manager for the JavaScript
runtime environment Node.js. It consists of a command line client, also called npm, and
an online database of public and paid-for private packages, called the npm registry. The
registry is accessed via the client, and the available packages can be browsed and searched
via the npm website. The package manager and the registry are managed by npm, Inc.
Session values are far more secure since they are saved in binary or encrypted form and can
only be decoded at the server. When the user shuts down the machine or logs out of the
program, the session values are automatically deleted. We must save the values in the
database to keep them forever.
A cookie is a small text file that is saved on the user’s computer. The maximum file size for
a cookie is 4KB. It is also known as an HTTP cookie, a web cookie, or an internet cookie.
26
When a user first visits a website, the site sends data packets to the user’s computer in the
form of a cookie.
The information stored in cookies is not safe since it is kept on the client-side in a text
format that anybody can see. We can activate or disable cookies based on our needs.
OAuth (Open Authorization) is an open standard for access delegation, commonly used as
a way for internet users to grant websites or applications access to their information on other
websites but without giving them the passwords. This mechanism is used by companies such
as Amazon,Google, Facebook, Microsoft, and Twitter to permit the users to share information
about their accounts with third-party applications or websites.
Generally, OAuth provides clients a "secure delegated access" to server resources on behalf of
a resource owner. It specifies a process for resource owners to authorize third-party access to
their server resources without providing credentials. Designed specifically to work
with Hypertext Transfer Protocol (HTTP), OAuth essentially allows access tokens to be
issued to third-party clients by an authorization server, with the approval of the resource
owner. The third party then uses the access token to access the protected resources hosted by
the resource server.In particular, OAuth 2.0 provides specific authorization flows for web
applications, desktop applications, mobile phones, and smart devices.
Installations
The following installations were required for the project. Go to the hyper terminal and type
the following commands.
27
10. Npm install passport-local
The web application is divided into many sections. The code snippets of each of the
sections are provided below.
1. Homepage
28
2. Login page
3. Register page
29
4. Secret page
30
5. Submit page
6. Header page
31
7. Footer page
32
Javascript code:
33
34
35
Chapter 4- Result and Future scope
Website homepage:
Register page
Login page
36
Home page
Recommendation page
37
Future Scope
A Web Developer holds an important position in a company as he/she has to use a language
from the client and convert it into a language that a computer understands i.e. HTML.
As you can imagine, web development requires a lot of effort and time along with an intricate
understanding of how various components of web development work to stay ahead of your
competitors.
The best part of being a web developer is that there is no need to be tied to one particular area.
This field comes with loads of transferable skills needed for other disciplines.
For instance, web developers can easily switch to mobile development. Due to similarity in
the interfaces, creating mobile applications can access a different ecosystem. With all the web
development skills under your arsenal, you can easily make this happen.
As we head towards an even more tech-driven future, the development skills are progressively
in demand. Artificial Intelligence, Machine Learning, Internet of Things (IoT), quantum
computing, etc. are changing the tech world. And this even comes down to their relationship
with the websites.
• Running a business from the ground up is an art, but in the real world, startups confront
substantial hurdles, whether it’s their brand image, income production, business abilities,
and so on. There is no barrier to corporate success in today’s world. However, the startup
needs a functional website.
• People are becoming more conscious and appreciative of looking online for the products
and services they require since we live in a digitally driven society where everything
around us is tech-centered. This is when the website comes in handy for hundreds of
potential consumers. As startups have no history of dealing with issues in the ever-
changing business environment, it is ideal if they engage a well-experienced software
development firm that is equipped with automation, data science, business intelligence,
up-to-date web apps, and other platforms.
38
• A web development service provider has the necessary experience to create a website that
looks amazing and operates flawlessly, with all of the features that entrepreneurs demand.
39
Conclusion
Web technology is leading the world through the internet, web technologies are most widely
used to build Web based Applications and web Pages .Many Business organizations are
depending on these technologies. So these web Technologies like Html, JavaScript, xml, Java,
React, Node.js etc are playing a major role in building the web pages and the web based
applications.
Training at Udemy gave me an opportunity to learn new technologies and how to tackle with
errors .Each day I spent there I learnt something new.
By using standard resources and tools, our visitors are able to view our web pages no matter
what browser they use. Our pages would load faster and we would also be able to maintain the
pages we have created with ease.
Using the right resources for our web design jobs will make our websites contemporary. They
can easily integrate into current technologies and software. Our users would derive added value
from our websites and contribute to its growth.
The right resources also make it easy for surfers to use our site. The standard tools used for
creating the website will ensure that things such as navigation, menus and layout conform to
current practices with which every web user is familiar with.
Our pages become attractive if we use the right tools. They can display correctly in the browser
and your visitors would be glad to visit again because you appealed to then.
Throughout the training, I was able to put in my effort and contribute the best I can to the Web
Development .The environment provided by the organization enabled me to grow not just as a
developer but also as a person.
40
BIBLIOGRAPHY
During the process of doing the following project I referred to online material
available. Also, various research papers by renowned researchers played a vital role
in enlightening me and made me aware of some fewer known facts.
• Udemy- https://www.udemy.com/
• W3schools - https://www.w3schools.com/
• Freecodecamp - https://www.freecodecamp.org/
• Stack Overflowhttps://stackoverflow.com/
• Javapoint - https://www.javatpoint.com/
• GeekforGeeks - https://www.geeksforgeeks.org/
41
APPENDIX
Routes: Routing defines the way in which the client requests are handled by the
application endpoints.
JSON: JSON is an open standard file format and data interchange format that uses
human-readable text to store and transmit data objects consisting of attribute-value
pairs and arrays.
42