review

Post on 01-Nov-2014

509 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

1

e-business Application Development

2

J2EE vs .Net

3

Benefits of J2EE

Simplified architecture and developmentƒ Variety of standard services, components, and clientsƒ Choices of toolsƒ Portabilityƒ Integration with existing information systems

Separation of Responsibilities

Scalability

Flexible security model

4

API AppletApplication

ClientWeb EJB

JDBC 2.0 N Y Y YJTA 1.0 N N Y YJNDI 1.2 N Y Y YServlet 2.3 N N Y NJSP 1.2 N N Y NEJB 2.0 N Y1 Y2 YRMI-IIOP 1.0 N Y Y YJMS 1.0x N Y Y YJavaMail 1.2 N N Y YJAF 1.0x N N Y Y

J2EE 1.3 Required Standard Extension APIs

1 Application clients can only make use of the enterprise bean client APIs.2 Servlets and JSP pages can only make use of the enterprise bean client APIs.

J2EE Technologies Summary

5

HTML documentƒ Embedded JSP specific tagsƒ Inline Java Code

On the server, JSP Page is parsed and compiled into a Java Servlet

WebSphere 5.0 fully supports JSP1.2

Server Side Component - JSP

6

Server-Side Components - Servlets

Servlets are Java classes that allow application logic to be embedded in HTTP request-response process.

J2EE 1.3 requires:ƒ Servlet 2.3 specification

7

J2EE Services: JDBC

Provides database-independent connectivity to a variety of data stores

J2EE 1.2 specifies:ƒ JDBC 2.0 Core APIs - Basic database servicesƒ JDBC 2.0 Extension APIs - Advanced functionality

Connection PoolingTransactional capabilities

Functionality provided by a combination of WebSphere and a compliant JDBC driver

8

Application Servers:Work with Web server to manage browser and Java based client sessionsSupport server-side business logic (Servlets/JavaServer Pages/EJBs)Connect to back end computing resources for data and transaction processing

Application server benefits:Simplify development and deployment of web-enabled e-business applicationsSupport connections to legacy data and applicationsDeliver a set of application deployment and management tools

Application Serving

Transaction Serving

Active Business Rules

Web Server

Business Applications

App Server

Client

Page Serving

User Interfac

e

Transactions

Application Servers

9

Model-View-Controller architecture

Reduce the programming effort required to build and maintain systems

Separate the application into 3 distinct layers

Controller - application flow

Model - business logic

View - the output

Models, Controllers, and the views are treated as separate entities

Changes can be made independently

Different people/skills can work independently

WebSphere Application ServerWebSphere Application Server

/JSP

Model 1

Model 2

11

Software

• HTTP Servers– Apache HTTP Server (Open Source)– IBM HTTP Server powered by Apache– Many others

• Some Application Servers– Jakata Apache (Open Source)

• Tomcat

– IBM WebSphere Application Server– BEA Weblogic– Sun iPlanet– And more

• Comparable MS support– IIS (Internet Information Services)

12

WebSphere Application Server - Express

• An offering from IBM that contains:– WebSphere Application Server– WebSphere Studio Site Developer– IBM Agent Controller

• Tools to build and deploy J2EE compliant applications

13

Site Developer ExpressApplication Server

Applicationserver- JSPs- Servlets

Web server-HTML-images

Webprojects

ExpressTestEnvironment

Develop

deploy

Data Access -DB2 -Oracle -SQL Server -Cloudscape

WebClient

WebSphere Application Server Express

Agent Controller

14

Perspectives

There is a perspective for each of the different roles in a development life cycle (some roles overlap)

Open different perspectives by ƒ Perspective>Open>Otherƒ Selecting Open Perspective Button

To switch between perspectives use: shortcut bar

A group of related views and editors is called a perspective

Configurable

15

Perspective/Project, What's the difference?

Projects - a grouping of resources

Perspectives-multiple views of assets in workbench providing tools to help with task

Perspectives are different ways of looking at the same project

16

Perspectives are made up of views

Display a view by selecting Perspective > Show Views

Views support:

ƒ Editors ƒ Provide alternative presentations or navigation of the

information A view might appear by itself, or stacked with other views in a tabbed notebook

Views can be floated by Selecting the blue bar at the top of the Tasks view and drag it on to the desktop.

Views

17

Web Application

• Defined in J2EE and Java servlet specification• Standardized format which is compatible between

multiple vendors• Contains:

– JavaServer Pages

– Servlets

– Applets

– HTML and XML files

– Meta information to connect elements• Deployment descriptor

18

XML-based files describing the environment for modules and its componentsƒ Each module and ear file has a deployment descriptor

Can be automatically created and verified by WebSphere's deployment toolƒ Application Assembly Tool (AAT)

Can be manually created or edited

J2EE: Deployment Descriptor (DD)

19

Running the Application

• Need to create an application server

• Site Developer will create one for you– HTTP Server– Application Server

20

Site Developer ExpressApplication Server

Applicationserver- JSPs- Servlets

Web server-HTML-images

Webprojects

ExpressTestEnvironment

Develop

deploy

Data Access -DB2 -Oracle -SQL Server -Cloudscape

WebClient

WebSphere Application Server Express

Agent Controller

21

Web Pages

• Static– Constant information– Can only be changed by changing the html page

• Dynamic– Information changes – Database access– May be customized for individual end user

• Personalization

22

Creating an HTML Page

23

HTML Editor

24

Framesets

header.html

main.htmlmenu.htmltoggle

25

Frameset source

26

Setting attributes

27

Using tables

28

The completed table

29

Adding Links

30

Cascading Style Sheet

• A file that defines a hierarchical set of style rules that the creator of an HTML or XML file uses in order to control how that page is rendered in a browser or viewer, or how it is printed. 

• A CSS includes a defined order of precedence to address cases when the definitions of any style element in a document conflict. 

31

Cascading Style Sheets

32

Set Style Properties

33

WebArt Designer

34

Common Database Models

• Relational– Stores data in a database consisting of one or more

tables of rows and columns

• Object – Combine the elements of object orientation and

object-oriented programming languages with database capabilities

– Support additional data types (complex types)

35

Relational Model Concepts

36

SQL• Structured Query Language• Provides a standard language to access relational

databases• Works with most common database systems

– Microsoft Access, IBM DB2, Oracle, Informix, MS SQL Server

• SQL statements can be used to manipulate a database– Define a database– Define tables– Define columns and their characteristics

• SQL can be used to request rows from a database• SQL can be used to add, update and delete rows

37

Middleware

• A layer of software between your application and the database

• Provides a standard interface to any DBMS

• Examples:– ODBC – Open Database Connectivity

• Microsoft Products like Visual Basic

– JDBC – Java Database Connectivity• Java

38

Benefits of Middleware

• The same object code can be used to access different DMBS products

• The application is independent of the data communications protocol

• Data can be handled in a format convenient to the application

39

JDBC

• JDBC provides standard Java interfaces to access databases

• It is based on ODBC and supports a subset of what ODBC supports

• Database definition and manipulation is done using SQL statements

• JDBC is useful because it implements a standard interface

• It can theoretically work for accessing any database• A JDBC driver provides a database specific connection

40

Some JDBC Drivers

• JDBC Driver provides access to a specific database– COM.ibm.db2.jdbc.net.DB2Driver

• Driver from IBM for accessing DB/2 across a network

– COM.ibm.db2.jdbc.app.DB2Driver• Driver from IBM for accessing DB/2 locally

– sun.jdbc.odbc.JdbcOdbcDriver• Driver from Sun for accessing databases supported by ODBC

• ie, MS Access

– oracle.jdbc.driver.OracleDriver • Driver to access Oracle databases

top related