KENNESAW STATE UNIVERSITY
COMPUTER SCIENCE AND COMPUTER
INFORMATION SYSTEMS DEPARTMENT
SYED SHUJAAT ALI
Web Technologies and DBMS: Implement an application that accesses a database over
the web through an application that acc
esses a database over the web through at least two
java & .net etc. Compare the two technologies used:
For my project
I am going to use JSP (Java Server Pages)
JDeveloper tool to
connect to Oracle Dat
abase and implement the application.
I will describe
y and Data Base Management
Then I will compare the Java
Server Pages and Active Server Pages
Internet is a world wide collection of interconnected computer networks.
World Wide Web
is a hypermedia based system that provides a simple means to explore
the information on the internet in a non sequential way.
Whereas in e
an place and pay for orders via the business’s web site and in e
there is complete integration of internet technology into the economic infrastructure of
Information on the web is stored in documents using HTML (Hyper Test
is the document formatting language used to design most web
and displayed by a web browser. The web browser exchanges information with a
web server using
Text Transfer Protocol)
. URL is a string of alphanumeric
at represents the location or address of a resource on the internet and how
that resource should be accessed.
An HTML document stored in a file is an example of a static web page, whereas
the content of a
web page is generated each time it is acc
essed. When the
documents to be published are dynamic, such as those resulting from queries t
databases, the hypertext needs
to be generated by the server. To achieve this, we can
write scripts that perform conversions from different data formats into HTM
L on the fly.
These scripts need to understand the queries performed by clients through HTML forms
and the results generated by the applications owning the data
DBMS. As a database
is dynamic, changing as users create, insert, update and delete data,
dynamic web pages is a much more appropriate approach.
In the web environment, the traditional two tier client server model has been
replaced by a three tier model, consisting of a user interface layer the client, a business
logic and data
processing layer the application server, and a DBMS the database server
distributed over different machines. The requirements for web
DBMS integration are
simplicity which was being provided by HTML but as scripting languages are being
HTML the original simplicity is disappearing. A compelling reason for
creating a web based version of a database application is that web clients
are mostly platform independent. But web browser vendors provide propriety features
and the bene
fits of this advantage are disappearing
Graphical User Interface
provided by vendors requires extensive programming and tend
to be platform dependent
and in many cases vendor specific. Whereas web browsers provide a common, easy to
use GUI that c
an be used to access many t
hings, including a database, o
are standardization, cross platform support, transparent network access, and scalable
deployment. The disadvantages are lack of reliability, poor security, cost, poor
functionality of HTML, statelessness, bandwidth,
The Oracle internet platform, comprising of Oracle internet application server
) and the Oracle DBMS is aimed
particularly at providing extensibility for
d environments. It is an n
tier architecture based on industry standards such as
HTTP, HTML/XML for web enablement
my project I will use the oracle database
new version 10g, which
oracle has come out with
. Here are some of its features:
grid strategy for IT using enterprise grid computing instead of islands of
, gives the advantage of coordinated use of many servers acting as one large
computer and capacity is reallocated and added quickly and economically where
In the three tier architecture
grid has the application server grid, database
grid, and the storage grid. These three grids are managed by the
provides workload management and high availability, automates provisioni
ng of grid
resources and monitors application
Instead of isolated applications,
responsive software architecture
which develops and manages reusable software services
to improve flexibility and productivity
and responds to changing requ
It unifies web and wireless access on a single framework, builds software from
reusable business services, and simplifies integration with a standards based platform.
Oracle application Server 10g provides integrated middleware platform
. The benefits of the grid
time based policies. It uses resource pooling,
provides failover support. There is no planned or
has the breadth and depth for strategic IT initiatives provides self service applications, e
commerce, enterprise portals, identity management, regulatory compliance, web
services, application integration, business process auto
mation, mobile and wireless
connectivity and business intelligence.
Scripting languages such as java script and VBscript can be used to extend both
the browser and the server. Scripting languages allow the creation of functions embedded
within HTML stand
ard programming logic such as loops, conditional statements, etc.
Newer approached to integrating the web and the DBMS are Common gateway interface,
HTTP cookies, extensions to the web server such as the
API and Microsoft’s
internet information se
rver API, Java and JDBC, SQLJ, servlets and Java Server Pages,
Microsoft’s web solution platform with active server pages (ASPs)
nd active X data
objects (ADO) and oracle’s internet platform.
The common gateway interface (CGI) is a specification for tra
information between a web server and a CGI script. It is a popular technique for
web server and a CGI script. It is a popular technique
for integrating databases into the web. Its advantages include simplicity
independence. Web server independence, and its wide acceptance. Disadvantages stem
from the fact that a new process is created for each invocation of the CGI script, which
can overload the web server during peak times.
An alternative approach t
o CGI is to
extend the web server, typified by the Netscape API provides server side java script
constructs for database connectivity. In this case java script is compiled into
and interpreted by the livewire pro server extension running in con
junction with the
server and accomplish many of the tasks usually associated with retrieving and
working with information from a database including connecting, and disconnecting from
the database, displaying the results of an SQL query and creatin
g updatable cursors for
inserting, deleting and modifying data.
Where as java is a simple, object
oriented, distributed, interpreted, robust, secure,
neutral, portable, high performance, multi
threaded, and dynamic language
Microsystems. Java applications are complied into
, which are
interpreted and executed by the java virtual machine. Java can be connected to an ODBC
complaint DBMS through among other mechanisms, JDBC or SQLJ.
JDeveloper is an amazing developme
nt environment. With the Oracle Application
Developer Framework (ADF), which includes
, BC4J and Struts, I will develop a
based Web application using this point and click, drag and drop
development tool. I will discuss:
How ADF allows you
to map a database object into an ADF Business Component
ADF Business component view objects
ADF Business Component Application Modules
ADF Data Bindings and control components
The Struts Controller
The Java Server Page
Oracle JDeveloper is a J2EE developme
nt environment whereas J2EE
based, runtime platform created by Sun Microsystems used
for developing, deploying, and managing multi
centric applications on an
wide scale. J2EE builds on the featur
es of J2SE and adds distributed
communication, threading control, scalable architecture, and transaction management.
J2EE is a competitor to the Microsoft .NET Framework.
It has end to end support for
modeling, developing, debugging, and deploying e
applications and Web
services. Oracle JDeveloper allows developers to build from scratch or by using a J2EE
framework. Whatever implementation is chosen, JDeveloper offers all the productivity
tools needed to get the job done.
productivity layer for J2EE developers.
It brings the power of J2EE to all developers.
simplifies building applications as a set of business services with Web, Wireless, and
Rich Client interfaces. ADF acceler
ates development with ready to use J2EE Design
Pattern implementations and metadata driven components that
otherwise have to
code, test, and debug by hand.
It bridges the usability gap with Case tools. It increases
productivity and the ease of use.
It has visual and declarative development.
has to be done
as there is more reuse.
he core of the Struts framework is a flexible control layer based on standard
technologies like java Servlets, JavaBeans,
, and XML, as well as
various Jakarta commons packages.
ures based on
the model 2 approach, a variation of the classic Model
paradigm. Struts provide
the controller component and default request dispatcher for
In addition, they provide
onents that can be utilized
enabled application to manage integration with data access and delivery to the
To create the application using JDeveloper these are the steps I
will go through:
From the oracle home go to JDeveloper and start
it. Right click on workspace in
navigator. Click on new
and name the workspace whatever
you wish ‘TermProject’. Use the default application template
Application workspace is created.
Model and view
2 new projects are automatically created under the model and
Create a diagram of Business Components: Right click on model and then click on
From the gallery, choose Bu
components Diagram and click ok.
Name your business component diagram as you
wish. Now you are
up your environment. Now it is time to
Create a persistent Business object: th
ese are entity objects,
persisting, caching and
table object and
Connecting to the database:
To connect to the database in the navig
Connections at the bottom tab. Right click on ‘Database’. Select new database
connection. Name the
specify a username and password to connect to.
Specify the connection parameters (i.e.
machine to connect to)
click test connection to test whether the connection has been established.
Drag and drop tables that are going to be used to
the application. In the
navigator, drill into the new connection’s tables. Drag and drop a
Editing the object: You can
business object by
Edit, add or
, turn on batch updates
authentication rules, publish
and subscribe events
a BC4J OR
business rules for
If you add
integrity established, JDeveloper
automatically picks up
on these relationships.
Create a view object: this object gathers and filters
. It can comprise of
Create the view object: in the business components diagram click view object, then
click in business
name the view (i.e. EmpView). It is empty
view (i.e. no entities to pull yet).
Place the Entity Objects: drag and
view object (i.e. EmpView). A 1:1 mapping is created
from the entity object by default (i
.e. all columns and all rows). Adding the related
tables will automatically create the join statement.
view object: you
the view object, add
additional entity objects
drop). Add or remove
query manually; add a where or order by clause.
Create an application module: the application
a service object that
a specific task (i.e.
Building the application module: In business components
business components to
(EmpModule). Have an empty module (
views to pull yet). Drag
and drop the
view (i.e. EmpView) into the module.
Editing the application module; You can edit the attributes of the application
module by double clicking it, just like the other objects. These
have been created: entity object, view object, and
application module, now it is time to create GUI application.
Diagram a Page Flow (Controller):
our View Controller
section of the MVC.
The controller (i.e
of web pages (view)
from their flow and actions. For creating the forward
the navigator. Then
page. Change the name from
‘page1’ (don’t remove the forward slash).
a struts action.
Struts/forward action icon on the
Dropping Business Components:
business service you
the model, we
the JSP. In the ‘Data Control Palette’,
(i.e. HTML table, input form
, graph, etc.)
Drag and drop
The Default JSP Page:
By dragging and
no navigation buttons e
(only submit) by default.
the ‘Data Control Palette’
under ‘operations’ you
navigation operations which can be
dragged and dropped onto the page.
Running the application: Back up to StrutsPageFlow di
action element was added. Right
action element and
choose run. The
fully functional: you can do insert, update and delete. It is
HTML based. It is easy to deploy
To add a List of
Deptno input field,
Deptno in the data control palette, select
drop as List of Values. Drop field in form.
LOV to this field and select the
UI model icon. Edit
model’s Deptno object
LOV source the DeptView, then choose the target EmpView. The
click adds and
Deptno to Deptno to join. To display attributes choose your LOV display
attributes then choose what ever fields you want to show in the LOV dro
It is easy to add a new page, add a new page
config diagram and
name it. Lets create it for read only table for simple display purposes.
Drag the submit button
the component palette
name equal to
the event: we set it in
‘event’ (event_listall). Now run the emp
jsp again, this
click on our
new button and
am going to compare the similarities and differences between JSP and
ASP. At first glance,
Pages (JSP) and Microsoft Active Server Pages (ASP)
technologies have many similarities. Both are designed to create interactive pages as part
of a Web
based application. To a degree, both enable developers to separate
programming logic from page design through the use of components that are called from
the page itself. And both provide an alternative to creating CGI scripts that makes page
d deployment easier and faster.
Pages technology and Microsoft Active Server Pages are similar in
many ways, there are also a number of differences that exist. And these differences are
just as significant as the similarities, and have fa
reaching implications for the
developers who use them as well as the organizations that adopt them as part of their
JSP Technology: An Open Approach
In many ways, the biggest difference between JSP
and ASP technologies li
es in the approach to the software design itself. JSP technology is
designed to be both platform and server independent, created with input from a broader
community of tool, server, and database vendors. In contrast, ASP is a Microsoft
technology that reli
es primarily on Microsoft technologies.
Platform and Server Independence
JSP technology adheres to the Write Once, Run
Anywhere philosophy of the Java architecture. Instead of being tied to a single platform
or vendor, JSP technology can run on any Web s
erver and is supported by a wide variety
of tools from multiple vendors.
Because it uses ActiveX controls for its components, ASP technology is basically
restricted to Microsoft Windows
based platforms. Offered primarily as a feature of
Microsoft IIS, ASP
technology does not work easily on a broader range of Web servers
because ActiveX objects are platform specific.
Although ASP technology is available on other platforms through third
products, to access components and interact with other serv
ices, the ActiveX objects must
be present on the selected platform. If not present, a bridge to a platform supporting them
Open Development Process, Open Source
Sun developed JSP technology using the Java
Community Process. Since 1995, Sun h
as used this open process to develop and revise
Java technology and specifications in cooperation with the international Java community.
Working with Sun in the JSP effort are authoring tool vendors (such as Macromedia),
container companies (such as Apache
and Netscape), end users, consultants, and others.
Going forward, Sun is licensing the latest versions of JSP and Java Servlet (JSP 1.1 and
Java Servlet 2.2) source code to Apache to be developed and released under the Apache
development process. Apache,
Sun, and a number of other companies and individuals
will openly develop a robust reference implementation (RI) that is freely available to any
company or individual.
The JSP application programming interface (API) has undoubtedly benefited
inue to benefit
from the input of this extended community. In contrast, ASP
technology is a specifically Microsoft initiative, developed in a proprietary process.
ASP works on Microsoft IIS or personal web
Microsoft windows plat form
SP works on any web server, including Apache, Netscape and IIS. As far as
platforms are concerned it works on most popular platforms including the Solaris
Operating Environment, Microsoft windows, Mac OS, Linux, and other UNIX platform
For a company selecting the components of
architecture, JSP technology provides a flexible, open choice that works with a wide
variety of vendors' tools and reflects industry input and collaboration.
Both ASP and JSP techn
ologies let developers separate content generation from layout by
accessing components from the page. ASP supports the COM model, while JSP
technology provides components based on
technology or JSP tags.
As noted previously, the differences outw
eigh the similarities.
Extensible JSP Tags
difference apparent to any page author is
the JSP tags
themselves. While both ASP and JSP use a combination of tags and scripting to create
dynamic Web pages, JSP technology enables developers to extend
the JSP tags available.
JSP developers can create custom tag libraries, so page authors can access more
functionality using XML
like tags and depend less on scripting. With custom tags,
developers can shield page authors from the complexities of page crea
tion logic and
extend key functions to a broader range of authors.
Developers will also notice the focus on reusability. The
, JavaBeans, or custom JSP tags are reusable
across platforms. An
Enterprise JavaBean component accessing legacy databases can
serve distributed systems on both UNIX and Microsoft Windows platforms. And the tag
extension capability of JSP technology gives developers an easy, XML
like interface for
sharing packaged functi
onality with page designers throughout the enterprise.
based model speeds application development because it enables
Build quick prototype applications using lightweight subcomponents, then
integrate additional functionality
as it becomes available
Leverage work done elsewhere in the organization and encapsulate it in a
JavaBean or Enterprise JavaBean component
The Java Advantage
JSP technology uses the Java language for scripting, while ASP
pages use Microsoft VBScript or JS
cript. The Java language is a mature, powerful, and
scalable programming language that provides many benefits over the Basic
scripting languages. For example, the Java language provides superior performance to the
interpreted VBScript or JScript lang
uages. Because they use Java technology and are
compiled into Java servlets, JSP pages provide a gateway to the entire suite of server
Java libraries for HTTP
The Java language makes the developer's job easier in other ways as well
. For example, it
helps protect against system crashes, while ASP applications on Windows NT systems
are susceptible to crashing. The Java language also helps in the area of memory
management by providing protection against memory leaks and hard
that can slow application deployment. Plus, JSP provides the robust exception handling
necessary for real
Applications using JSP technology are easier to maintain over time
ripting languages are fine for small applications, but do not scale well to manage
large, complex applications. Because the Java language is structured, it is easier to
build and maintain large, modular applications with it.
JSP technology's emphasis on co
mponents over scripting makes it easier to revise
content without affecting logic, or revise logic without changing content.
The Enterprise JavaBeans architecture encapsulates the enterprise logic, such as
database access, security, and transaction integri
ty, and isolates it from the application
Because JSP technology is an open, cross
platform architecture, Web servers,
platforms, and other components can be easily upgraded or switched without
based applications. This makes JSP suitab
le for real
applications, where constant change and growth is the norm.
I have described the basic structure of world wide web and how it can be
connected to different DBMSs using different technologies. I have gone over the
features of Oracle database and JDeveloper, and described how I am going to
implement my project using them. Then I have compared JSP and ASP technologies,
and shown that JSP is a far better technology than ASP.
Thomas Connolly & Carolyn Begg
, III Edition, 2002 .
Systems, A Practical Approach to Design, Implementation, and
America :Addison Wesley
Olivier Le Diouris,
Development Framework (ADF) Over
Proceedings of South
le Users Conference
World Wide Web (from
Sun Microsystems Inc.
July 4, 2004.
Shaun O ‘Brien
10g web application
Development with ADF and Struts
Proceedings of South East
Oracle Users Conference