SlideShare a Scribd company logo
Unit 7: Design Patterns and Frameworks
 “A framework is a defined support structure in which another
    software project can be organized and developed. A framework may
    include support programs, code libraries, a scripting language, or
    other software to help develop and glue together the different
    components of a software project” (from Wikipedia)

 Here we are going to consider 3 MVC-based Web frameworks for
    Java:
          Struts 1
      

          Spring MVC
      

          JavaServer Faces
      




dsbw 2008/2009 2q                                                   1
Struts 1: Overview




dsbw 2008/2009 2q    2
dsbw 2008/2009 2q   3
dsbw 2008/2009 2q   4
Struts 1: Terminology wrt. J2EE Core Patterns

                       Struts 1        J2EE Core Patterns
                    Implementation            Concept

           ActionServlet             Front Controller

           RequestProcessor          Application Controller

           UserAction                Businesss Helper

           ActionMapping             View Mapper

           ActionForward             View Handle




dsbw 2008/2009 2q                                             5
Struts 1: Example - Wall’s New User




dsbw 2008/2009 2q                     6
Struts 1: Example – wall_register.vm (Velocity template)
<html><head> .... </head>
<body>
…
<form action = “register.doquot; method=quot;postquot;>
    User’s Nickname:
    <input name=“usernamequot; value=quot;$!registrationForm.usernamequot;
       size=40> $!errors.wrongUsername.get(0)
    Password :
    <input name=“userpassword“ size=40> $!errors.wrongPassword.get(0)

      <!–- CAPTCHA CODE -->

     <input type=quot;submitquot; name=quot;insertquot; value=“insertquot;>
</form>

<center>$!errors.regDuplicate.get(0)</center>

</body></html>


dsbw 2008/2009 2q                                                   7
Struts 1: Example – Form validation




dsbw 2008/2009 2q                     8
Struts 1: Example - RegistrationForm
public class RegistrationForm extends ActionForm
{
   protected String username;
    // ... The remaining form attributes + getter & setter methods

    public void reset(ActionMapping mapping,
                         HttpServletRequest request) {
     /* ... Attribute initialization */ }


    public ActionErrors validate(ActionMapping mapping,
             HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      if (username== null || username.equals(quot;quot;)) {
        errors.add(“wrongUsernamequot;,
                new ActionMessage(quot;errors.username”));
      }
       // .... Remaining validations
       return errors; }
}

dsbw 2008/2009 2q                                                    9
Struts 1: Example – Error Messages (Message.properties file)

errors.username=(*) Username required

errors.password=(*) Password required

errors.regCAPTCHA=(*) Invalid CAPTCHA values

errors.duplicateUser = Username '{0}' is already taken by
    another user




dsbw 2008/2009 2q                                         10
Struts 1: Example – Application Error (duplicated username)




dsbw 2008/2009 2q                                             11
Struts 1: Example - UserAction
public class RegisterAction extends Action {
public ActionForward execute(ActionMapping mapping,
                     ActionForm form, HttpServletRequest request,
                     HttpServletResponse response)
{ String username = ((RegistrationForm) form).getUsername();
   String password = ((RegistrationForm) form).getUserpassword();
   TransactionFactory txf = (TransactionFactory) request.
    aaaagetSession().getServletContext().getAttribute(quot;transactionFactoryquot;);
    try {
         Transaction trans = txf.newTransaction(quot;RegisterTransquot;);
         trans.getParameterMap().put(quot;usernamequot;, username);
         trans.getParameterMap().put(quot;passwordquot;, password);
         trans.execute();
         request.getSession().setAttribute(quot;userquot;,username);
         request.getSession().setAttribute(quot;userIDquot;,
                        trans.getParameterMap().get(quot;userIDquot;));
         return (mapping.findForward(quot;successquot;));
         }
dsbw 2008/2009 2q                                                        12
Struts 1: Example – UserAction (cont.)
    catch (BusinessException ex)
    {
      if (ex.getMessageList().elementAt(0).startsWith(quot;Usernamequot;))
         {
           ActionMessages errors = new ActionMessages();
           errors.add(quot;regDuplicatequot;,
               new ActionMessage(quot;errors.duplicateUserquot;,username));
           this.saveErrors(request, errors);
           form.reset(mapping,request);
           return (mapping.findForward(quot;duplicateUserquot;));
         }
       else {
         request.setAttribute(quot;theListquot;,ex.getMessageList());
         return (mapping.findForward(quot;failurequot;));
         }
    }
}
}
dsbw 2008/2009 2q                                               13
Struts 1: Example - struts-config.xml (fragment)
<action-mappings>
  <action path=quot;/registerquot;
        type=quot;wallFront.RegisterActionquot;
        name=quot;registrationFormquot;
        scope=quot;requestquot;
        validate=quot;truequot;
        input=quot;/wall_register.vmquot;>
       <forward name=quot;failurequot; path=quot;/error.vmquot;/>
       <forward name=quot;duplicateUser“
                path=quot;/wall_register.vmquot;/>
       <forward name=quot;successquot;
                path=quot;/wallquot; redirect=quot;truequot;/>
   </action>
…
</action-mappings>

dsbw 2008/2009 2q                                   14
Struts 1: Example - web.xml (fragment)
 <!-- Standard Action Servlet Configuration -->
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class> org.apache.struts.action.ActionServlet
     </servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
</servlet>

   <!-- Standard Action Servlet Mapping -->
   <servlet-mapping>
     <servlet-name>action</servlet-name>
     <url-pattern>*.do</url-pattern>
   </servlet-mapping>



dsbw 2008/2009 2q                                             15
Struts 1: Example - web.xml (fragment, cont.)
 <servlet>
    <servlet-name>velocity</servlet-name>
    <servlet-class>
        org.apache.velocity.tools.view.servlet.VelocityViewServlet
   </servlet-class>
    <init-param>
      <param-name>org.apache.velocity.toolbox</param-name>
      <param-value>/WEB-INF/toolbox.xml</param-value>
    </init-param>
    <init-param>
      <param-name>org.apache.velocity.properties</param-name>
      <param-value>/WEB-INF/velocity.properties</param-value>
    </init-param>
  </servlet>
 <servlet-mapping>
    <servlet-name>velocity</servlet-name>
    <url-pattern>*.vm</url-pattern>
  </servlet-mapping>
dsbw 2008/2009 2q                                              16
Struts 2
   Struts 1 + Webwork = Struts 2
   Struts 2 vs Struts 1 (according to struts.apache.org/2.x)
         Enhanced Results - Unlike ActionForwards, Struts 2 Results can actually help
          prepare the response.
         Enhanced Tags - Struts2 tags don't just output data, but provide stylesheet-
          driven markup, so that we consistent pages can be created with less code.
         POJO forms - No more ActionForms: we can use any JavaBean we like or put
          properties directly on our Action classes.
         POJO Actions - Any class can be used as an Action class. Even the interface is
          optional!
         First-class AJAX support - The AJAX theme gives interactive applications a
          boost.
          Easy-to-test Actions – Struts 2 Actions are HTTP independent and can be
      
          tested without resorting to mock objects.
         Intelligent Defaults - Most framework configuration elements have a default
          value that we can set and forget.


dsbw 2008/2009 2q                                                                        17
Struts 2: Tagging example
                    <s:actionerror/>
                    <s:form action=quot;Profile_updatequot; validate=quot;truequot;>
                    <s:textfield label=quot;Usernamequot;
                       name=quot;usernamequot;/>
                    <s:password label=quot;Passwordquot;
                       name=quot;passwordquot;/>
                    <s:password label=quot;(Repeat) Passwordquot;
                       name=quot;password2quot;/>
                    <s:textfield label=quot;Full Namequot; name=quot;fullNamequot;/>
                    <s:textfield label=quot;From Addressquot;
                       name=quot;fromAddressquot;/>
                    <s:textfield label=quot;Reply To Addressquot;
                       name=quot;replyToAddressquot;/>
                    <s:submit value=quot;Savequot; name=quot;Savequot;/>
                    <s:submit action=quot;Register_cancelquot;
                       value=quot;Cancelquot; name=quot;Cancelquot;
                       onclick=quot;form.onsubmit=nullquot;/> </s:form>



dsbw 2008/2009 2q                                                 18
Spring MVC
 Spring's own implementation of the Front Controller Pattern

 Flexible request mapping and handling

 Full forms support

 Supports several view technologies
         JSP/Tiles, Velocity, FreeMarker

 Support integration with other MVC frameworks
         Struts, Tapestry, JavaServerFaces, WebWork

 Provides a JSP Tag Library




dsbw 2008/2009 2q                                               19
Spring Framework Architecture

                                                                  Spring Web
                                     Spring ORM
                                                               WebApplicationContext
                                     Hibernate support
                                                                 Struts integration
                                                                                        Spring MVC
                                       iBatis support
                                                                 Tiles integration
           Spring AOP                   JDO support                                         Web MVC
                                                                   Web utilities
         AOP infrastructure                                                                Framework
          Metadata support                                                                 JSP support
        Declarative transaction                                                        Velocity/FreeMarker
                                                               Spring Context
                                     Spring DAO
            management                                                                       support
                                                                                       PFD/Excel support
                                  Transaction Infrastructure     ApplicationContext
                                       JDBC support              JNDI, EJB support
                                       DAO support                   Remoting




                                                    Spring Core
                                                      IoC Container




dsbw 2008/2009 2q                                                                                            20
Spring MVC: Request Lifecycle




dsbw 2008/2009 2q               21
Spring MVC: Terminology wrt. J2EE Core Patterns

                    Spring MVC      J2EE Core Patterns
                                          Concept

           DispatcherServlet     Front Controller /
                                 Application Controller

           HandlerMapping        Command Mapper

           ModelAndView          View Handle /
                                 Presentation Model

           ViewResolver          View Mapper

           Controller            Business Helper

dsbw 2008/2009 2q                                         22
Spring MVC: Setting Up
1. Add the Spring dispatcher servlet to the web.xml

2. Configure additional bean definition files in web.xml

3. Write Controller classes and configure them in a bean definition file,
     typically META-INF/<appl>-servlet.xml

4. Configure view resolvers that map view names to to views (JSP,
     Velocity etc.)

5. Write the JSPs or other views to render the UI




dsbw 2008/2009 2q                                                      23
Spring MVC: Controllers
public class ListCustomersController implements Controller {
   private CustomerService customerService;
   public void setCustomerService(CustomerService
                                  customerService)
   {    this.customerService = customerService; }

    public ModelAndView handleRequest(HttpServletRequest req,
                          HttpServletResponse res) throws Exception
    {
         return new ModelAndView(“customerList”, “customers”,

    customerService.getCustomers());
    }
}
 ModelAndView object is simply a combination of a named view and
    a Map of objects that are introduced into the request by the
    dispatcher

dsbw 2008/2009 2q                                                  24
Spring MVC: Controllers (cont.)
 Interface based
          Do not have to extend any base classes (as in Struts)
      

 Have option of extending helpful base classes
        Multi-Action Controllers
      
       Command Controllers
                Dynamic binding of request parameters to POJO (no
            

                ActionForms)
          Form Controllers
      
                Hooks into cycle for overriding binding, validation, and inserting
            

                reference data
                Validation (including support for Commons Validation)
            

                Wizard style controller
            




dsbw 2008/2009 2q                                                               25
JavaServer Faces (JSF)
 Sun’s “Official” Java-based Web application framework

 Specifications:
       JSF 1.0 (11-03-2004)
       JSF 1.1 (25-05-2004)
       JSF 1.2 (11-05-2006)
       JSF 2.0 (2009?)

 Main characteristics:
        UI component state management across requests
      
       Mechanism for wiring client-generated events to server side
        application code
       Allow custom UI components to be easily built and re-used
       A well-defined request processing lifecycle
       Designed to be tooled



dsbw 2008/2009 2q                                                     26
JSF: Application Architecture


                    Servlet Container
 Client
                    JSF Application
 Devices

                                        Business    DB
  Phone
                                         Objects
                    JSF Framework
   PDA
                                         Model
                                         Objects
 Laptop                                              EJB
                                                   Container




dsbw 2008/2009 2q                                         27
JSF framework: MVC

             Request                                Response



                                                      Model Objects
                                   Component
                    FacesServlet
                                     Tree           Managed JavaBeans

                                                                     View
                                   Resources            Delegates
                                    JavaBeans           Converters
  Config
                                   Property Files       Validators
                                       XML              Renderers


                     Action
                                   Business Objects
                    Handlers
 Controller                                 EJB          Model
                    & Event
                                            JDO
                    Listeners
                                           JDBC


dsbw 2008/2009 2q                                                      28
JSF: Request Processing Lifecycle

                                            Response Complete               Response Complete


            Restore
Request                  Apply Request         Process         Process            Process
           Component
                             Value              Events        Validations          Events
              Tree

                              Render Response

                       Response Complete                 Response Complete

Response    Render      Process           Invoke             Process          Update Model
           Response      Events          Application          Events             Values


                          Conversion Errors


                                                                Validation or
                                                                Conversion Errors




dsbw 2008/2009 2q                                                                       29
JSF: Request Processing Lifecycle
 Restore Component Tree:
          The requesting page’s component tree is retrieved/recreated.
      
         Stateful information about the page (if existed) is added to the request.

 Apply Request Value:
       Each component in the tree extracts its new value from the request
        parameters by using its decode method.
       If the conversion of the value fails, an error message associated with
        the component is generated and queued .
       If events have been queued during this phase, the JSF implementation
        broadcasts the events to interested listeners.

 Process Validations:
         The JSF implementation processes all validators registered on the
          components in the tree. It examines the component attributes that
          specify the rules for the validation and compares these rules to the local
          value stored for the component.


dsbw 2008/2009 2q                                                                30
JSF: Request Processing Lifecycle
 Update Model Values:
         The JSF implementation walks the component tree and set the
          corresponding model object properties to the components' local values.
         Only the bean properties pointed at by an input component's value
          attribute are updated

 Invoke Application:
         Action listeners and actions are invoked
         The Business Logic Tier may be called

 Render Response:
         Render the page and send it back to client




dsbw 2008/2009 2q                                                             31
JSF: Anatomy of a UI Component

                                       Event
                                                                Render
                                      Handling
             Model

                             binds                   has
                                           has

         Id            has                            has
                                                                 Validators
                                     UIComponent
    Local Value
   Attribute Map
                                                        has
                                          has

                         Child
                                                   Converters
                     UIComponent




dsbw 2008/2009 2q                                                             32
JSF: Standard UI Components
 UIInput
                         UICommand
 UIOutput
                         UIForm
 UISelectBoolean
                         UIColumn
 UISelectItem
                         UIData
 UISelectMany
                         UIPanel
 UISelectOne

 UISelectMany

 UIGraphic




dsbw 2008/2009 2q                     33
JSF: HTML Tag Library
 JSF Core Tag Library (prefix: f)
         Validator, Event Listeners, Converters


 JSF Standard Library (prefix: h)
         Express UI components in JSP




dsbw 2008/2009 2q                                  34
JSF: HTML Tag Library
<f:view>
<h:form id=”logonForm”>
  <h:panelGrid columns=”2”>
    <h:outputLabel for=”username”>
      <h:outputText value=”Username:”/>
    </h:outputLabel>
    <h:inputText id=”username” value=”#{logonBean.username}”/>
    <h:outputLabel for=”password”>
      <h:outputText value=”Password:”/>
    </h:outputLabel>
    <h:inputSecret id=”password”
         value=”#{logonBean.password}”/>
    <h:commandButton
         id=”submitButton” type=”SUBMIT”
        action=”#{logonBean.logon}”/>
    <h:commandButton
        id=”resetButton” type=”RESET”/>
  </h:panelGrid>
</h:form>
</f:view>



   dsbw 2008/2009 2q                                             35
JSF: Managed (Model) Bean
 Used to separate presentation from business logic

 Based on JavaBeans

 Similar to Struts ActionForm concept

 Can also be registered to handle events and conversion and
    validation functions

 UI Component binding example:


      <h:inputText id=”username”
         value=”#{logonBean.username}”/>




dsbw 2008/2009 2q                                              36
References
 Books:
         B. Siggelkow. Jakarta Struts Cookbook. O'Reilly, 2005
         J. Carnell, R. Harrop. Pro Jakarta Struts, 2nd Edition. Apress, 2004
         C. Walls, R. Breidenbach. Spring in Action. Manning, 2006.
         B. Dudney, J. Lehr, B. Willis, L. Mattingly. Mastering JavaServer
          Faces. Willey, 2004.

 Web sites:
         struts.apache.org
         rollerjm.free.fr/pro/Struts11.html
         www.springframework.org
         static.springframework.org/spring/docs/1.2.x/reference/mvc.html
         java.sun.com/javaee/javaserverfaces



dsbw 2008/2009 2q                                                             37

More Related Content

What's hot

Building High Performance Web Applications and Sites
Building High Performance Web Applications and SitesBuilding High Performance Web Applications and Sites
Building High Performance Web Applications and Sites
goodfriday
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
TrevorBurnham
 
JavaServer Faces Anti-Patterns and Pitfalls
JavaServer Faces Anti-Patterns and PitfallsJavaServer Faces Anti-Patterns and Pitfalls
JavaServer Faces Anti-Patterns and Pitfalls
Dennis Byrne
 
Sqladria 2009 SRC
Sqladria 2009 SRCSqladria 2009 SRC
Sqladria 2009 SRC
tepsum
 
GWT integration with Vaadin
GWT integration with VaadinGWT integration with Vaadin
GWT integration with Vaadin
Peter Lehto
 
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
Meetup django common_problems(1)
Meetup django common_problems(1)Meetup django common_problems(1)
Meetup django common_problems(1)
Eric Satterwhite
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS Directives
Christian Lilley
 
Library system project file
Library system project fileLibrary system project file
Library system project file
PrithwishBhattachary2
 
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
FalafelSoftware
 
Angular Directives from Scratch
Angular Directives from ScratchAngular Directives from Scratch
Angular Directives from Scratch
Christian Lilley
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩
GDG Korea
 
Java script
Java scriptJava script
Java script
vishal choudhary
 

What's hot (18)

Building High Performance Web Applications and Sites
Building High Performance Web Applications and SitesBuilding High Performance Web Applications and Sites
Building High Performance Web Applications and Sites
 
Headless Js Testing
Headless Js TestingHeadless Js Testing
Headless Js Testing
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
 
JavaServer Faces Anti-Patterns and Pitfalls
JavaServer Faces Anti-Patterns and PitfallsJavaServer Faces Anti-Patterns and Pitfalls
JavaServer Faces Anti-Patterns and Pitfalls
 
Sqladria 2009 SRC
Sqladria 2009 SRCSqladria 2009 SRC
Sqladria 2009 SRC
 
GWT integration with Vaadin
GWT integration with VaadinGWT integration with Vaadin
GWT integration with Vaadin
 
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Meetup django common_problems(1)
Meetup django common_problems(1)Meetup django common_problems(1)
Meetup django common_problems(1)
 
Bottom Up
Bottom UpBottom Up
Bottom Up
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS Directives
 
Ridingapachecamel
RidingapachecamelRidingapachecamel
Ridingapachecamel
 
Library system project file
Library system project fileLibrary system project file
Library system project file
 
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
 
Angular Directives from Scratch
Angular Directives from ScratchAngular Directives from Scratch
Angular Directives from Scratch
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩
 
Handlebars
HandlebarsHandlebars
Handlebars
 
Java script
Java scriptJava script
Java script
 

Viewers also liked

Costume and props
Costume and propsCostume and props
Costume and props
eviekASmedia
 
คุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอมคุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอม
Wuttipong Tubkrathok
 
Genre analysis
Genre analysisGenre analysis
Genre analysis
eviekASmedia
 
บทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกบทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
Chacrit Sitdhiwej
 
Mercado bursátil
Mercado bursátilMercado bursátil
Mercado bursátil
Marisol Garcia
 
Adding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software ModelsAdding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software Models
Tanja Mayerhofer
 
Target audience
Target audienceTarget audience
Target audience
eviekASmedia
 
[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp Security[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp SecurityCarles Farré
 
Proost NV
Proost NVProost NV
Proost NV
ProostNV
 
E4 e mtd - webinar kit - webinar-presentation
E4 e   mtd - webinar kit - webinar-presentationE4 e   mtd - webinar kit - webinar-presentation
E4 e mtd - webinar kit - webinar-presentation
AIMFirst
 
Hydro Energy By Sta Jafri
Hydro Energy By Sta JafriHydro Energy By Sta Jafri
Hydro Energy By Sta Jafri
IEEEP Karachi
 
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกบทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
Chacrit Sitdhiwej
 
Ratios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencialRatios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencial
Franz Ramirez
 
ทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติ
Wuttipong Tubkrathok
 
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICOFUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
aalcalar
 
The New UE Compression
The New UE CompressionThe New UE Compression
The New UE Compression
JoLynn Andrews
 
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
Chacrit Sitdhiwej
 
Las cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos yLas cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos y
Franz Ramirez
 
แผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงานแผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงาน
Wuttipong Tubkrathok
 
โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3
Wuttipong Tubkrathok
 

Viewers also liked (20)

Costume and props
Costume and propsCostume and props
Costume and props
 
คุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอมคุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอม
 
Genre analysis
Genre analysisGenre analysis
Genre analysis
 
บทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกบทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของประชาชนเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
 
Mercado bursátil
Mercado bursátilMercado bursátil
Mercado bursátil
 
Adding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software ModelsAdding Uncertainty and Units to Quantity Types in Software Models
Adding Uncertainty and Units to Quantity Types in Software Models
 
Target audience
Target audienceTarget audience
Target audience
 
[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp Security[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp Security
 
Proost NV
Proost NVProost NV
Proost NV
 
E4 e mtd - webinar kit - webinar-presentation
E4 e   mtd - webinar kit - webinar-presentationE4 e   mtd - webinar kit - webinar-presentation
E4 e mtd - webinar kit - webinar-presentation
 
Hydro Energy By Sta Jafri
Hydro Energy By Sta JafriHydro Energy By Sta Jafri
Hydro Energy By Sta Jafri
 
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกบทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
 
Ratios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencialRatios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencial
 
ทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติ
 
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICOFUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
 
The New UE Compression
The New UE CompressionThe New UE Compression
The New UE Compression
 
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
 
Las cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos yLas cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos y
 
แผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงานแผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงาน
 
โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3
 

Similar to [DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)

Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Matt Raible
 
Struts2
Struts2Struts2
Struts2
yuvalb
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
dasguptahirak
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
wiradikusuma
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0
Matt Raible
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
Ted Husted
 
Solr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsSolr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsWildan Maulana
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
Ignacio Coloma
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
Pamela Fox
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...Kirill Chebunin
 
Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
Yehuda Katz
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
General Principles of Web Security
General Principles of Web SecurityGeneral Principles of Web Security
General Principles of Web Security
jemond
 
Struts 2 + Spring
Struts 2 + SpringStruts 2 + Spring
Struts 2 + Spring
Bryan Hsueh
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
borkweb
 

Similar to [DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3) (20)

Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
 
Struts2
Struts2Struts2
Struts2
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Solr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsSolr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJs
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
 
My java file
My java fileMy java file
My java file
 
Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
General Principles of Web Security
General Principles of Web SecurityGeneral Principles of Web Security
General Principles of Web Security
 
Struts 2 + Spring
Struts 2 + SpringStruts 2 + Spring
Struts 2 + Spring
 
Os Leonard
Os LeonardOs Leonard
Os Leonard
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 

More from Carles Farré

Aplicacions i serveis web (ASW)
Aplicacions i serveis web (ASW)Aplicacions i serveis web (ASW)
Aplicacions i serveis web (ASW)
Carles Farré
 
DSBW Final Exam (Spring Sementer 2010)
DSBW Final Exam (Spring Sementer 2010)DSBW Final Exam (Spring Sementer 2010)
DSBW Final Exam (Spring Sementer 2010)Carles Farré
 
Web Usability (Slideshare Version)
Web Usability (Slideshare Version)Web Usability (Slideshare Version)
Web Usability (Slideshare Version)Carles Farré
 
[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond
Carles Farré
 
[DSBW Spring 2009] Unit 09: Web Testing
[DSBW Spring 2009] Unit 09: Web Testing[DSBW Spring 2009] Unit 09: Web Testing
[DSBW Spring 2009] Unit 09: Web TestingCarles Farré
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)Carles Farré
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)Carles Farré
 
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)Carles Farré
 
[DSBW Spring 2009] Unit 05: Web Architectures
[DSBW Spring 2009] Unit 05: Web Architectures[DSBW Spring 2009] Unit 05: Web Architectures
[DSBW Spring 2009] Unit 05: Web ArchitecturesCarles Farré
 
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX ModelCarles Farré
 
[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process ModelsCarles Farré
 
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)Carles Farré
 
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)Carles Farré
 
[DSBW Spring 2009] Unit 01: Introducing Web Engineering
[DSBW Spring 2009] Unit 01: Introducing Web Engineering[DSBW Spring 2009] Unit 01: Introducing Web Engineering
[DSBW Spring 2009] Unit 01: Introducing Web EngineeringCarles Farré
 
[ABDO] Data Integration
[ABDO] Data Integration[ABDO] Data Integration
[ABDO] Data IntegrationCarles Farré
 
[ABDO] Logic As A Database Language
[ABDO] Logic As A Database Language[ABDO] Logic As A Database Language
[ABDO] Logic As A Database LanguageCarles Farré
 

More from Carles Farré (16)

Aplicacions i serveis web (ASW)
Aplicacions i serveis web (ASW)Aplicacions i serveis web (ASW)
Aplicacions i serveis web (ASW)
 
DSBW Final Exam (Spring Sementer 2010)
DSBW Final Exam (Spring Sementer 2010)DSBW Final Exam (Spring Sementer 2010)
DSBW Final Exam (Spring Sementer 2010)
 
Web Usability (Slideshare Version)
Web Usability (Slideshare Version)Web Usability (Slideshare Version)
Web Usability (Slideshare Version)
 
[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond
 
[DSBW Spring 2009] Unit 09: Web Testing
[DSBW Spring 2009] Unit 09: Web Testing[DSBW Spring 2009] Unit 09: Web Testing
[DSBW Spring 2009] Unit 09: Web Testing
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
 
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
[DSBW Spring 2009] Unit 06: Conallen's Web Application Extension for UML (WAE2)
 
[DSBW Spring 2009] Unit 05: Web Architectures
[DSBW Spring 2009] Unit 05: Web Architectures[DSBW Spring 2009] Unit 05: Web Architectures
[DSBW Spring 2009] Unit 05: Web Architectures
 
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
[DSBW Spring 2009] Unit 04: From Requirements to the UX Model
 
[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models
 
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
 
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
 
[DSBW Spring 2009] Unit 01: Introducing Web Engineering
[DSBW Spring 2009] Unit 01: Introducing Web Engineering[DSBW Spring 2009] Unit 01: Introducing Web Engineering
[DSBW Spring 2009] Unit 01: Introducing Web Engineering
 
[ABDO] Data Integration
[ABDO] Data Integration[ABDO] Data Integration
[ABDO] Data Integration
 
[ABDO] Logic As A Database Language
[ABDO] Logic As A Database Language[ABDO] Logic As A Database Language
[ABDO] Logic As A Database Language
 

Recently uploaded

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)

  • 1. Unit 7: Design Patterns and Frameworks  “A framework is a defined support structure in which another software project can be organized and developed. A framework may include support programs, code libraries, a scripting language, or other software to help develop and glue together the different components of a software project” (from Wikipedia)  Here we are going to consider 3 MVC-based Web frameworks for Java: Struts 1  Spring MVC  JavaServer Faces  dsbw 2008/2009 2q 1
  • 2. Struts 1: Overview dsbw 2008/2009 2q 2
  • 5. Struts 1: Terminology wrt. J2EE Core Patterns Struts 1 J2EE Core Patterns Implementation Concept ActionServlet Front Controller RequestProcessor Application Controller UserAction Businesss Helper ActionMapping View Mapper ActionForward View Handle dsbw 2008/2009 2q 5
  • 6. Struts 1: Example - Wall’s New User dsbw 2008/2009 2q 6
  • 7. Struts 1: Example – wall_register.vm (Velocity template) <html><head> .... </head> <body> … <form action = “register.doquot; method=quot;postquot;> User’s Nickname: <input name=“usernamequot; value=quot;$!registrationForm.usernamequot; size=40> $!errors.wrongUsername.get(0) Password : <input name=“userpassword“ size=40> $!errors.wrongPassword.get(0) <!–- CAPTCHA CODE --> <input type=quot;submitquot; name=quot;insertquot; value=“insertquot;> </form> <center>$!errors.regDuplicate.get(0)</center> </body></html> dsbw 2008/2009 2q 7
  • 8. Struts 1: Example – Form validation dsbw 2008/2009 2q 8
  • 9. Struts 1: Example - RegistrationForm public class RegistrationForm extends ActionForm { protected String username; // ... The remaining form attributes + getter & setter methods public void reset(ActionMapping mapping, HttpServletRequest request) { /* ... Attribute initialization */ } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (username== null || username.equals(quot;quot;)) { errors.add(“wrongUsernamequot;, new ActionMessage(quot;errors.username”)); } // .... Remaining validations return errors; } } dsbw 2008/2009 2q 9
  • 10. Struts 1: Example – Error Messages (Message.properties file) errors.username=(*) Username required errors.password=(*) Password required errors.regCAPTCHA=(*) Invalid CAPTCHA values errors.duplicateUser = Username '{0}' is already taken by another user dsbw 2008/2009 2q 10
  • 11. Struts 1: Example – Application Error (duplicated username) dsbw 2008/2009 2q 11
  • 12. Struts 1: Example - UserAction public class RegisterAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String username = ((RegistrationForm) form).getUsername(); String password = ((RegistrationForm) form).getUserpassword(); TransactionFactory txf = (TransactionFactory) request. aaaagetSession().getServletContext().getAttribute(quot;transactionFactoryquot;); try { Transaction trans = txf.newTransaction(quot;RegisterTransquot;); trans.getParameterMap().put(quot;usernamequot;, username); trans.getParameterMap().put(quot;passwordquot;, password); trans.execute(); request.getSession().setAttribute(quot;userquot;,username); request.getSession().setAttribute(quot;userIDquot;, trans.getParameterMap().get(quot;userIDquot;)); return (mapping.findForward(quot;successquot;)); } dsbw 2008/2009 2q 12
  • 13. Struts 1: Example – UserAction (cont.) catch (BusinessException ex) { if (ex.getMessageList().elementAt(0).startsWith(quot;Usernamequot;)) { ActionMessages errors = new ActionMessages(); errors.add(quot;regDuplicatequot;, new ActionMessage(quot;errors.duplicateUserquot;,username)); this.saveErrors(request, errors); form.reset(mapping,request); return (mapping.findForward(quot;duplicateUserquot;)); } else { request.setAttribute(quot;theListquot;,ex.getMessageList()); return (mapping.findForward(quot;failurequot;)); } } } } dsbw 2008/2009 2q 13
  • 14. Struts 1: Example - struts-config.xml (fragment) <action-mappings> <action path=quot;/registerquot; type=quot;wallFront.RegisterActionquot; name=quot;registrationFormquot; scope=quot;requestquot; validate=quot;truequot; input=quot;/wall_register.vmquot;> <forward name=quot;failurequot; path=quot;/error.vmquot;/> <forward name=quot;duplicateUser“ path=quot;/wall_register.vmquot;/> <forward name=quot;successquot; path=quot;/wallquot; redirect=quot;truequot;/> </action> … </action-mappings> dsbw 2008/2009 2q 14
  • 15. Struts 1: Example - web.xml (fragment) <!-- Standard Action Servlet Configuration --> <servlet> <servlet-name>action</servlet-name> <servlet-class> org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> </servlet> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> dsbw 2008/2009 2q 15
  • 16. Struts 1: Example - web.xml (fragment, cont.) <servlet> <servlet-name>velocity</servlet-name> <servlet-class> org.apache.velocity.tools.view.servlet.VelocityViewServlet </servlet-class> <init-param> <param-name>org.apache.velocity.toolbox</param-name> <param-value>/WEB-INF/toolbox.xml</param-value> </init-param> <init-param> <param-name>org.apache.velocity.properties</param-name> <param-value>/WEB-INF/velocity.properties</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>velocity</servlet-name> <url-pattern>*.vm</url-pattern> </servlet-mapping> dsbw 2008/2009 2q 16
  • 17. Struts 2  Struts 1 + Webwork = Struts 2  Struts 2 vs Struts 1 (according to struts.apache.org/2.x)  Enhanced Results - Unlike ActionForwards, Struts 2 Results can actually help prepare the response.  Enhanced Tags - Struts2 tags don't just output data, but provide stylesheet- driven markup, so that we consistent pages can be created with less code.  POJO forms - No more ActionForms: we can use any JavaBean we like or put properties directly on our Action classes.  POJO Actions - Any class can be used as an Action class. Even the interface is optional!  First-class AJAX support - The AJAX theme gives interactive applications a boost. Easy-to-test Actions – Struts 2 Actions are HTTP independent and can be  tested without resorting to mock objects.  Intelligent Defaults - Most framework configuration elements have a default value that we can set and forget. dsbw 2008/2009 2q 17
  • 18. Struts 2: Tagging example <s:actionerror/> <s:form action=quot;Profile_updatequot; validate=quot;truequot;> <s:textfield label=quot;Usernamequot; name=quot;usernamequot;/> <s:password label=quot;Passwordquot; name=quot;passwordquot;/> <s:password label=quot;(Repeat) Passwordquot; name=quot;password2quot;/> <s:textfield label=quot;Full Namequot; name=quot;fullNamequot;/> <s:textfield label=quot;From Addressquot; name=quot;fromAddressquot;/> <s:textfield label=quot;Reply To Addressquot; name=quot;replyToAddressquot;/> <s:submit value=quot;Savequot; name=quot;Savequot;/> <s:submit action=quot;Register_cancelquot; value=quot;Cancelquot; name=quot;Cancelquot; onclick=quot;form.onsubmit=nullquot;/> </s:form> dsbw 2008/2009 2q 18
  • 19. Spring MVC  Spring's own implementation of the Front Controller Pattern  Flexible request mapping and handling  Full forms support  Supports several view technologies  JSP/Tiles, Velocity, FreeMarker  Support integration with other MVC frameworks  Struts, Tapestry, JavaServerFaces, WebWork  Provides a JSP Tag Library dsbw 2008/2009 2q 19
  • 20. Spring Framework Architecture Spring Web Spring ORM WebApplicationContext Hibernate support Struts integration Spring MVC iBatis support Tiles integration Spring AOP JDO support Web MVC Web utilities AOP infrastructure Framework Metadata support JSP support Declarative transaction Velocity/FreeMarker Spring Context Spring DAO management support PFD/Excel support Transaction Infrastructure ApplicationContext JDBC support JNDI, EJB support DAO support Remoting Spring Core IoC Container dsbw 2008/2009 2q 20
  • 21. Spring MVC: Request Lifecycle dsbw 2008/2009 2q 21
  • 22. Spring MVC: Terminology wrt. J2EE Core Patterns Spring MVC J2EE Core Patterns Concept DispatcherServlet Front Controller / Application Controller HandlerMapping Command Mapper ModelAndView View Handle / Presentation Model ViewResolver View Mapper Controller Business Helper dsbw 2008/2009 2q 22
  • 23. Spring MVC: Setting Up 1. Add the Spring dispatcher servlet to the web.xml 2. Configure additional bean definition files in web.xml 3. Write Controller classes and configure them in a bean definition file, typically META-INF/<appl>-servlet.xml 4. Configure view resolvers that map view names to to views (JSP, Velocity etc.) 5. Write the JSPs or other views to render the UI dsbw 2008/2009 2q 23
  • 24. Spring MVC: Controllers public class ListCustomersController implements Controller { private CustomerService customerService; public void setCustomerService(CustomerService customerService) { this.customerService = customerService; } public ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse res) throws Exception { return new ModelAndView(“customerList”, “customers”, customerService.getCustomers()); } }  ModelAndView object is simply a combination of a named view and a Map of objects that are introduced into the request by the dispatcher dsbw 2008/2009 2q 24
  • 25. Spring MVC: Controllers (cont.)  Interface based Do not have to extend any base classes (as in Struts)   Have option of extending helpful base classes Multi-Action Controllers   Command Controllers Dynamic binding of request parameters to POJO (no  ActionForms) Form Controllers  Hooks into cycle for overriding binding, validation, and inserting  reference data Validation (including support for Commons Validation)  Wizard style controller  dsbw 2008/2009 2q 25
  • 26. JavaServer Faces (JSF)  Sun’s “Official” Java-based Web application framework  Specifications:  JSF 1.0 (11-03-2004)  JSF 1.1 (25-05-2004)  JSF 1.2 (11-05-2006)  JSF 2.0 (2009?)  Main characteristics: UI component state management across requests   Mechanism for wiring client-generated events to server side application code  Allow custom UI components to be easily built and re-used  A well-defined request processing lifecycle  Designed to be tooled dsbw 2008/2009 2q 26
  • 27. JSF: Application Architecture Servlet Container Client JSF Application Devices Business DB Phone Objects JSF Framework PDA Model Objects Laptop EJB Container dsbw 2008/2009 2q 27
  • 28. JSF framework: MVC Request Response Model Objects Component FacesServlet Tree Managed JavaBeans View Resources Delegates JavaBeans Converters Config Property Files Validators XML Renderers Action Business Objects Handlers Controller EJB Model & Event JDO Listeners JDBC dsbw 2008/2009 2q 28
  • 29. JSF: Request Processing Lifecycle Response Complete Response Complete Restore Request Apply Request Process Process Process Component Value Events Validations Events Tree Render Response Response Complete Response Complete Response Render Process Invoke Process Update Model Response Events Application Events Values Conversion Errors Validation or Conversion Errors dsbw 2008/2009 2q 29
  • 30. JSF: Request Processing Lifecycle  Restore Component Tree: The requesting page’s component tree is retrieved/recreated.   Stateful information about the page (if existed) is added to the request.  Apply Request Value:  Each component in the tree extracts its new value from the request parameters by using its decode method.  If the conversion of the value fails, an error message associated with the component is generated and queued .  If events have been queued during this phase, the JSF implementation broadcasts the events to interested listeners.  Process Validations:  The JSF implementation processes all validators registered on the components in the tree. It examines the component attributes that specify the rules for the validation and compares these rules to the local value stored for the component. dsbw 2008/2009 2q 30
  • 31. JSF: Request Processing Lifecycle  Update Model Values:  The JSF implementation walks the component tree and set the corresponding model object properties to the components' local values.  Only the bean properties pointed at by an input component's value attribute are updated  Invoke Application:  Action listeners and actions are invoked  The Business Logic Tier may be called  Render Response:  Render the page and send it back to client dsbw 2008/2009 2q 31
  • 32. JSF: Anatomy of a UI Component Event Render Handling Model binds has has Id has has Validators UIComponent Local Value Attribute Map has has Child Converters UIComponent dsbw 2008/2009 2q 32
  • 33. JSF: Standard UI Components  UIInput  UICommand  UIOutput  UIForm  UISelectBoolean  UIColumn  UISelectItem  UIData  UISelectMany  UIPanel  UISelectOne  UISelectMany  UIGraphic dsbw 2008/2009 2q 33
  • 34. JSF: HTML Tag Library  JSF Core Tag Library (prefix: f)  Validator, Event Listeners, Converters  JSF Standard Library (prefix: h)  Express UI components in JSP dsbw 2008/2009 2q 34
  • 35. JSF: HTML Tag Library <f:view> <h:form id=”logonForm”> <h:panelGrid columns=”2”> <h:outputLabel for=”username”> <h:outputText value=”Username:”/> </h:outputLabel> <h:inputText id=”username” value=”#{logonBean.username}”/> <h:outputLabel for=”password”> <h:outputText value=”Password:”/> </h:outputLabel> <h:inputSecret id=”password” value=”#{logonBean.password}”/> <h:commandButton id=”submitButton” type=”SUBMIT” action=”#{logonBean.logon}”/> <h:commandButton id=”resetButton” type=”RESET”/> </h:panelGrid> </h:form> </f:view> dsbw 2008/2009 2q 35
  • 36. JSF: Managed (Model) Bean  Used to separate presentation from business logic  Based on JavaBeans  Similar to Struts ActionForm concept  Can also be registered to handle events and conversion and validation functions  UI Component binding example: <h:inputText id=”username” value=”#{logonBean.username}”/> dsbw 2008/2009 2q 36
  • 37. References  Books:  B. Siggelkow. Jakarta Struts Cookbook. O'Reilly, 2005  J. Carnell, R. Harrop. Pro Jakarta Struts, 2nd Edition. Apress, 2004  C. Walls, R. Breidenbach. Spring in Action. Manning, 2006.  B. Dudney, J. Lehr, B. Willis, L. Mattingly. Mastering JavaServer Faces. Willey, 2004.  Web sites:  struts.apache.org  rollerjm.free.fr/pro/Struts11.html  www.springframework.org  static.springframework.org/spring/docs/1.2.x/reference/mvc.html  java.sun.com/javaee/javaserverfaces dsbw 2008/2009 2q 37