Unit-3 Web Tech
Unit-3 Web Tech
Introduction of Javascript
Syntax
<script>
// JavaScript Code
</script>
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>
Basic Example to Describe JavaScript
</title>
</head>
<body>
</html>
Welcome to G L Bajaj
Features of JavaScript
JavaScript Form
Forms are the basics of HTML. We use HTML form element in order to
create the JavaScript form. For creating a form, we can use the following
sample code:
<html>
<head>
<title> Login Form</title>
</head>
<body>
<h3> LOGIN </h3>
<formform ="Login_form" onsubmit="submit_form()">
<h4> USERNAME</h4>
<input type="text" placeholder="Enter your email id"/>
<h4> PASSWORD</h4>
<input type="password" placeholder="Enter your password"/></br></br>
<input type="submit" value="Login"/>
<input type="button" value="SignUp" onClick="create()"/>
</form>
</html>
AJAX
It was developed by
It was developed by Netscape.
1. Microsoft.
JavaScript file has the file VBScript file has the file
6. extension “.js”. extensions “.vbs” or “.vba”.
Java Beans
Class in Java
JavaBeans are classes that encapsulate many objects into a single object
(the bean). It is a Java class that should follow the following conventions:
this.name = name;
}
Advantages of JavaBeans
JavaBeans Properties
getPropertyName()
For example, if property name is firstName, your method name
1
would be getFirstName() to read that property. This method is
called accessor.
setPropertyName()
For example, if property name is firstName, your method name
2
would be setFirstName() to write that property. This method is
called mutator.
Enterprise Java Beans (EJB) is one of the several Java APIs for standard
manufacture of enterprise software.
EJB is a server-side software element that summarizes business logic of an
application.
Enterprise Java Beans web repository yields a runtime domain for web
related software elements including computer reliability, Java Servlet
Lifecycle (JSL) management, transaction procedure and other web services.
The EJB enumeration is a subset of the Java EE enumeration.
The EJB enumeration aims to provide a standard way to implement the
server-side business software typically found in enterprise applications.
Such machine code addresses the same types of problems, and solutions to
these problems are often repeatedly re-implemented by programmers.
EJB application is deployed on the server, so it is called server side
component also.
Types of Enterprise Java Beans
1. Session Bean:
Session bean contains business logic that can be invoked by local, remote or
webservice client. There are two types of session beans: (i) Stateful session bean
and (ii) Stateless session bean.
Stateful session bean performs business task with the help of a state. Stateful
session bean can be used to access various method calls by storing the
information in an instance variable. Some of the applications require information
to be stored across separate method calls. In a shopping site, the items chosen
by a customer must be stored as data is an example of stateful session bean.
2. Message Driven Bean: Like Session Bean, it contains the business logic but it
is invoked by passing message.
3. Entity Bean: It summarizes the state that can be remained in the database. It is
deprecated. Now, it is replaced with JPA (Java Persistent API). There are two
types of entity bean:
2. The beans rather than the clients contain the application’s business logic, the
client developer can focus on the presentation of the client. The client developer
does not have to code the pattern that executes business rules or access
databases. Due to this the clients are thinner which is a benefit that is particularly
important for clients that run on small devices.
3. Enterprise Java Beans are portable elements, the application assembler can
build new applications from the beans that already exists.