Road Map to JAVA With ASP and ASP.NET background

greasyservantInternet και Εφαρμογές Web

30 Ιουλ 2012 (πριν από 5 χρόνια και 21 μέρες)

252 εμφανίσεις


Road Map to JAVA

With ASP and ASP.NET background




Why J2EE?




Choices, Choices (well defined codes)



Did we say choices? (variety of platforms)



Can’t we just get along? (Standard API, such as ERP, CRM)



No smoke
-
filled back rooms


Introducing J2EE




JSP is
like ASP and ASP.NET



Java servlets


o

Java servlets are Java classes that run as an extension of web server like
IIS or the Apache web server. Most of HTTP requests are handled with
servlets or redirect them to other resources.

o

Like ISAPI filter or CGI
-
Bin p
rogramme in ASP or Like httphandler class
or CGI
-
Bin programme in ASP.NET




JavaServer Pages Technology


o

Like VbScript or Jscript in ASP and like .NET languages in ASP.NET but
JSP use Java language.

o

Like ASP contain some HTML codes and dynamic sections and
servlets
are like ISAPI filter and httphandler in .NET and JSP pages are like ASP
pages and ASP.NET




Web Servers and Application Servers


o

IIS runs asp pages that relay on Windows operation system, but with
JAVA A
pplication Servers like IBM WebS
phere any JS
P applications
could run over variety

of

operations.

o

Is
Separate, Pluggable Server Component

1.

Choices of web servers



Can convert ASP application to JAVA in stages not whole
application. Application Servers run over IIS to serve your
application.

2.

Choice of p
latforms



Write once, deploy over variety
of operating systems.



3.

Choice of
application servers vendors



Because industry
-
standard specifications define the Java
servlets and JavaServer pages technologies, you can write your
J2EE applicayion once and then de
ploy it to multiple
application
-
server environments such as WebSphere Express or
Apache Tomcat.


Model
-
View
-
Controller Architecture

J2EE was developed with particular structure
in mind called MVC (
M
odel
-
V
iew
-
C
ontroller)



Model:
set of data and business rule
s for application


Business Logic



The View:
The application’s user interface



The Controller:
definition of the way the application reacts to
user input


Application Logic


Advantages of MVC architecture



Nothing to force you but good reasons are:

1.

Makes t
he components more reusable and flexible.


J2EE components and MVC





JavaServer Faces



With ASP background:
The JSF specification provides the
runtime components that let J2EE tool vendors provide drag
-
and
-
drop capability for the development of Web
-
based

UIS.



WebSphere Studio 5.1.1




With ASP.NET background:




You've probably used Web Forms to develop the user interface and UI control logic for
ASP.NET applications.

The
JavaServer Faces
(JSF) specification provides the equivalent functionality in the worl
d of
J2EE programming.

Like Web Forms, JSF provides the runtime components that let tool vendors provide drag
-
and
-
drop capability for

the development of Web
-
based UIs. It also lets vendors develop custom components their
development tools can

use.

To see J
SF in action, take a look at the WebSphere Studio version 5.1.1 family of tools (see
Resources).

WebSphere Studio has a fully integrated tool called Page Designer that you can use to develop
HTML pages and

JSP pages visually with drag and drop. Page Design
er has implemented the JavaServer Faces
specification, and

when you use it you should see some familiar components, such as HTML forms, DataGrids, and
DataLists. You'll

also see the familiar "code behind" files (in the Java language) that contain the UI ev
ent
-
handling
code for a

particular page.

One of the nice features of the JSF environment is that it lets you group pages into logical tree
-
like structures. For

example, if you have a set of pages that comprise a multipage form, the JSF tree structure is id
eal
--

especially if a

user might take a different path through the pages based on previous input or on some user
characteristic. The

structure assigns a logical name to each page in the tree. You use these names in your event
-
handling code to

navigate thr
ough different branches, depending on particular runtime conditions.