DHTML,AJAX,JB, EJB By: Gaurav Srivastav.

Slides:



Advertisements
Similar presentations
Java Script Session1 INTRODUCTION.
Advertisements

An architecture for webb applications, J2EE
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Understanding and Managing WebSphere V5
UNIT-V The MVC architecture and Struts Framework.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Java Beans.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Introduction to J2EE Architecture Portions by Kunal Mehta.
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Components Components are specialized self contained Software entities that can be replicated, Customized and inserted into applications. Components come.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
EJB Enterprise Java Beans JAVA Enterprise Edition
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
National College of Science & Information Technology.
12. DISTRIBUTED WEB-BASED SYSTEMS Nov SUSMITHA KOTA KRANTHI KOYA LIANG YI.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Java Server Pages Can web pages be created specially for each user?
J2EE Platform Overview (Application Architecture)
Web-based Software Development - An introduction
Web Programming Language
Running a Forms Developer Application
Structure of a web application
Working in the Forms Developer Environment
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Chapter 5 Scripting Language
Working with Client-Side Scripting
Server Concepts Dr. Charles W. Kann.
Chapter 5 Scripting Language
Introduction to J2EE Architecture
AJAX.
VISUAL BASIC.
Client side & Server side scripting
Distributed System Using Java 2 Enterprise Edition (J2EE)
Understanding and Designing with EJB
Lecture 1: Multi-tier Architecture Overview
ISC440: Web Programming 2 AJAX
PHP.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Tonga Institute of Higher Education
Component-based Applications
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Understanding and Designing with EJB
Enterprise Java Beans.
PHP an introduction.
Web Servers (IIS and Apache)
Presentation transcript:

DHTML,AJAX,JB, EJB By: Gaurav Srivastav

DHTML Dynamic Hyper Text Mark-Up Language. One Basic Difference between HTML and DHTML is that HTML is used to create static webpages and DHTML is used for dynamic web pages. It is consists of HTML + CSS+ Java Script. HTML is simple but less interactive but DHTML is complex but more interactive.

AJAX Asynchronous Java Script. Not a new programming- Language but it’s a kind of web document which adopts some certain standards. It allows developer to exchange data between browser and server and updates part of web document without reloading the webpage. 1. Make User Request 2. XML http request is created. 3. Send http request 6. Processes the returned data 7. Update web document 4.Processes Http request 5. Create response and send data to browser. Request Response Server Browser

Example <html> <head> <title>array</title> <script type= "text/javascript"> function MyFun() { if(window.XMLHttpRequest) req= new XMLHttpRequest(); } else req= new ActiveXObject("Microsoft.req"); req.onreadysataechange=function() if(req.onreadysatae==4&&req.status==200) document.getElementById("myID").innerHTML=req.responseText; req.open("GET","newdata.txt",true); req.send(); </script> </head> <body> <button type="button" onclick="MyFun()">Change</button> </body> </html>

Explanation MyFun() XMLHttpRequest: used to exchange data and update data with server without reloading web page fully. ActiveXObject: for older browsers. req.onreadysataechange: when request sent to server , this event is triggered. Readystate: it holds the status of XMLHttpRequset. ReadyState = 4 request is finished and response is ready. Status=200 means ok. Open() and send(): used to send request to server. Difference b/w synchronous and asynchronous?

VB Script Scripting Language launched by Microsoft. Lightweight version of Visual Basic Programming. Used in ASP.net

Features of VBS It posses characteristics of Visual Basic. So various programming constructs can be used in it too as in VB. User interactions can be done using MsgBox and InputBox. It is used to create dynamic views to be visualized at internet explorer. Used for network and system administration. It support methods for executing scripts on remote machine. It support for the functionality for embedding Vbscript engine in other applications.

Example <html> <head> <title>VB Script</title> </head> <body> <script type= "text/VBScript"> document.write("Have Fun In VB-SCRIPT") </script> </body> </html>

Variables Variables are declared using Dim, Public and Private. Dim name// creates variable// name =“ABC” It holds the value or expression. It should not contain special characters like----- !@#$%^ . Only underscore is allowed (_).

Procedures and Function What is procedure & function?: Procedure Does not have a return type while a function can have a return type. For VBScript procedure can be written using Sub and End Sub. Function is declared using Function key-word.

Procedure <html> <head> <title>VB Script</title> <script type= "text/VBScript"> Sub MyProc(a,b) //procedure definition// c=a+b alert(c) End Sub </script> </head> <body> <center> MyProc 2,3 //call procedure// </center> </body> </html>

Function <html> <head> <title>VB Script</title> <script type= "text/VBScript"> Function MyFun(a,b)//definition of function// c=a+b MyFun=c//return value// End Function </script> </head> <body> <center> document.write("Sum is") document.write(MyFun(2,3))//call the function// </center> </body> </html>

Condition and Looping if else then Select

If..else..then <html> <head> <title>VB Script</title> <script type= "text/VBScript"> Function display t= hour(time) If t < 10 Then document.write("Good Morning") Elseif t = 12 Then document.write("Good Afternoon") Else document.write("Good Evening") End If End Function </script> </head> <body onload="display()"> </body> </html>

Select <html> <head> <title>VB Script</title> <script type= "text/VBScript"> m=Month(date) Select Case m Case 1 document.write("Jan") Case 2 document.write("Feb") Case 3 document.write("Mar") Case 4 document.write("Apr") Case 5 document.write("May") Case 6 document.write("June") Case 7 document.write("Jul") Case 8 document.write("Aug") Case 9 document.write("Sept") Case 10 document.write("Oct") Case 11 document.write("Nov") Case 12 document.write("Dec") End Select </script> </head> </body> </html>

Looping Loop is a block of statements which executes repeatedly. In VBScript there are 4 types of loops For…..Next For Each….Next Do…..Loop Statement While

Do…While <html> <head> <title>VB Script</title> <script type= "text/VBScript"> i=100 Do While i>10 document.write("<br/>") document.write(i) i=i-10 Loop </script> </head> </body> </html>

Array <html> <body> <script type= "text/VBScript"> Dim a(5) document.write("<h3> Storing elements in an arrary</h3>") For i = 0 to 5 a(i)=i Next document.write("<h3> Retriving elements in an arrary</h3>") document.write("</br>"&a(i)) </script> </body> </html>

Java Bean It is programming component written in Java. It can be embedded with Jscript. It developed using a tool called as bean development kit(BDK). With JB API we can create reusable platform independent components.

Advantages A Bean obtains all the benefits of Java's "write-once, run-anywhere" paradigm.  The properties, events, and methods of a Bean that are exposed to an application builder tool can be controlled. A Bean may be designed to operate correctly in different locales, which makes it useful in global markets. Auxiliary software can be provided to help a person configure a Bean. This software is only needed when the design-time parameters for that component are being set. It does not need to be included in the run-time environment. The configuration settings of a Bean can be saved in persistent storage and restored at a later time. A Bean may register to receive events from other objects and can generate events that are sent to other objects.

BDK Before Installing BDK it is required to have JDK on the system. After installing BDK , you will get a folder name Bean, go to sub directory of it i.e. bean-box.

Description There are 4 windows open when JB is started. Tool Box : Bean Box Properties-Bean Box Method tracer

JAR File JAR: Java Archive File When we create any Java Bean the BDK wants that created java bean must be packaged in a “.jar” file. In Jar file set of classes and related resources are placed together. e.g. if we create a bean for designing two graphical objects viz. circle and rectangle, then this bean program will have some control information about designing the desired object.

JAR File : Features These are used for installing the software. Digital signatures can be associated with various elements of Jar file. Hence authenticity of various elements can be verified. It can be compressed. Creating jar file: Command : jar option file name e.g. jar cf example.jar example.class jar cf example.jar example.mft example.class

Mainfest Files It denotes which component of Jar File is a java bean. We must specify the correct path for class file created by java bean. e.g. Name: sunw/demo/Mybean/Myimg.jpg Name: sunw/demo/Mybean/mybean.class Java-Bean: True

Properties Single Boolean Indexed

EJB - Enterprise Java Bean It is used to implement business logic. The complete Java Package i.e. J2EE application container contains those components those are ready to deploy the business logic and business data. These components are: Security Transaction Messaging Persistence Distributions Connectivity

EJB COMPONENTS Client Entity Bean EJB Container EJB Server Use full in making distributed java components, that will be use full in server side programming. psvm Server{ psvm Container{ EJB Component }

Feature It provides a component framework that can be deployed over the server as a plugin. Plugin has its own built- in feature and has to just deploy and use. EJB is a managed component. It can be created, controlled and managed. There may be a number of instances of EJB, these are contained in J2EE container. These instances provide services to various clients. After using that instance client returns that to the instance pool. It keeps separate data base to EJB processing.

3-tier architecture of EJB Processing JSP Servlet Web Browser Database http request JDBC Driver Connection EJB J2EE server 3-tier architecture of EJB Processing

Java Bean Vs EJB JB EJB May or may not visible to user Invisible to user Run locally Runs on distributed Used as Activex Control. Can’t use as Activex. It is described with bean info, properties and customizers. Described with DeploymentDescripter

Types of EJB Entity Session Message Driven Bean Managed Container Managed Session State-full Stateless Message Driven

Entity Bean It represents data. e.g. it can used to represent a bank account or a customer. It basically used to show real world data. It acts as a persistent unit of the database.

Bean Managed Persistent It is a entity bean. It is used to save the bean’s state. Container does not need to make any call from database.

Container Bean It is used to save the persistence of entity bean. Basically Container is responsible for saving the state of a bean. It is independent of data source.

Session Bean It used to maintain a session. It basically represents an activity. So these are transient because activity exits after short period of time. It has does not represents the database but it can access resources of databases. It is always client specific.

State-full It stores internal state of EJB. There is only one state-full session bean per EJB client. It can be saved across the session.

Stateless Simple and light-weighted. Brings scalability to server performance. It is not associated to any client when they are needed they provide there services.

Message Driven Similar to session bean but activates only when asynchronous message is arrived. It does not retain any data and client.

Uses Of EJB Development of e-commerce application. For web-oriented application. For multiple number clients different instances of EJB can be used. EAI can use EJB for processing and mapping different application.

Java Bean API It provides set of classes and interfaces those are defined in the java.beans. EventStateDescriptor e.g. Classes: BeanDescriptor Interfaces: Bean BeanInfo Eventhandler AppletInitializer