1. web client
- protocol : http, https를 이용, web-tier와 연동
- sessionless, non-transactional
- contents format : html, xml
▶ type :
-> web browser 와 연동 (applet, browser plug-ins, ActiveX component ),
-> stand-alone app. : 보다 다양하고 interactive한 GUI 구성 가능 : swing
-> non-java client : 환경에 따른 specialized service 가능
예) EXCEL내에 포함된 VB client 와 jsp 의 연동 : xml 형태의 data 공유
2. ejb client
- protocol : rmi-iiop를 이용해 ejb-tier와 연동
- 다양한 middle-tier service(jndi, jms, jdbc..) 등의 활용 가능
- ejb container와 연결된 library 이용
- java app.
- jdbc transaction 이용 가능
- 사용자 인증 절차 거쳐야
- Provide a more flexible user interface
- handle complex data models : CAD schemas 를 조작하는 application ...
- Are transaction-capable : JTA 를 이용한 처리 가능
- require explicit deployment : internet 환경의 경우 부적절
- Require firewall reconfiguration : rmi-iiop 가 firewall 을 통과할 수 없다
- Tend to be more complex
▶ type :
-> java : application, signed and trusted applet
-> non-java : VB, C++..
-> com : VB + java script/perl
-> create an rmi-iiop proxy in the client
-> type libraries must be installed
-> IDispatch interface 를 이용해 method 호출 : JNI 를 이용 rmi-iiop proxy와 통신
-> j2ee security service 를 사용곤란
-> non-java client에서 ejb-tier로 transaction을 유지시킬 수 없다, JTA 사용못함
-> legacy 의 통합등의 이유로 사용
-> com : asp 를 이용 가능
3. eis client
- jdbc 를 이용 rdbms resource direct access
- connector 를 이용 non-rdbms resource direct access ( mainframe, ERP )
- directly access로 인한 security 문제 발생 가능
- UI 와 business logic 을 동시에 가지는 관계로 이들의 management 기능 역시 필요 : tend to be complex
예) db 내의 table을 관리하는 stand-alone eis client
-> 주기적으로 (한밤) 호출되어 실행
4. designing for multiple types of client
▶ MVC pattern
▶ Model : software abstraction of application data, business rules
-> can be shared across all clients
-> 각 client type 에 맞는 model object 의 개발 필요없슴
-> 각 client별로 서로 다른 authorization level 의 적용이 필요할 경우 "Security mediator object" 를 이용
- view : renders the contents of a model
-> client 별로 서로 다른 형태를 가질 수도 있다
-> 이들의 통합은 상당히 어렵다
-> finer grained level 일 경우 일정부분의 code 를 공유할 수도 있다
예) jsp tag 로 showOrder 라는 부분 구현 : 이를 shopping / administrator client 모두에게 사용
▶ controller : defines application behavior
-> interprets user gestures / model 에게 수행할 수 있도록 전달
-> view 의 선택
-> 단일 controller
예) bank application의 두가지 view : web-based interface and stand-alone desktop client
이들의 요청을 model 에게 전달하는 controller는 하나로 디자인 가능
-> view 에 종속적인 형태가 일반적 : redeploy 가 어려움
-> interpreting user gestures
-> user gestures
-> JFC event(button click...)
-> web-interface event(http get/post...)
-> message(asynchronous message의 생성)
-> reusable as possible
-> user gestures를 business event로 변환시키는 형태로 디자인
* business event : uni-form, view-neutral(중립적인) representation
예) http request 의 get/post 요청 을 business event로 변환시키는 class generate
=> RequestToEventTranslator class
-> client type의 변화나, 추가시 별도의 controller를 추가시킴으로서 가능
-> selecting the View
-> layered view selection component design
-> business event와 유사한 object 를 화면에 represent하는 component
-> view generator 정의
Web Tier
▶ web-based application
- to generate dynamic content customized to ther needs
- jsp, servlet, cgi
- type
-> simple web-based j2ee application
-> jsp + servlet
-> jsp + worker bean
-> complex transactional j2ee application
-> jsp + worker bean in conjunction with EB
▶ design goal
-> internationalization
-> localization
-> migration strategies from web-centric to ejb-centric application
▶ web application
-> html/xml document + web component(jsp/servlet) +
other resource(directory structure/WAR-web archive file)
-> central server에 위치하며 다양한 client에게 service
-> secure B-to-B application , electronic commerce web sites 에서 사용
▶ web container
-> web application이 동작하는 runtime environment
-> web server 내에서 동작
-> naming service, life cycle management 등의 서비스 제공
▶ web server
-> security, concurrency, transactions, swapping to secondary storage 등의 서비스 제공
-> ejb server 와 함께 동작
-> ejb server와 같은 머신내에 배치될 필요는 없으며 서로다른
web-container간의 communication 가능
1. Dynamic contents create
1) CGI
-> file system, dbms 같은 resource 접근시 server platform 종속적 : platform specific
-> process base : do not scale well
-> content + display logic : difficult to maintain
2) Servlet
-> viwed as applets that run on the server
-> servlet's output : html, xml, other content type..
-> different platform 에서 recompile 없이 사용 가능
-> jdbc 같은 api 사용 가능
-> extensible
-> controller servlet : secure controller로 확장될 수 있다
-> lightweight thread base
-> uniform api for maintaing session data : HttpSession
-> embeded html in print statements
-> look and feel 을 runtime시에 확인 가능
-> content, display 변경으로 인한 recompile 초래
-> generating binary data
-> generates a graph summarizing stock performance from data retrieved from a database
-> image 는 memory 내에 생성, updated every minute
-> servlet 에서 data generat -> display
-> save time, improve performance
-> extending a web server's functionality
-> jsp 파일을 servlet으로 parsing, compiling, loading 처리 등
3) JSP
-> declarative, presentation-centric method of developing servlets
-> rapidly develop servlets
-> content , display logic 의 분리
-> 재사용 가능한 component-based architecture
-> text-basec document : html + jsp tags + java code + other information
-> complex dynamic formatting of html : worker bean + custom tab 를 이용
-> web designer 의 작업을 분리시킴
-> automatically recompiled and reloaded into the web server
▶ servlet vs. jsp
-> servlet
-> complex logic processing
-> navigation paths between screens
-> access to enterprise data
-> formatting the data into an html response
-> jsp
-> 위의 기능 모두 가능
-> encapsulate complex tasks with custom tag/worker bean
-> 보통 잘 디자인된 web-component 의 경우 jsp + custom tag + worker bean 을 이용
-> servlet은 잘 사용되지 않음
2. web-component roles
▶ presentation component
-> generate html/xml response
-> produces binary data(such as image ) : 주로 servlet에서
-> personalizing the user interface
-> user 마다 customizing 가능한 banner를 만들려고 할때
-> presentation component templates (주로 jsp tag 이용)
-> taglib 정의
ex)
<%@ taglib uri="xxxx" prefix="j2ee" %>
<%@ include file="screenDefinitions.jsp" %>
<html><title>...
<j2ee:insert template="template" parameter="HtmlTitle" /></title>
<body>
<j2ee:insert template="template" parameter="htmlBanner" />
<j2ee:insert template="template" parameter="htmlBody" />
</body></html>
▶ front component
-> manage other components and handle http request
-> convert the request into a form that an application can understand
-> provide single entry point
-> security, application state, presentation uniform 등의 장점
-> easier to maintain
-> mvc 에서의 controller의 역할과 비슷한 기능 수행
3. web-application designs
1) Basic jsp and servlets
2) Modular components : jsp + workerBean + process request from form data
+ display personalized contents
3) ejb-centric application
- flexibility 증가
-> mvc architecture 의 도입
-> Model : EB
-> EJB controller 에게 전달된 data 변경 event에 의해 EB내의 데이타 modification
▶ View
-> 다양한 client view support
-> model 내의 data 를 display
-> VB client view, Swing view, web view
-> jsp 의 활용
-> model data 의 display 에 관련된 code만을 포함
-> HTML : banner, navigation bar
-> Locale-specific currency의 표현등
-> custom tag, worker bean 을 이용해 구현
-> worker bean
-> web-controller에게 등록
-> ejb-controller로부터 model data 변경 이벤트를 받는다
-> EB 에 연결, mirror/refresh data
-> read-only data
▶ controller
-> front component + request processor + web controller + ejb controller
-> 모든 http request를 받아들이는 controller
-> web-tier / ejb-tier 사이를 메우는 역할
-> http request 내의 posted data 를 받아들임
-> model data update event 로 convert
▶ front component
-> application url 의 통일
-> all http request를 적절하게 request processor에게 전달
▶ request processor
-> web application 과 http-based client와의 link
-> http request 를 event로 convert
▶ web controller
-> ejb controller 에게 event forwarding
-> update event 를 ejb controller로부터 받아 적절한
web-tier view worker bean에게 전달
▶ ejb controller
-> web controller 로부터 event를 받아들임
-> EB에게 event전달 : 변경시킴
-> user session 을 유지
-> web controller에게 updated model의 event를 return
-> 특정 client type에 독립적임
-> web client, application client 모두에게 적용 가능
4. Application Migration
- web-centric application -> EB
-> web portion 의 변경
-> front component + mvc architecture
-> EB의 생성 : model object 의 표현
-> application logic 을 EB내에 포함시킴
-> external resource communication 을 worker bean에서 EB로 이동
-> jsp 내의 display logic code 의 최소화
2001-04-08
|