SEMINARIO DE PROGRAMACION WEB (TECNOLOGIA JAVA)

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

30 Ιουλ 2012 (πριν από 5 χρόνια και 1 μήνα)

322 εμφανίσεις


Architecture concept in software development


From the point of the Unified Process …


Physical architecture


Computational nodes distribution over the network


Software component
-
computational node mapping


Modern architecture concept…


Architectural design patterns


Separation of concerns


There is no way to represent the software architecture with
current tools (UP
-
UML)


Strong support from software producers:


Sun Microsystems
. JEE


BEA Systems,
Weblogic


IBM,
WebSphere


Netscape (Sun):
iPlanet


Orion


Oc4J Oracle 9IAS


And Strong support from the open source world!


www.apache.org

Development of the apache web server, the
most used in the world.


Jakarta.apache.org. Frameworks and support classes to
support server side web apps development over JEE.


www.jboss.org

EJB Container.


Model 1



Model 1.5



Model 2



Model 2X


Servlets/JSPs

MVC Model

Multichannel


The most primitive ones.


CGI Web apps.


Presentation, business and persistence responsibilities
mixed.


The user state is stored in the client PC and each
request is a complete transaction (Transaction Script)


Browser

Script
CGI

Database


Separation of responsabilities:


JSPs for the presentation logic (Navegability,
rendering, etc.)


Embedded Beans implement business and
persistence responsabilities.






Evolution of the 1.5 model


It incorporates the MVC pattern.


Controller: Navigability


Business and Persistence: Beans


Presentation: JSPs





Struts the reference implementation of the MVC
that apache provides to implement web apps.


http://www.apache.org/struts






Evolution of the model
2 to build multichannel
applications


Reference
implementation: STXX


http://stxx.sourceforg
e.net/


XML & XSLTs based
solutions




Scalability


Separation of Concerns


Portability


“Componentize” support services


User session management, entity caching


Design patterns use



Main characteristic of Web applications:


Possible fast increasing of the number of users.


It’s important:


Right “sizing” of the system


Adaptability of the system when the demand increases.



Options:


Horizontal scalability


Vertical scalability


Cluster of Servers



We clone the system and balance the load


System


Internet users

System


System


System


Balancer


Selects the target machine for the HTTP request based on
pre
-
configured algorithms (Round Robin, LRU, etc.)


So, the clone is selected randomly.


Problem: No warranty that different request from the same
user served by the same machine.
-
>

There is no session
maintenance in the server
-
>
determines the design!


Session must be managed by the developer explicitly by:


Cookies


Database


It’s HW
-
> It’s FAST!


They examine the request at HTTP level to
guarantee user session maintenance.


Different requests from the same user are
managed by the same server.


Slower then HW balancers


Cheap solutions


Ex., mod
mod_jk

for apache.


HW devices that examines the request at HTTP
level.


In the middle of the other ones.


Warranty of session maintenance.


Faster than SWB but slower than HWB.





We implement logic separation of layers in a way that
we can separate them physically.


We need a kind of
Middleware

to allow remote
invocation




Layer 1

Machine 1

Layer 2

Machine 1

Layer n

Machine 1

Complete System

Machine


Common in the commercial Application Servers
(Weblogic, WebSphere, iPlanet, etc.).


It can be defined as horizontal or vertical.


Distributes and scale the system transparently to user
and administrator.


Guarantees that regardless of which server process the
request, it will have access to the session of the user.
(Session replication)


Session replication

is costly and can decrease system
performance.




Base idea for the layer separation


Different responsibilities should not be managed by
the same class.


Current trend in web app.:


n
-
layers architecture


Based on the three layers model:


Presentation


Business


Persistence


Independence between layers





















presentation

business

persistence


3 layers architecture

JSPs, HTML,
presentation
logic

Business
processes and
logic.

Database
access
components


Brown model, n
-
layers



















presentation

business

persistence

JSPs, HTML,
presentation
logic

Business
processes and
logic.

Database
access
components


All around presentation logic
responsibilities:


Navigability


Input data validation


Output data formatting


Internationalization


Presentation composition.


Etc.




Business responsibilities or logic


It’s the result of the functional analysis:


The set of business rules obtained from the real
world analysis..


Must be independent of other layers




Anything related with persistence logic, like
operations:


insert


delete


update


searches


Etc.


Not always based on relational databases.




An application should be able to be
adapted to different physical deploying
environments.


The task of adapting to a new deploying
environments should be reduced to
configuration task.


Example: Customer that doesn't want to be
forced to use EJB components.



¿support or infrastructure services?: Domain
independent components


¿Breaking separation of layers?


Form the infrastructure layer


Ex.:


Log service


Pool JDBC


Configuration Service


Authorization service


Etc.




Very Delicate Aspect!


Entity caching in


Httpsession object


Application Context


Information expiration


Data refresh


System performance? We are using server
resources!



What is a design pattern?


GOF 94
Design Patterns


Moreover of being an standard solution, they
are a communication tool!


Gets software development faster


Turns maintenance easier.


Starting to be integrated in the CASE
tools(Rose, Together, etc.).








¿?




Dr. Daniel Fernández Lanvin

University of Oviedo