Java, J2EE, JSP, JDBC

thickbugΛογισμικό & κατασκευή λογ/κού

28 Οκτ 2013 (πριν από 3 χρόνια και 10 μήνες)

60 εμφανίσεις

Modern Software

Technologies

Java

, J2EE

, JSP

, JDBC


by Radoslav Tr. Ivanov
-

12835

Contents


Java


language



J2SE


& J2EE




Business Systems



J2EE


Platform




J2EE


components:


JSP



Servlets



JDBC
™ & EJB™


Web Servers for J2EE



Resources



1.
The Java


language


”... write once, run anywhere …”


History

1991 “Oak”
-

microprocessors

;


Necessity

of platform independence ;


Advantages


suitable for WEB


OOP
-
multi
-
platform, secure, simple and clear;


inheritance, polymorphism, classification


no need for garbage
-
collecting,


near to “C++” ;


Disadvantages



slow ;


A Java Program: From Birth to
Execution


1.
Coding
-
Human
-
readable Java code is produced by the programmer

2.
Building
-

A Java Development Tool "build"s the Java program into
byte
-
code
, which is saved as a "
.class
" file.

3.
Loading
-

Via the web or command line, the
class

file is sent to the
Java Virtual Machine (VM) with an attached digital signature. The
Java VM is simply an interpreter.

4.
Bytecode Verification
-

The Java VM verifies the digital signature.

5.
Isolation
-

When downloaded remotely, the Java VM isolates the
Java program in a restricted part of memory. The Java program is
not allowed to access local Hard drives and System resources.

6.
Internal Integrity
-

Verification checks are made to insure that the
loaded Java program is well formed. Data types are verified along
with other syntax structure

7.
Execution
-

Program execution begins



Java

, J2EE

, JSP

, JDBC


2.
J2SE


& J2EE


3.
Business Systems


Client




Server (DB)
2
-
tier ;


Client



Application Sever


Server
(DB)
3 tier ;


N
-
tier

;


4.
The Middle Tier



Business logic


Presentation logic

J2EE

Platform

5.
J2EE components:


Servlets

, JSP

, EJB

, JDBC


etc.

6.
Java Servlets.


Common with CGI ;


Life cycle of Servlets
-
init(), service(), destroy() ;


Advantages


good for Business logic;


Disadvantages


It’s not suitable for web design;


7.
J
ava
S
erver
P
ages



Advantages over ASP

, PHP

, Servlets


Life cycle


converted to Servlet;


Tags


<%
--


JSP comments

--
%>



1.

“<%! “
Declarations
” %>” ;

2.
“<% “Code” %>”
-

Scriptlets
;

3.
“<%= ‘dynamic expression’ %>”
-

Expressions
;

Example:


<HTML>Current time: <%=new java.util.Date()%”>
</HTML>

J
ava
S
erver
P
ages



Possible creating of new “<tags>”

1.
MyTags.tld


file of tags

Example: <%@ taglib=“path to MyTags.tld”%>


Suitable for locale independence


8.
EJB


& JDBC


Java Data Base Connectivity (API)
-
(driver)


implemented classes and
methods for managing Data Base (
Informix, MySQL, Oracle etc.)

EJB




Enterprise Java Beans




Example


shopping card

9.
Web Servers for
J2EE


Orion

http://
www.orionserver.com


Jakarta TomCat


http://
jakarta.apache.org/



Apache




http://
apache.org/




Resources

http://java.sun.com

http://java.sun.com/docs

http://www.javaworld.com

http://www.sun.com

http://
java.sun.com/j2ee

http://
java.sun.com/j2ee/tutorial

http://developer.java.sun.com/

http://www.javacoffeebreak.com/tutorials/