Business Computing Lab Ahn, Younghoe 2003. 9. 6 WAF overview and Study guide WAF overview and Study guide.

Slides:



Advertisements
Similar presentations
3 Copyright © 2005, Oracle. All rights reserved. Designing J2EE Applications.
Advertisements

J2EE Architecture Overview
Apache Struts Technology
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
J2EE Design patterns Sharath Sahadevan August 8, 2002 St Louis Java SIG.
An architecture for webb applications, J2EE
Model-View-Controller ("MVC") This is a architectural design pattern for interactive applications. This design pattern organizes an interactive application.
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
Layers & Tiers Umair Javed Lec - 41.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
Java Server Faces Model/View/Controller Design Pattern for Web Development Slides adapted from “Core JavaServer Faces” by Geary and Horstmann and the J2EE.
Java Server Pages B.Ramamurthy. Java Server Pages Servlets are pure Java programs. They introduce dynamism into web pages by using programmatic content.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Apache Struts Technology A MVC Framework for Java Web Applications.
Overview of Design Patterns & The MVC Design Pattern Sapana Mehta.
Java Pet Store Application. Outline Introduction Introduction Information Layer Information Layer Application Layer Application Layer Infrastructure Layer.
Struts 2.0 an Overview ( )
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Lecture 2 - Struts ENTERPRISE JAVA. 2 Contents  Servlet Deployment  Servlet Filters  Model View Controllers  Struts  Dependency Injection.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
1 Introduction to JavaServerFaces & MyFaces Anudeep Jassal.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Java Server Pages Lecture July Java Server Pages Java Server Pages (JSPs) provide a way to separate the generation of dynamic content (java)
Java Petstore : A Case Study Rohit Nambiar July 2005.
SUN J2EE Architecture (Introduction, J2EE Patterns, Samples)
JBoss at Work JAW Motors Application Chapter 1-3 Jeff Schmitt October 9, 2006.
Java Server Pages A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format,
J2EE Structure & Definitions Catie Welsh CSE 432
CHEF II / Sakai Architecture. CHEF II Changes uPortal replaces Jetspeed –jsr 168 portlet, servlet compliant Spring replaces Turbine component framework.
Struts J2EE web application framework “ Model 2 ” Model View Controller Controller Servlet Key features XML metadata Struts taglib Simplified form validation.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Stanisław Osiński, 2002JSP – A technology for serving dynamic web content Java Server Pages™ A technology for serving dynamic web content Stanisław Osiński,
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
Fall CIS 764 Database Systems Design L8. Web ….
J2EE Overview Web Programming CSCI J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Chapter 7 Using Custom Tag Libraries and the JSP Standard Tag Library.
JSP Tag Libraries Lec Last Lecture Example We incorporated JavaBeans in “Course Outline” Example But still have to write java code inside java.jsp.
Fall 2007cs4201 Advanced Java Programming Umar Kalim Dept. of Communication Systems Engineering
How I spend my money Software architecture course Mohan, Maxim.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
J2EE Chris Hundersmarck Maria Baron Jeff Webb.  Java 2 Platform, Micro Edition (J2ME)  Java 2 Platform, Standard Edition (J2SE)  Java 2 Platform, Enterprise.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
NJIT 1 Apache Tomcat (Version 6.0) THETOPPERSWAY.COM.
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Java Server Pages. 2 Servlets The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Morpheus Server 2.0 정기교육 Version 목 차 Morpheus Server 2.0 SpringFramework API 개발 Morpheus Admin 실 습.
Apache Struts Technology A MVC Framework for Java Web Applications.
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 9 Case Study.
Unit 6-Chapter 2 Struts.
Design and Maintenance of Web Applications in J2EE
Introduction to Struts
The Model Layer What is Model?
Java Server Pages B.Ramamurthy.
JavaServer Faces: The Fundamentals
Enterprise Java Beans.
Struts BY: Tejashri Udavant..
Presentation transcript:

Business Computing Lab Ahn, Younghoe WAF overview and Study guide WAF overview and Study guide

2 Business Computing Since 2002J2EE BluePrint Seminar 2003 Contents Separation between framework and application Walk through PetStore application WAF Building-blocks WAF Study Best-practice Reference

3 Business Computing Since 2002J2EE BluePrint Seminar 2003 Separation between framework and application Framework 와 Application (application-specific code) 은 사용 목적이 다르다. Framework 와 application 의 관계 구분 FrameworkApplication 사용 목적 Application 개발을 용이하고, 아키텍처 반영을 유도 특정 도메인에서의 요구사항을 충족시키기 위함 사용자 Application 개발자 End user Framework Application General relationship WAF Application Component In Petstore

4 Business Computing Since 2002J2EE BluePrint Seminar 2003 Separation between framework and application Guidelines: –Package 를 이용한 구분 –Namespace 를 이용한 구분

5 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Walk through Scenario

6 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Visit the pet store web site

7 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Behind the scene –Request! –Container intercept the request  By configuration in web application deployment descriptor  EncodingFilter, SignOnFilter –Show the main screen  The request *.screen goes to Template servlet  Template JSP composes main screen Index.jsp main.screen ( populating.jsp )

8 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Behind the Scene(continued) banner sidebarbody mylist (optional) advicebanner(optional) banner

9 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Search an iguana item.jsp product.jsp category.jsp index.jsp in body section

10 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Behind the Scene –category.jsp, product.jsp, item.jsp –Using JSTL and EL

11 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Behind the Scene(continued) –item.jsp <jsp:useBean id="catalog" class="com.sun.j2ee.blueprints.catalog.client.CatalogHelper" scope="session" />

12 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Behind the Scene(continued) –item.jsp(continued) '> List Price: Your Price: '> Add to Cart

13 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Check out cart.do? action=purchase &itemId=EST-13

14 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Process the order –Generating the “cart.do” request –Generating the “order.do” request

15 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Process the order(continued) –Processing the “order.do” request order.do Main Servlet ‘ do ’ Request Processor delegate OrderHTML Action perform OrderEvent Petstore Component Manager reference via session Shopping WebController reference via context OrderEvent delegate OrderEJB Action delegate perform Shopping Controller EJB StateMachine

16 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Process the order(continued) –Processing the “order.do” request order.do Main Servlet Request Processor OrderHTML Action DefaultWeb Controller EJB Controller Local OrderEJB Action StateMachine OrderEventResponse doEnd Binding with Request OrderEventResponse

17 Business Computing Since 2002J2EE BluePrint Seminar 2003 Walk through PetStore application Process the order(continued) –Processing the “order.do” request order_complete.screen Main Servlet ScreenFlow Manager Taglib Template Servlet forwardToNextScreen forward.screen forward template.jsp OrderEventResponse Make client page

18 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Big picture by sun –deprecated?

19 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Reverse model on WAF Building-blocks –Loosely coupled

20 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks WAF Building-blocks Front Controller Servlet Filter request Template Service Request Processor Component Manager Web Controller EJB Controller State Machine Screen Flow Manager response

21 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Servlet Filter – 주요 역할  Request 나 Response 를 가로채서 반복적인 사전 / 사후 작업 Encapulation – 실제 소스 파일  Just place holder – 구현 방식 (WAF 의 확장 지점 )  javax.servlet.Filter 인터페이스를 구현  DD (Deployment Descriptor) 에 등록 – 관련 기술 및 패턴  Chain of Responsibility (in GoF Design Patterns)  Intercepting Filter (in Core J2EE Patterns)  Filter/FilterChain (in Servlet 2.3)

22 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Front Controller – 주요 역할  Request 처리를 위한 진입점 (‘ 콜 센터 ’)  실제 Request 를 처리와 화면 처리 사이의 중재자 역할 – 실제 소스 파일  MainServlet.java – 구현 방식 (WAF 의 확장 지점 )  No customization required  DD 에서 Request 유형에 맞춰 설정 (Servlet-mapping) – 관련 기술 및 패턴  Façade (in GoF Design Patterns)  Front Controller (in Core J2EE Patterns)

23 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Request Processor – 주요 역할  Request 처리 위한 알고리즘 Encapsulation  다수의 if 문을 제거하는 역할 – 실제 소스 파일  RequestProcessor.java – 구현 방식 (WAF 의 확장 지점 )  No customization required  MainServlet 과 tightly-coupled  url-mappings (URL to screen, HTML Action and Flow Handler)  event-mappings (Event to EJB Action) 정의 – 관련 기술 및 패턴  Strategy/Policy (in GoF Design Patterns)

24 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Web Controller – 주요 역할  HTML Action 처리  EJB-tier 와의 연결 지점 ( 처리 결과를 얻음 ) – 실제 소스 파일  WebController.java – 구현 방식 (WAF 의 확장 지점 )  WebController 인터페이스를 구현  WebKeys 인터페이스에 Fully qualified class name 등록  HTMLAction 을 구현하거나, HTMLActionSupport 를 확장한 HTML Action 정의  HTML Action 과 대응되는 Event 및 EventResponse 정의 – 관련 기술 및 패턴  Command (in GoF Design Patterns)

25 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks EJB Controller – 주요 역할  Web Controller 를 통해 받은 Event 를 처리  EJB 컴포넌트에 대한 Location 은 Service Location 컴포넌트 이용  내부적으로는 State Machine 이용 –Invoke event hander –EJBSessionFaçade 정보 관리 – 실제 소스 파일  EJBController Session bean  StateMachine.java – 구현 방식 (WAF 의 확장 지점 )  EJBController Session bean 을 확장한  WebKeys 인터페이스에 Fully qualified class name 등록  EJBAction 을 구현하거나, EJBActionSupport 를 확장한 EJB Action 정의 – 관련 기술 및 패턴  Visitor (in GoF Design Patterns)  Business Delegate (in Core J2EE Patterns)

26 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Component Manager – 주요 역할  Web-tier 와 EJB-tier 서비스에 대한 Location 서비스  내부적으로는 Service Locator 컴포넌트 이용  사용자 Session 에 대해 필요한 정보 관리 – 실제 소스 파일  ComponentManager.java – 구현 방식 (WAF 의 확장 지점 )  ComponentManager 인터페이스를 구현하거나 DefaultComponentManager 확장  WebKeys 인터페이스에 Fully qualified class name 등록 – 관련 기술 및 패턴  Service Locator (in Core J2EE Patterns)  HttpSessionListener (in Servlet 2.3)

27 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Screen Flow Manager – 주요 역할  Event 처리 이후의 화면을 결정하고, 다음 화면으로 향하게 함 – 실제 소스 파일  ScreenFlowManager.java, FlowHandler.java – 구현 방식 (WAF 의 확장 지점 )  ScreenFlowManager 는 변화 없음  WebKeys 인터페이스에 Fully qualified class name 등록  url-mappings 에 정의된 FlowHandler 인터페이스를 구현

28 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Buiding-blocks Template Service – 주요 역할  사용자에게 보여질 화면을 구성하고 보여줌  내부적으로는 DOM 처리와 Custom Tag 처리등을 hiding  사용자 Session 에 대해 필요한 정보 관리 – 실제 소스 파일  TemplateServlet.java – 구현 방식 (WAF 의 확장 지점 )  No customization required  DD 에서 Request 유형에 맞춰 설정 (Servlet-mapping)  Template 구성, 화면 정의 및 타일을 구성하는 jsp 작성 – 관련 기술 및 패턴  Composite View (in Core J2EE Patterns)  DOM Parsing (in J2SE 1.4)

29 Business Computing Since 2002J2EE BluePrint Seminar 2003 WAF Study Best-practice 기존에 작성된 문서를 숙지하자 – 기존의 ( 지적 ) 유산은 철저하게 활용할 수 있어야 한다. 하나의 처리 흐름을 타고 쭉 훑어보자 –“Separation of Concern” 주석을 달면서 코드를 묶어 보자 – 모든 코드에 주석을 달아보면서 작성자의 의도를 파악 –“ 행 -> 단락 -> 메소드 ” 순서로 의미를 파악 블록 단위로 추상화 하여 개념적으로 정리해 본다 패턴과의 매핑으로 개념을 더욱 견고하게 하자

30 Business Computing Since 2002J2EE BluePrint Seminar 2003 Reference Petstore-WAF by 안영회, August 22, 2003 Core J2EE Patterns GoF Design Patterns Online Catalog