3. The Enterprise
the term enterprise can simply refer to an
organization that has set out to accomplish
certain goals.
the term enterprise is typically used to refer
to a large organization
11. Enterprise Web Enabling:
Provides for the connectivity of the enterprise
to the Internet/Web, as well as for generating
Web-based presentation content
12. Enterprise Applications Enabling
Provides for the middle tier of application logic
management with the connectivity to legacy enterprise
application logic, the provision of new enterprise
application logic, connectivity to distributed enterprise
applications and embedded devices, and business-to-
business connectivity with commerce partners
16. Object-Oriented Software's Importance to the Enterprise
OO as a software-development paradigm is use
to build a successful and distributed enterprise
systems.
OO practices foster the development of
modular programs with encapsulated state and
implementation behavior, as well as facilitate
the abstraction of problems
17. The Object-Oriented Development Process
1. Project Charter
2. Requirements Analysis
3. Preliminary System Design
4. Detailed Design
5. Implementation
6. Unit Test
7. Assembly
8. Thread Test
9. Configuration Specification
10. System Test
11. Deployment
12. Maintenance:
19. Project Charter
A project charter is a written vision and
mission statement for a project that
summarizes the key goals and objectives to be
accomplished for a particular development
effort.
22. System Interface Analysis
Interfaces to your system and to software that
lie outside of the system boundary should also
be analyzed and modeled.
23. Preliminary System Design
Preliminary system design involves taking your
conceptual-analysis model and transforming it
into something that can be realized using COTS
or custom software
24. Detailed Design
The model packages handed to the developer
This enables developers to focus on a
cohesive component of the system to be
developed.
25. Implementation
After the core classes and their operation
signatures have been defined, the developer
can begin implementation using an OOP
technique and language
26. Unit Test
Unit testing involves testing software at the
class and package level.
Many times such tests are performed during
implementation of a particular class and
collection of classes
32. Maintenance
Maintenance involves repairing defects while
the system is deployed and in operation.
Maintenance also involves providing upgrades
to a fielded and operational system.
35. Classes:
Rectangular boxes represent classes.
Class Packages:
Packages to which classes belong are optionally indicated
beneath the class name, such as (from PackageName).
Packages:
Packages are shown as a rectangle with a small box in the upper-
left corner and have a package name displayed, such as
PackageName.
36. Class Attributes:
One or more attributes may be optionally shown below the class
name and package name
Class Operations
One or more operations may optionally be shown below the
attributes in a class. Some diagrams may choose to display only a
select set of operations
Associations:
A class such as ClassName that has an association with another
class such as Named Association Class depicts the association
as a straight line
37. Uses Relations:
When a class such as ClassName has a general dependency on
another class such as UsedClass, a dashed-line arrow depicting
the dependency is shown.
Inheritance:
When a SubClass inherits from a BaseClass, a solid
line with a triangle
Interfaces:
When an Interface Implementation implements a
particular InterfaceType, a dashed line with a triangle
40. Time:
Sequences in time proceed from top to bottom
Objects:
Object instances are represented by boxes at the top of the diagram.
Object Names:
An object-instance name can be followed by a class name inside of
an object box.
41. Methods:
Method calls are shown as arrows from the invoking object onto
the invoked object. Method calls may also be made by an object
onto itself.
Method Names:
Method names are displayed on method-call arrows, but may
simply be more descriptive words designating an action to invoke
on some concept or design entity in conceptual model diagrams.
Method Parameters:
Object parameters to such methods may also be optionally
displayed in method calls.
42. Component-Based Software
Development for the Enterprise
Enterprise Components
Component Models
Component-Based Development
Standards
43. Enterprise Components
class having object state and a set of
operations can encapsulate a singular
concept, a component represents a particular
service as a function of one or more such
concepts.
47. component may itself be application-specific
code, it will utilize the services it provides.
Finally, the container represents an environment in
which a component operate
53. Enterprise User Interfacing:
Web-based Java applets and desktop Java application clients can
be built using Java-based GUI techniques and can be hosted in
standalone J2SE environments.
54. Enterprise Data Enabling
The Java Database Connectivity (JDBC) solution is used to
communicate with databases. J2EE Web, EJB application, and
application client containers all utilize the JDBC API
55. Distributed Enterprise Communications Enabling:
Technologies for distributed communications such as CORBA,
RMI, DCOM, TCP/IP, and Web-based HTTP are all possible within
Java enterprise environments, whether they're embedded in Web
servers, application servers, standalone Java applications, or
enterprise user interface clients.
56. Common Services for Distributed Enterprise
Communications
Naming services enable the lookup of named objects across a
network.
Directory services allow for more sophisticated searching of
objects via attribute descriptions of those network objects.
Trading services offer a more dynamic means to connect with
services on a network.
57. Enterprise Systems Assurance
Various properties of systems assurance such
as reliability, availability, maintainability, safety,
and security are more inherent properties of a
system as opposed to a distinct service.
58. Enterprise Web Enabling
Java Servlets and Java Server Pages are the
standard J2EE-based mechanisms for receiving
Web-based requests and for generating HTML-
or XML-based responses
61. JDBC
JDBC is used to java application program can
access the Database.
JDBC is an API for the
Java programming language that defines how a
client may access a database. It provides
methods for querying and updating data in a
database.
62. JDBC Architecture (cont.)
Application JDBC Driver
Java code calls JDBC library
JDBC loads a driver
Driver talks to a particular database
An application can work with several databases by
using all corresponding drivers
Ideal: can change database engines without changing
any application code (not always in practice)
63. Difference between JDBC and ODBC
ODBC is used for managing any kind of data
base and JDBC is specially created to support
the java programs.
Open Database Connectivity (ODBC) is
developed by Microsoft's
JDBC is developed by sun micro system.
64. JDBC Drivers
A JDBC driver is a software component
enabling a Java application to interact with a
database
Type I: “Bridge”
Type II: “Native”
Type III: “Middleware”
Type IV: “Pure”
65. JDBC Drivers (Fig.)
Type I ODBC
ODBC
“Bridge” Driver
Type II
JDBC CLI (.lib)
“Native”
Type III Middleware
“Middleware” Server
Type IV
“Pure”
66. Type I Drivers
Type1 drivers use a bridge technology to
connect a java client to an ODBC database
service.
Use bridging technology
Requires installation/configuration on client
machines
Not good for Web
e.g. ODBC Bridge
67. Type II Drivers
Use Native API drivers
The native API converts JDBC commands to
DBMS specific native calls.
Requires installation/configuration on client
machines
Used to leverage existing CLI libraries
68. Type III Drivers
Calls middleware server, usually on database
host
Very flexible -- allows access to multiple
databases using one driver
69. Type IV Drivers
100% Pure Java
Use Java networking libraries to talk directly to
database engines
Only disadvantage: need to download a new
driver for each database engine
e.g. Oracle, mSQL
71. Java.sql.DriverManager
A class that registers JDBC drivers and
supplies connection.
The most commonly used method is
DriverManager.getConnection()
72. Connection
A connection is an active link to the data base
through which a java program can read and
write data.
73. Statement
A statement is an an object that allows SQL
statement to be sent through a connection and
retrieve the resultset.
74. ResultSet
A table of data representing a database result
set, which is usually generated by executing a
statement that queries the database.
75. Steps to perform JDBC interaction
1.Establish a connection
2.Create JDBC Statements
3.Execute SQL Statements
4.GET ResultSet
5.Close connections
76. A Simple JDBC application
import java.sql.*;
public class jdbctest {
loadDriver
public static void main(String args[]){
getConnection
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver");
createStatement Connection con = DriverManager.getConnection
(“jdbc:odbc:DSN", "user", "passwd");
execute(SQL) Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery
Result handling ("select name, number from pcmtable where number < 2");
yes while(rs.next())
System.out.println(rs.getString(1) + " (" + rs.getInt(2) + ")");
More
results ? stmt.close()
con.close();
no
} catch(Exception e){
closeStatment
System.err.println(e);
closeConnection }}}
77. Statement Interface
This statement interface will have the following
three methods to process the SQL command
from the application.
1.executeQuery()
2.executeUpdate()
3.execute()
81. ReusltSet Interface
To retrieve record details the following methods are being used.
next(): used to move from row to row
first(): used to move first record in the data base
last(): used to move last record in the data base
previous(): used to move previous record in the data
base.
absolute(): Moves to the position n in the data base.
Relative(n): Move to the relative record from the present record.
To retrieve field information the following methods are being used.
getInt()
getDouble()
getString()
82. MULTI TIER APPLICATION
A multi-tier architecture is basically a client-
server architecture in which the application is
to be executed by more than one program.
In mutli tier architecture the middleware is
server to which the client submits some data
and then the server sends this input data to the
data base.
83. MULTI TIER ARCHITECTURE
Business logic tier Data base tier
Presentation tier
Request
Application Data
Client Data base
server
Response
84. Advanced JDBC
Scrollable Result Sets
Updateable Result Sets
Batch Updates
Advanced Data Types
Stored Procedures
Database Naming via JNDI
Connection Pools
Distributed Transactions
86. Scroll-insensitive
Scroll-sensitive result sets also allow one to
scroll forward and backward and allow for
absolute and relative positioning
87. Scroll-sensitive
Scroll-sensitive result sets also allow one to
scroll forward and backward and allow for
absolute and relative positioning
88. Creating Scrollable Result Sets
Connection connection = … // Get connection as usual
Statement statement =
connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE)
ResultSet rs = statement.executeQuery("SELECT * FROM CUSTOMER");
89. Updateable Result Sets
Updateable result sets in JDBC 2.0 now allow for the update of rows,
insertion of rows, and deletion of rows in a result set all through the
ResultSet interface itself, whereas JDBC 1.0 previously returned only
result sets that were read-only
Read-only
Updateable
90. Updating Rows
int columnIndexFirstName = resultSet.findColumn ("FIRST_NAME");
resultSet.updateString(columnIndexFirstName ,"Tony");
or
resultSet.updateString("FIRST_NAME","Tony");
92. Batch Updates
The JDBC 2.0 Core API has introduced a new feature that enables you to
create a batch of update commands associated with a statement and
subsequently submit the entire batch of commands to the database in a
single call.
93. Executing a Batch Update
connection.setAutoCommit(false);
Statement statement = this.getStatement();
try{
statement.addBatch("INSERT INTO STATE VALUES('VA', 'VIRGINIA')");
statement.addBatch("INSERT INTO STATE VALUES('MD', 'MARYLAND')");
int[] nResults = statement.executeBatch();
}
94. Advanced Data Types
BLOBs (binary large objects) represent a very large set of binary data
CLOBs (character large objects) represent a very large set of character data
95. Stored Procedures
Most databases provide a set of helper functions that database programmers can
use to operate on data while it is in the database versus retrieving it, computing
some result, and possibly updating the database with the new value.