0 ratings0% found this document useful (0 votes) 21 views23 pagesWeb Tech Unit 1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Topics to be covered.
Aigtory of Web
{col Governing Web
Afgw to develop Web Project
faternet Services
Java
Tsntroduction
2 Operator
Stet Types
Tred 8c
Zitatonce
FS raceage ad I
eee rasta or Others Ontas GioorarMmAG{OOFE
ception Hand
mtvend programming
Aaeatoph
vg arin
aN ‘and AWT Controls:
fot Manager
Crappy Ena!i cov
History of Web
_2Sir Tim Bemers-Lee invented the World Wide Web in 1989.
+ Inthe history of the World Wide Web, there are two lines to be traced
The development of hypertext
The development of the internet protocols.
In 1972, DARPA starts research leading to the internet.
In 1975, Alan Kay produces the first personal computer.
* Berners-Lee developed the first web browser and web server software in 1990, and by
1991, the first web page was created.
* The web quickly grew in popularity as more people began to use it for communication,
collaboration, and sharing information.uy Aa, 1 Siena = Biov
Protocol Governing Web
_Prvpertext Transfer Protocol (HTTP):
© HTTP is the foundation of data communication on the web. It is a protocol used to
transfer data over the internet, and it governs how web browsers and servers
‘communicate with each other.
‘+ Hypertext Transfer Protocol Secure (HTTPS):
© HTTPS is 2 more secure version of HTTP that encrypts data transmitted between a web
server and a web browser. It uses SSL (Secure Sockets Layer) or TLS (Transport Layer
Security) encryption to protect data from interception and hacking.
* File Transfer Protocol (FTP):
© FTP is a protocol used for transferring files between computers over the internet. Itis
‘commonly used to upload and download files from web servers.How to develop Web Project
Phase-t: Strategy
1.Goals and objectives
2.Team building
3.Research and review
4, Project proposal
Phase-Il : Design and specification
1. Developing concepts
2.Content planning
3.Rough design
4.Final design
5.Build prototype
6.Prototype testing
Phase-Ill: Production or development
1.Coding
i clovHow to develop Web Project
Phace-IV : Testing and maintenance
[SS ymation testing
ual testing
Register with ISP :
domain name
“eStrwating
Phase-VI: Launch
+ EIOVa i cIov
Internet Services @ em
Intemet service provides a way for data to be transferred from internet servers to our computer.
Categories:
+ Communication services
Electronic mail
Telnet c. Mailing lists
© Internet telephony (VoIP)
* Information retrieval services
FIP
+ Web services:
© Allow exchange of information between applications on the web.
* www:
It offers a way to access documents spread over the several servers over the internet.
© The hyperlinks allow the users to navigate between the documents.elov
Core Java
,_Aava is a popular programming language that is widely used for developing desktop, web, and
‘mabile applications.
Some of the key features of Java are:
* Object-oriented programming:
Allows developers to create modular and reusable code.
* Platform-independent:
© Java code can run on any platform(Windows, Mac, Linux, and other) that has a Java
Virtual Machine UVM).
* Automatic memory management:
© Java uses automatic memory management, which means that developers don't need to
manage memory manually. The Java Virtual Machine automatically allocates and
deallocates memory.
‘+ Exception handling:
© Allows developers to handle errors and exceptions effectively.i biov
Core Java
Rich API
© The Java Standard Library includes APIs for fle VO, networking, database access, and
7 Multi-threading:
© Create applications that can perform multiple tasks simultaneously. Multi-threading can
improve application performance and responsiveness.
+ Security:
© Java has built-in security features that help protect against viruses, malware, and other
security threats.cov
Operator
Lonary operator:
‘+ The Java unary operators require only one operand.
+ Unary operators are used to perform various operations such as
Incrementing/decrementing a value by one (++,--)
Inverting the value of a Boolean (!)
2. Arithmetic operator :
** Java arithmetic operators are used to perform addition, subtraction, multiplication, and
division. They act as basic mathematical operations.
Relational operator
‘+ Relational operators enables us to test for any relationship between two operands.
-=(equal to}, != (not equel to), > (greater than), < (less than), >= (greater than or equal to),
less than or equal to) are the example of relational operator.elov
Ls
Operator
_A¥ Assignment operator :
_#-fava assignment operator is one of the most common operators.
* Its used to agsign the value on its right to the operand on its left.
*Ggieost=/=sb= = ae the example of assignment operator.
5. Bitwise operator :
* Bitwise operator works on bits and performs bitby-bit operation,
+ Itcan be applied to the integer types, long, int, short, char, and byte.
‘* Binary AND operator, binary OR operator, binary XOR operator are the example of bitwise
operator.
Sty vows: Prov?i clov
Data Types
Primitive Data Types:
2 Primitive data types are built-in datatypes.
“s-byte: an 8-bit signed integer
s-short: a 16-bit signed integer
“sink: a 32-bit signed integer
jong: a 64-bit signed integer we by
single 16-bit Unicode character by
boolean: a truffalse value
_Non-Primitive Data Types: TOTS ans
+ String: a sequence of characters na dF
Array, 2collection of elements ofthe same data type 3
Class: a blueprint for creating objects
Interface: a collection of abstract methods that can be implemented by classes
These data types can be used to define variables, parameters, and return types in Java.
methods.i biov
Arrays
_2-An array in Java is.a data structure that allows you to store a collection of values of the
same data type in a contiguous block of memory.
* Each value in the array is identified by an index, which is a non-negative integer that
represents its position in the array.
‘+ The first element in the array has an index of 0, the second element has an index of 1, and
soon,
dataType() arrayName = new dataypetarraySize];
int) myArray = new int {5}
int() myArray
1.2.3, 4.55cov
Methods
* In Java, a method is.a block of code that performs a specific task and can be invoked (called)
by other parts of a program.
+ Methods can be used to encapsulate functionality and make code more reusable and easier
to maintain.e10v
_Slass
_2-4n Java, a class is a blueprint for creating objects that encapsulates data and behavior.
* A class defines the properties (data members) and methods (functions) that all objects of
‘that class will have.= lov
Class
+ accessModifier specifies the visibility ofthe lass (e.., public, private, protected, or default)
= as a
+ class: keyword used to define a class
seem yee o define a class
_2BlassName: specifies the name ofthe class (by convention, the name should start with @
"_sapital letter)
_silata members: variables that store data within the ciass
* constructors: special methods that are used to initialize abjects of the class
‘+ methods: functions that define the behavior of the class°°) Sing ete kis the netance Herc wher oe driv das ts
bat oertancs ste tans hac wero dro cs ots
cHterrcat nears: Rist hrc erry wher mit sds
«trav invertane: Eth vertance Neary wren sas acts ab650
“ ices Ne {neat sy leg combination ofcov
Interface
interface defines a set of methods but does not implement ther.
‘A class that implements the interface agrees to implement all of the methods defined in the
interface.
* Ap interface is a collection of method declarations (without definitions)
“Usrthis example, Drawable is an interface that defines a single abstract method called
draw).
Bay class that implements the Drawable interface must provide an implementation of this
method,
(276 implement an interface in Java, you use the implements keyword followed by the name
of the interface.i= Elov
Features of Object-Oriented programming
* Objects
+ Class
+ Inheritance
+ Polymorphism
* Data hiding
+ Encapsulation
+ Reusabilitycov
Exception Handling
“Ty
© The try block can have one or more statements that could generate an exception.
”
en ein)
© Ifany one statement generates an exception, the remaining statements in the block are
skipped and execution jumps to the catch block that is placed next to the try block.
Every try statement should be followed by at least one catch statement; otherwise
compilation error will occur.elov
Multithread programming
+ A multithreaded program contains two or more parts that can run concurrently.
‘* Each part of such a program is called a thread, and each thread defines a separate path of
execution,
‘+ Each thread runs parallel to each other.
‘+ A multithreading is a specialized form of multitasking.
‘* In multithread program, each thread has its own life cycle.cov
Java Applet
_ At apelin ava mal program thats designed tobe executed within a web browser
Using the Java Virtual Machine (JVM).
_Attuns inside the web browser and works at client side.
Applets are used to make the website more dynamic and entertaining,
ite cycle of an applet use five methods which are as follows
.ifiit{ ) : This method is intended for whatever initialization is needed for our applet.
bstart( }:This method is automatically called after the browser calls the init method
c-stop() This method is automatically called when the user moves off the page on which
the appleyss.
aes vt). This method is only called when the browser shuts down normally.
int( ) : Invokedimmediately after the start() method, and also any time the applet
needs to repaint itself in thebrewser.elov
AWT and AWT Controls
‘-AWT stands for Abstract Window Toolkit, which is a Java-based GUI (Graphical User
Interface) library that provides the tools and components needed to create desktop
applications with a graphical user interface.
_LAWT provides a set of classes and interfaces that allow developers to create and manage
windows, buttons, text fields, menus, and other graphical user interface components.
+ It contains three kinds of classes
_a-Containers class : Frame, Dialog, Panel, Applet etc
b-Components class : TextField Button, Checkbox, Scrollbar, Label, List etc.
¢.Custom graphics class : Color, Font, Dimensions etc.
ZOE Contos refer tothe set of GU components that can be created using AWT.
hese components include-buttons, checkboxes, choice lists, labels, text fields, text areas,
and more, 7
+ AWT Controls are implemented as Java classes and can be instantiated and customized to
fit the specific needs of a given application.cov
Layout Manager
* Layout manager is a mechanism that automatically arranges the components in a container
(such as a Frame, Panel, or Window) according to a specific layout strategy.
* Layout managers are used to control the size and position of components within a
container, and to ensure that the components are displayed in a visually pleasing and
organized way.
‘+ There are several layout managers available in Java, includin
FlowLayout - arranges components in a single row or column, and wraps them to a
new row or column when there is no more space.
BorderLayout - arranges components in five regions: north, south, east, west, and
center.
GridLayout - arranges components in a grid of rows and columns.
CardLayout - allows multiple components to be displayed in the same space, and
allows the user to switch between them.
GridBagLayout - provides the most flexible and powerful layout mechanism, allowing
components to be placed in a grid of rows and colunns with variable sizes and
alignments.