0% found this document useful (0 votes)
14 views

Web Programming

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Web Programming

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Fundamentals of web

A network is a group of two or more computer systems


(Multiple gadgets, additionally called hosts), which are related
through a couple of channels for the motive of sending and
receiving data (records/media) in a shared environment. The
community also can consist of serval gadgets/mediums that
resource communique among or extra machines; those gadgets
are called Network devices and consist of routers, switches,
hubs, and bridges, amongst others.
Internet is a group of computer systems connected from all
around the world. The Internet protocol suite is a framework
defined through the Internet standards. Methods are divided
right into a layered set of protocols on this architecture. The
Internet gives a huge variety of statistics and communique
offerings, which includes forums, databases, email, and
hypertext. It is made of the neighborhood to global personal,
public networks connected through plenty of digital, wireless,
and networking technologies.
History of Internet
• ARPANET (Advanced Research Projects Agency Network, later renamed
the internet) established a successful link between the University of
California Los Angeles and the Stanford Research Institute on October
29, 1969. Libraries automate and network catalogs outside of
ARPANET in the late 1960s.z
• TCP/IP (Transmission Control Protocol and Internet Protocol) is
established in the 1970s, allowing internet technology to mature. The
development of these protocols aided in the standardization of how
data was sent and received via the internet.
• NSFNET (National Science Foundation Network), the 56 Kbps backbone
of the internet, was financed by the National Science Foundation in
1986. Because government monies were being used to administer and
maintain it, there were commercial restrictions in place at the time.
• In the year 1991, a user-friendly internet interface was developed.
• Delphi was the first national commercial online service to offer
internet connectivity in July 1992. Later in May 1995, All restrictions
on commercial usage of the internet are lifted. As a result, the
internet has been able to diversify and grow swiftly.
• Wi-Fi was first introduced in 1997.
• The year is 1998, and Windows 98 is released.
• Smartphone use is widespread in 2007.
• The 4G network is launched in 2009.
• The internet is used by 3 billion people nowadays. By 2030, there are
expected to be 7.5 billion internet users and 500 billion devices
linked to the internet.
Uses of the Internet:
• E-mail: E-mail is an electronic message sent across a network from one computer
user to one or more recipients. It refers to the internet services in which messages
are sent from and received by servers.
• Web Chat: Web chat is an application that allows you to send and receive messages
in real-time with others. By using Internet chat software, the user can log on to
specific websites and talk with a variety of other users online. Chat software is
interactive software that allows users to enter comments in one window and receive
responses from others who are using the same software in another window.
• World Wide Web: The World Wide Web is the Internet’s most popular information
exchange service. It provides users with access to a large number of documents that
are linked together using hypertext or hyperlinks.
• E-commerce: E-commerce refers to electronic business transactions made over the
Internet. It encompasses a wide range of product and service-related online business
activities.
• Internet telephony: The technique that converts analog speech impulses into
digital signals and routes them through packet-switched networks of the internet is
known as internet telephony.
• Video conferencing: The term “video conferencing” refers to the use of voice and
images to communicate amongst users.
• Web Client
• The client (or user) side of the Internet. The Web browser on the user’s computer or
mobile device is referred to as a Web client. It could also apply to browser extensions
and helper software that improve the browser’s ability to support specific site services.
• Web browser
• A web browser is a software program software that searches for, retrieves, and
presentations material which includes Web pages, photos, videos, and different files. The
browser sends a request to the Webserver, which then transmits the statistics returned
to the browser, which presentations the findings at the laptop. Example – Mozilla Firefox,
Microsoft Edge, Google Chrome, Safari etc.
• Webpage
• An internet web page (additionally called a web page) is a report that may be regarded
in an internet browser at the World Wide Web. HTML (HyperText Markup Language) and
CSS (Cascading Style Sheet) are used to generate the primary shape of an internet web
page. An internet web page is generally a segment of an internet site that carries
statistics in plenty of formats, which includes textual content inside the shape of
paragraphs, lists, tables, and so on.
• The home web page is the beginning or first web page of an internet site. It gives trendy
statistics and connections to all the internet pages which are associated. Every internet
web page has its personal deal with. This may be visible withinside the deal with the bar.
As a result, if we need to get admission to a selected internet web page, the deal needs
to be placed inside the browser’s deal with bar.
• Website
• An internet site, in trendy, is a group of statistics approximately statistics prepared into
many internet pages. An internet site is probably made for a sure motive, subject matter,
or to provide a service. An internet site (abbreviated as “website” or “site”) is a group of
online pages connected collectively through links and saved on an internet server. By
clicking on links, a tourist can pass from one web page to the next. An internet site’s
pages also are connected below one area call and proportion a not unusual place subject
matter and template.
• Search Engine
• Search engines are websites that search on the internet on behalf of users and show a
listing of results. More than actually written may be discovered on seek engines. You can
be capable of looking for different online content material which includes photographs,
video content material, books, and news, in addition to gadgets and offerings, relying on
the seek engine you are the use of.
• To make use of the Internet, you do not always want to recognize the deal with an internet
site. It is crucial to recognize the way to do a look for statistics. Using a seek engine is one
of the only methods to seek. A seek engine can help you in finding what you are looking
for. You also can appearance up net maps and instructions to help you to plot your
adventure from one factor to some other. Example: Google, Bing, DuckDuckGo, yahoo, etc.
The Beginning of the Internet
• Web 1.0: Web 1.0, which emerged with the invention of the Internet, featured static web
pages that could only be viewed. These early websites were essentially digital brochures,
with limited interactivity and no ability for users to contribute content. This era saw the rise
of early browsers such as Mosaic and Netscape Navigator, which made it easier for users to
access the Web.
• Web 2.0: The Era of Social Media and User-Generated Content
• Web 2.0, which emerged during the “Internet Boom” era of the late 1990s and early 2000s,
introduced more dynamic web pages and websites, and allowed for user-generated
content. This era saw the rise of social media platforms such as Facebook, Twitter, and
YouTube, as well as the introduction of blogs, wikis, and other forms of user-generated
content.
• Web 3.0: The Future of the Internet
• Web 3.0, which is still in development, promises to bring a more personalized and intuitive
experience for users. It is expected to be more intelligent and able to understand the
context and intent of the user’s actions. This will be achieved through the integration of
Artificial Intelligence (AI) and Machine Learning (ML) technologies.
• Many experts in the tech industry claimed that Web 3.0 is the next evolution of the internet
that is focused on decentralization, intelligence, and security. It aims to create a more
personalized, intuitive, and inclusive experience for users by leveraging new technologies
such as blockchain and artificial intelligence. The goal of Web 3.0 is to make the internet
more democratic, open-source, and secure.
Advantages of the Internet:
• It is the best source of a wide range of information. There is no
better place to conduct research than the internet.
• Online gaming, talking, browsing, music, movies, dramas, and TV
series are quickly becoming the most popular ways to pass the time.
• Because there are hundreds of thousands of newsgroups and
services that keep you updated with every tick of the clock, the
Internet is a source of the most recent news.
• Because of virtual shops where you may buy anything you want and
need without leaving your house, internet shopping is becoming
increasingly popular. Recently, virtual shops have been making a lot
of money.
• With the emergence of online businesses, virtual stores, and credit
card usage, purchasing goods without going to the store has never
been easier.
Disadvantages of the Internet:
• Spending too much time on the internet is hazardous for the
young generation’s physical and mental health.
• Children who use the internet develop an addiction, which is
quite dangerous.
• It is now quite easy to decipher someone’s chat or email
messages thanks to the hacking community.
• With the emergence of online stores, people prefer to order
online rather than going to local stores which results in less
social interactions among people.
Multipurpose Internet Mail Extension (MIME) Protocol
• Multipurpose Internet Mail Extension (MIME) is a standard that was
proposed by Bell Communications in 1991 in order to expand the limited
capabilities of email.
MIME is a kind of add-on or a supplementary protocol that allows non-ASCII
data to be sent through SMTP. It allows the users to exchange different kinds
of data files on the Internet: audio, video, images, application programs as
well.

• Why do we need MIME?


Limitations of Simple Mail Transfer Protocol (SMTP):
1.SMTP has a very simple structure
2.Its simplicity however comes with a price as it only sends messages in NVT 7-
bit ASCII format.
3.It cannot be used for languages that do not support 7-bit ASCII format such as
French, German, Russian, Chinese and Japanese, etc. so it cannot be
transmitted using SMTP. So, in order to make SMTP more broad, we use MIME.
4.It cannot be used to send binary files or video or audio data.
Features of MIME –

1.It is able to send multiple attachments with a single message.


2.Unlimited message length.
3.Binary attachments (executables, images, audio, or video files) may be divided if needed.
4.MIME provided support for varying content types and multi-part messages.
• MIME Header:
It is added to the original e-mail header section to define transformation. There are five
headers that we add to the original header:
1.MIME-Version – Defines the version of the MIME protocol. It must have the
parameter Value 1.0, which indicates that message is formatted using MIME.
2.Content-Type – Type of data used in the body of the message. They are of different
types like text data (plain, HTML), audio content, or video content.
3.Content-Type Encoding – It defines the method used for encoding the message. Like 7-
bit encoding, 8-bit encoding, etc.
4.Content Id – It is used for uniquely identifying the message.
5.Content description – It defines whether the body is actually an image, video, or
audio.
Web programmers tools box-
javascript
• What is JavaScript ?
• JavaScript is a lightweight, cross-platform, single-
threaded, and interpreted compiled programming language. It is
also known as the scripting language for webpages. It is well-
known for the development of web pages, and many non-browser
environments also use it.
• JavaScript is a weakly typed language (dynamically typed).
JavaScript can be used for Client-side developments as well as
Server-side developments. JavaScript is both an imperative and
declarative type of language. JavaScript contains a standard library
of objects, like Array, Date, and Math, and a core set of language
elements like operators, control structures, and statements.
• Client-side: It supplies objects to control a browser and its
Document Object Model (DOM). Like if client-side extensions allow an application
to place elements on an HTML form and respond to user events such as mouse
clicks, form input, and page navigation. Useful libraries for the client side
are AngularJS, ReactJS, VueJS, and so many others.
• Server-side: It supplies objects relevant to running JavaScript on a server. For if
the server-side extensions allow an application to communicate with a database,
and provide continuity of information from one invocation to another of the
application, or perform file manipulations on a server. The useful framework
which is the most famous these days is node.js.
• Imperative language – In this type of language we are mostly concerned
about how it is to be done. It simply controls the flow of computation. The
procedural programming approach, object, oriented approach comes under this
as async await we are thinking about what is to be done further after the async
call.
• Declarative programming – In this type of language we are concerned about
how it is to be done, basically here logical computation requires. Her main goal
is to describe the desired result without direct dictation on how to get it as the
arrow function does.
How to Link JavaScript File in
HTML ?
• JavaScript can be added to HTML file in two ways:
• Internal JS: We can add JavaScript directly to our HTML
file by writing the code inside the <script> tag. The
<script> tag can either be placed inside the <head> or
the <body> tag according to the requirement.
• External JS: We can write JavaScript code in another
files having an extension.js and then link this file inside
the <head> tag of the HTML file in which we want to
add this code.
syntax

<script>
// JavaScript Code
</script>
example
<!DOCTYPE html>
<html lang="en">

<head>
<title>
Basic Example to Describe JavaScript
</title>
</head>

<body>

<!-- JavaScript code can be embedded inside


head section or body section -->
<script>
console.log("Welcome to mangalore institute of management
science");
</script>
</body>

</html>
History of JavaScript
• It was created in 1995 by Brendan Eich while he was an engineer at Netscape. It
was originally going to be named LiveScript but was renamed. Unlike most
programming languages, JavaScript language has no concept of input or output. It
is designed to run as a scripting language in a host environment, and it is up to the
host environment to provide mechanisms for communicating with the outside
world. The most common host environment is the browser.
• Features of JavaScript
• According to a recent survey conducted by Stack Overflow, JavaScript is the most
popular language on earth.
With advances in browser technology and JavaScript having moved into the server
with Node.js and other frameworks, JavaScript is capable of so much more. Here are
a few things that we can do with JavaScript:
• JavaScript was created in the first place for DOM manipulation. Earlier websites
were mostly static, after JS was created dynamic Web sites were made.
• Functions in JS are objects. They may have properties and methods just like other
objects. They can be passed as arguments in other functions.
• Can handle date and time.
• Performs Form Validation although the forms are created using HTML.
• No compiler is needed.
Applications of JavaScript
• Web Development: Adding interactivity and behavior to static sites JavaScript was
invented to do this in 1995. By using AngularJS that can be achieved so easily.
• Web Applications:With technology, browsers have improved to the extent that a
language was required to create robust web applications.
• Server ApplicationsWith the help of Node.js, JavaScript made its way from client to
server and Node.js is the most powerful on the server side.
• Games:Not only in websites, but JavaScript also helps in creating games for leisure.
The combination of JavaScript and HTML 5 makes JavaScript popular in game
development as well.
• SmartwatchesJavaScript is being used in all possible devices and applications. It
provides a library PebbleJS which is used in smartwatch applications.
• ArtArtists and designers can create whatever they want using JavaScript to draw on
HTML 5 canvas, and make the sound more effective also can be used p5.js library.
• Machine Learning: This JavaScript ml5.js library can be used in web development
by using machine learning.
• Mobile Applications: JavaScript can also be used to build an application for non-
web contexts.
Limitations of JavaScript

• Security risks: JavaScript can be used to fetch data using AJAX or by


manipulating tags that load data such as <img>, <object>, <script>. These
attacks are called cross-site script attacks. They inject JS that is not part of the
site into the visitor’s browser thus fetching the details.
• Performance: JavaScript does not provide the same level of performance as
offered by many traditional languages as a complex program written in JavaScript
would be comparatively slow. But as JavaScript is used to perform simple tasks in
a browser, so performance is not considered a big restriction in its use.
• Complexity: To master a scripting language, programmers must have a
thorough knowledge of all the programming concepts, core language objects, and
client and server-side objects otherwise it would be difficult for them to write
advanced scripts using JavaScript.
• Weak error handling and type checking facilities: It is a weakly typed
language as there is no need to specify the data type of the variable. So wrong
type checking is not performed by compile.
JavaScript Identifiers

• JavaScript Identifiers
• JavaScript variables must have unique names. These
names are called Identifiers.
• There are some basic rules to declare a variable
in JavaScript:
• These are case-sensitive
• Can only begin with a letter, underscore(“_”) or “$”
symbol
• It can contain letters, numbers, underscore, or “$”
symbol
• A variable name cannot be a reserved keyword.
JavaScript var is a keyword used to declare variables in JavaScript
that are function scoped. Before the introduction of ES6 all the
keywords in JavaScript were declared with only “var” keyword. The
var keyword is also used to declare global-scope variables.
Syntax:
var variableName = valueOfVar;
Function Scope: The variables declared inside a function are
function scoped and cannot be accessed outside the function. The
variables declared with var can only be accessed inside that
function and its enclosing function.
example
• 1. var test = 12
• function foo(){
• console.log(test);
• }
• foo();

• Output=12

• 2. var test1 = 12,


• test2= 14,
• test3 = 16
• function foo(){
• console.log(test1, test2, test3);
• }

You might also like