SCEA Step 2 - Goals Wrap Up

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

13 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

89 εμφανίσεις


1

Section 1: Application Design Concepts and Principles
................................
................................
.

2

Explain the main advantages of an object
-
oriented approach to system design

.........................

2

The major advantages of OOP:

................................
................................
...............................

2

1. Encapsulation

................................
................................
................................
......................

3

2. Inheritance
................................
................................
................................
...........................

3

3. Polymorphism

................................
................................
................................
.....................

3

Describe how the principle of "separation of concerns" has been applied to the main system
tiers of a Java
Platform, Enterprise Edition (Java EE) application.

................................
............

4

Figure 1
-

multi
-
tier Java EE applications divided into the tiers

................................
........

4

Java E
E Clients

................................
................................
................................
.......................

5

Web Clients

................................
................................
................................
.........................

5

Application Clients

................................
................................
................................
.............

6

Figure 2
-

vario
us elements that can make up the client tier

................................
..............

7

Web Components

................................
................................
................................
....................

7

Figure 3
-

the web tier

................................
................................
................................
.........

7

Business Components

................................
................................
................................
.............

7

Figure 4


Business components
................................
................................
.........................

8

Describe how the principle of "separation of co
ncerns" has been applied to the layers of a Java
EE application.

................................
................................
................................
..........................

10

Layers of a Java EE System

................................
................................
................................
..

10



Virtual platform (component APIs):

................................
................................
.........

10



Application infrastructure (container)

................................
................................
.......

10



Enterprise services (OS)

................................
................................
...........................

10



Compute and storage
................................
................................
................................
.

10



Networking infrastructure

................................
................................
.........................

10

Section 2: Common Architect
ures

................................
................................
................................

10

Explain the advantages and disadvantages of two
-
tier architectures

................................
........

10


2


Section 1: Application Design Concepts and
Principles


Explain the main advantages
of an object
-
oriented approach
to system design

(including the effect of encapsulation, inheritance, and
use of interfaces on architectural characteristics.)


The major advantages of OOP:


Simplicity
: software objects model real world objects, so the comp
lexity is reduced and the program
structure is very clear;



Modularity
: each object forms a separate entity whose internal workings are decoupled from other
parts of the system;



Modifiability
: it is easy to make minor changes in the data representation

or the

procedures in an OO
program. Changes inside a class do not affect any other part

of a program, since the only public interface
that the external world has to a class

is through the use of methods;



Extensibility
: adding new features or responding
to changing operating

environments can be solved
by introducing a few new objects and modifying

some existing ones;



Maintainability
: objects can be maintained separately, making locating and fixing problems easier;



Re
-
usability
: objects can be reused i
n different programs.


Like structured programming in legacy systems, object
-
oriented programming (OOP) is

used to manage
the complexity of software systems.


OOP technology provides several advantages. OOP applications are easier to maintain, have more
re
usable components, and are more scalable, to name a few.


Maintainable

OOP methods make code more maintainable
. Identifying the source of errors becomes easier because
objects are self
-
contained (
encapsulation
). The principles of good OOP design contribute to an
application's maintainability.


Reusable

because

objects contain both data and functions that act on data, objects can be thought of as self
-

3

contained "boxes" (
encapsulation
).

This feature makes it easy to reuse code in new systems. Messages
provide a predefined interface to an object's data and functionality. If you know this interface, you can
make use on an object i
n any context you want. OOP languages, such as C# and VB.Net, make it easy to
expand on the functionality of these "boxes" (
polymorphism

and

inheritance
), even if you don't know
much about their implementation (again,

encapsulation
).


Scalable

OO applications are more scalable then their str
uctured programming roots. As an object's
interface provides a roadmap for reusing the object in new software, it also provides you with all the
information you need to replace the object without affecting other code. This makes it easy to replace old
and
aging code with faster algorithms and newer technology.


http://codebetter.com/blogs/raymond.lewallen/archive/2005/02/08/50663.aspx


There are three major features i
n object
-
oriented programming:
encapsulation
,
inheritance

and
polymorphism
.

1.
Encapsulation

Encapsulation enforces modularity.

Encapsulation refers to the creation of self
-
contained modules that bind processing

functions to the data. These user
-
defined da
ta types are called "classes," and one

instance of a class is an "object.
Encapsulation ensures good code modularity
, which

keeps routines (i.e. methods) separate and less prone to conflict with each other
.

2.
Inheritance

Inheritance passes "knowledge" dow
n.

Classes are created in hierarchies, and inheritance allows the structure and methods

in one class to be passed down the hierarchy
. That means less programming is

required when adding functions to complex systems. If a step is added at the bottom

of a hi
erarchy, then only the processing and data associated with that unique step

needs to be added. Everything else about that step is inherited.
The ability to reuse

existing objects is considered a major advantage of object technology
.

3.
Polymorphism

Polymor
phism takes any shape.

Object
-
oriented programming allows procedures about objects to be created whose

exact type is not known until runtime
. For example, a screen cursor may change its

shape from an arrow to a line depending on the program mode. The routi
ne to move

the cursor on screen in response to mouse movement would be written for "cursor,"

and polymorphism allows that cursor to take on whatever shape is required at

runtime. It also allows new shapes to be easily integrated.


http://www.scribd.com/doc/25297376/J2EE
-
5
-
Architect
-
Exam
-
Study
-
Guide


4


Describe how the principle of "separation of concerns" has
been applied to the main system tiers of a Java Platform,
Enterpris
e Edition (Java EE) application.

(Tiers include client (both GUI and web), web (web container), business (EJB container), integration, and
resource tiers.)


A
tier

is vertical view of a system based on the separation of function on multiple

machines.


The

Java EE platform uses a distributed
multi
-
tier

application model for enterprise applications.

In the
following description, focus on how the application logic is divided into components

according to function,
and the various application components that ma
ke up a Java EE

application are installed on different
machines depending on the tier in the
multi
-
tier

Java EE

environment to which the application component
belongs.


Figure below shows
multi
-
tier

Java EE applications divided into the tiers described in
the

following list:



Figure 1
-

multi
-
tier

Java EE applications divided into the tiers



Client
-
tier components run on the client machine.



Web
-
tier components run on the Java EE server.


5



Business
-
tier components run on the Java EE server.



Enterprise inform
ation system

(EIS)
-
tier software runs on the EIS server.


Although a Java EE application can consist of the three or four tiers, Java EE
multi
-
tier

applications are generally considered to be three
-
tiered applications because they are

distributed over thre
e locations: client machines, the Java EE server machine, and the

database or legacy machines at the back end.
Three
-
tiered applications that run in this way

extend the standard two
-
tiered client and server model by placing a multithreaded application

serv
er between the client application and back
-
end storage
.


Java EE applications are made up of components
. A

Java EE component

is a self
-
contained

functional software unit that is assembled into a Java EE application with its related classes

and files and th
at communicates with other components
. The Java EE specification defines the

following Java EE components:




Application clients and applets are components that run on the client.



Java Servlet, JavaServer Faces, and JavaServer Pages (JSP) technology com
ponents

are web
components that run on the server.



Enterprise JavaBeans (EJB) components (enterprise beans) are business components

that run on the
server.


Java EE Clients

Web Clients

A Web Client consists of two parts:



Dynamic web pages containing vari
ous types of markup language (HTML,XML, and so on), which
are generated by web components running in the

web tier
.



Web browser, which renders the pages received from the server.


A Web Client is sometimes called a

thin client
. Thin clients usually do not q
uery

databases, execute
complex business rules, or connect to legacy applications. When

you use a thin client, such heavyweight
operations are off
-
loaded to enterprise beans

executing on the Java EE server, where they can leverage
the security, speed,

serv
ices, and reliability of Java EE server
-
side technologies.


A web page received from the web tier can include an embedded applet. An

apple
t

is a small client
application written in the Java programming language that executes

in the Java virtual machine ins
talled
in the web browser. However, client systems will

likely need the Java Plug
-
in and possibly a security
policy file for the applet to

successfully execute in the web browser.


Web components (Servlets, JSF or JSP) are the preferred API for creating a
web

client program because
no plug
-
ins or security policy files are needed on the client

systems. Also, web components enable
cleaner and more modular application design

because they provide a way to separate applications

6

programming from web page

design.
Personnel involved in web page design thus do not need to
understand Java

programming language syntax to do their jobs.


Application Clients

An application client runs on a client machine and provides a way for users to handle

tasks that require a
richer u
ser interface than can be provided by a markup

language. It typically has a graphical user
interface (GUI) created from the Swing or

the Abstract Window Toolkit (AWT) API, but a command
-
line
interface is certainly

possible.


Application clients directly ac
cess enterprise beans running in the business tier.

However, if application
requirements warrant it, an application client can open an

HTTP connection to establish communication
with a servlet running in the web tier.

Application clients written in languag
es other than Java can interact
with Java EE 5

servers, enabling the Java EE 5 platform to interoperate with legacy systems, clients,

and
non
-
Java languages.


Figure below shows the various elements that can make up the client tier.


The client communicate
s with the business tier running on the Java EE server either directly

or, as in the
case of a client running in a browser, by going through JSP pages or servlets

running in the web tier.


Your Java EE application uses a thin browser
-
based client or thick

application client. In deciding which
one to use, you should be aware of the trade
-
offs between

keeping functionality on the client and close to
the user (thick client) and off
-
loading as much

functionality as possible to the server (thin client). The
mor
e functionality you off
-
load to the

server, the easier it is to distribute, deploy, and manage the

application; however, keeping

more functionality on the client can make for a better perceived user
experience.



7

Figure 2
-

various elements that can make u
p the client tier

Web Components

Java EE web components are either servlets or pages created using JSP technology (JSP

pages) and/or JavaServer Faces technology. Servlets are Java programming language classes

that dynamically process requests and construct

responses. JSP pages are text
-
based

documents that execute as servlets but allow a more natural approach to creating static

content. JavaServer Faces technology builds on servlets and JSP technology and provides a

user interface component framework for we
b applications.


Figure 3
-

the web tier

Static HTML pages and applets are bundled with web components during application assembly

but are not considered web components by the Java EE specification. Server
-
side utility

classes can also be bundled with web

components and, like HTML pages, are not considered

web components.


As shown in figure below, the web tier, like the client tier, might include a JavaBeans

component to manage the user input and send that input to enterprise beans running in the

business

tier for processing.

Business Components

Business code, which is logic that solves or meets the needs of a particular business domain

such as banking, retail, or finance, is handled by enterprise beans running in the business tier.

Figure below shows how
an enterprise bean receives data from client programs, processes it

(if necessary), and sends it to the enterprise information system tier for storage. An enterprise

bean also retrieves data from storage, processes it (if necessary), and sends it back to t
he

client program.


8


Figure 4


Business components

The enterprise information system (EIS) tier handles EIS software and includes enterprise

infrastructure
systems such as enterprise resource planning (ERP), mainframe transaction

processing, database
syst
ems, and other legacy information systems. For example, Java EE

application components might
need access to enterprise information systems for database

connectivity.


Another view on tiers

We view the system in terms of
tiers
. A tier is a logical partition

of the separation of concerns in the
system. Each tier is assigned its unique responsibility in the system. We view each tier as logically
separated from one another. Each tier is loosely coupled with the adjacent tier. We represent the whole
system as a
stack of tiers. See Figure 5.1.



9


Figure 5.1
Tiered approach


Client Tier

This tier represents all device or system clients accessing the system or the application. A client can be a
Web browser, a Java or other application, a Java applet, a WAP phone, a
network application, or some
device introduced in the future. It could even be a batch process.


Presentation Tier

This tier encapsulates all presentation logic required to service the clients that access the system. The
presentation tier intercepts the cl
ient requests, provides single sign
-
on, conducts session management,
controls access to business services, constructs the responses, and delivers the responses to the client.
Servlets and JSP reside in this tier. Note that servlets and JSP are not themselv
es UI elements, but they
produce UI elements.


Business Tier

This tier provides the business services required by the application clients. The tier contains the business
data and business logic. Typically, most business processing for the application is ce
ntralized into this
tier. It is possible that, due to legacy systems, some business processing may occur in the resource tier.
Enterprise bean components are the usual and preferred solution for implementing the business objects
in the business tier.


Inte
gration Tier

This tier is responsible for communicating with external resources and systems such as data stores and
legacy applications. The business tier is coupled with the integration tier whenever the business objects
require data or services that resi
de in the resource tier. The components in this tier can use JDBC, J2EE
connector technology, or some proprietary middleware to work with the resource tier.



10

Resource Tier

This is the tier that contains the business data and external resources such as main
frames and legacy
systems, business
-
to
-
business (B2B) integration systems, and services such as credit card authorization.

Describe how the principle of "separation of concerns" has
been applied to the layers of a Java EE application.

Layers include appli
cation, virtual platform (component APIs), application infrastructure (containers),
enterprise services (operating system and virtualization), compute and storage, and the networking
infrastructure layers.


A
layer

is a horizontal and virtual view of a sys
tem on which each layer is built on top of

its lower layer.


Layers of a Java EE System



Virtual platform (component APIs):

used to implement/support business logic. API
Components include: JavaBeans, Java Servlets, JavaServer Pages/Faces, Java Message
Serv
ice API, Java Transaction API, etc.



Application infrastructure (container)
: responsible for executing the application. Also
provides services like: security, transactions, JNDI, and other connectivities.



Enterprise services (OS)
: responsible for the execut
ion environment of the application
infrastructure. Provides computing time and access to (abstract) hardware.



Compute and storage
: the hardware or physical server. Provides computing power for the
OS.



Networking infrastructure
: responsible for networking s
ervices.

Section 2: Common Architectures


Explain the advantages and disadvantages of two
-
tier
architectures

when examined under the following topics: scalability, maintainability, reliability,
availability, extensibility, performance, manageability, and s
ecurity.



Two Tier Software Architectures

Two tier architectures consist of three components distributed in two tiers: client

(requester of services)
and server (provider of services). The three components are:




User System Interface (such as session, tex
t input, dialog, and display

management services)





Processing Management (such as process development, process enactment,

process
monitoring, and process resource services)


11





Database Management (such as data and file services)


The two tier design alloc
ates the user system interface exclusively to the client
. It places

database
management on the server and splits the processing management between

client and server, creating
two layers.


In general, the user system interface client invokes services from t
he database

management server. In
many two tier designs, most of the application portion of

processing is in the client environment. The
database management server usually

provides the portion of the processing related to accessing data
(often implemented
in

store procedures).
Clients commonly communicate with the server through SQL

statements or a call
-
level interface
. It should be noted that connectivity between tiers can

be dynamically
changed depending upon the user's request for data and services.


Two

tier software architectures are used extensively in non
-
time critical information processing where
management and operations of the system are not complex
. This

design is used frequently in decision
support systems where the transaction load is light.


Tw
o tier software architectures require minimal operator intervention
. The two tier

architecture works well
in relatively homogeneous environments with processing rules

(business rules) that do not change very
often and when workgroup size is expected to

be
fewer than 100 users, such as in small businesses.


Scalability

The most important limitation of the two
-
tier architecture is that it is not scalable,

because each client
requires its own database session. The two tier design will scale
-
up to service 100 u
sers on a network. It
appears that beyond this number of users,

the performance capacity is exceeded. This is because the
client and server

exchange "keep alive" messages continuously, even when no work is being done,

thereby saturating the network.


Imple
menting business logic in stored procedures can limit scalability because as

more application logic
is moved to the database management server, the need for

processing power grows. Each client uses
the server to execute some part of its

application code, a
nd this will ultimately reduce the number of users
that can be

accommodated.


12


The most important limitation of the two
-
tier architecture is that it is not scalable,

because each client
requires its own database session


Interoperability

The two tier archit
ecture limits interoperability by using stored procedures to implement complex
processing logic

(such as managing distributed database

integrity) because stored procedures are
normally implemented using a commercial

database management system's proprietary

language. This
means that to change or

interoperate with more than one type of database management system,
applications

may need to be rewritten. Moreover, database management system's proprietary

languages
are generally not as capable as standard program
ming languages in that

they do not provide a robust
programming environment with testing and debugging,

version control, and library management
capabilities.


System administration and configuration

Two tier architectures can be difficult to administer and

maintain because when

applications reside on the
client, every upgrade must be delivered, installed, and

tested on each client. The typical lack of uniformity
in the client configurations and

lack of control over subsequent configuration changes increase


administrative

workload.


Batch jobs

The two tiered architecture is not effective running batch programs
. The client is

typically tied up until the
batch job finishes, even if the job executes on the server;

thus, the

batch job and client users are
n
egati
vely affected.


Performance

Application performance can be expected to degrade rapidly when the number of

concurrent users
reaches a threshold between a few hundred and one thousand

users. This is true even for large database
servers. The chief reason is t
hat each

client requires its own connection and each connection requires
CPU and

memory. As the number of connections increases, the database performance

degrades.


Poor Logic Sharing: Traditional two
-
tier architectures keep business logic on the

client. W
hen logic is in
the client, it is usually more difficult to re
-
use logic

between applications and amongst tools.


Application Distribution: Application changes have to be distributed to each client.

When there are a large
number of users, this entails cons
iderable administrative

overhead.


Remote Usage: Remote users (e.g. customers), probably do not want to install

your application on their
clients
--

they would prefer "thin" clients where minimal

(or no) client software installation is required.



13

Database
Structure: other applications that access your database will become

dependent on the existing
database structure. This means that it is more difficult

to redesign the database since other applications
are intimate with the actual

database structure


Advant
ages of client server architecture:


Centralization
-

access, resources, and data security are controlled through the

server

Accessibility
-

server can be accessed remotely and across multiple platforms.


Ease of application development; simple to build an
d use.


Lower total costs than “mainframe legacy systems”.


Advantage is understandability and maintainability would be better

in

future business logic changes also
only business layer changes


Modified 2
-
tier Model

A common approach that is used to improv
e business logic reusability is to place the

business logic into
triggers or stored procedures on the database. Validations are

performed by calling an appropriate
database stored procedure. In addition, dependent

logic can be initiated by a trigger in the

database. For
example, the business logic might

dictate that whenever a requisition is updated to "approved", a
purchase order should

automatically be created. This business rule could be effectively implemented with
a

database trigger on the requisition
table.


The approach provides several advantages compared to the traditional 2
-
tier model:


Better Re
-
use
: The same logic (in stored procedures & triggers) can be initiated

from many client
applications and tools.


Better Data Integrity
: when validation lo
gic is unconditionally initiated in database

triggers (e.g. before
inserts and updates), then business integrity of the data can

be ensured.


Improved Performance for Complex Validations: When the business logic

requires many accesses back
-
and
-
forth to the

database to perform its

processing, network traffic is significantly reduced when the entire
validation is

encapsulated in a stored procedure.


Improved Security: Stored procedures can improve security since detailed

business logic is encapsulated
in a mo
re secure central server.


Reduced Distribution: Changes to business logic only need to be updated in the

database and do not
have to be distributed to all the clients.



14

The modified 2
-
tier approach addresses some of the concerns with the traditional

2
-
tier model but it still
suffers from inherent 2
-
tier drawbacks. The most notable

continued drawback is scalability which is
addressed by the 3
-
tier model.


Performance: Adequate performance for low to medium volume environments