SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
eGovFrame Training Book
    Runtime Environment



        eGovFrame Center
              2012
Table of contents

I     Overview
II    Foundation Layer
III   Persistence Layer
IV    Presentation Layer




                                 Page l   2
Runtime Environment Composition                                                             Overview


Runtime Environment is the foundation of software applications and provides the basic
functionality required to run software


                               eGovFrame Runtime Environment




       Presentation         UX           Business Logic     Persistence       Integration
          Layer            Layer             Layer            Layer              Layer




                                        Foundation Layer




                                                                                    Service Group




                                                                                               Page l   3
Runtime Environment                                                                Composition of eGovFrame


Runtime Environment is the foundation of software applications and provides the basic
functionality required to run an enterprise application



                          Application Program




                            Runtime Environment
                                            UX Layer           Persistent Layer
      Client Screen          Presentation
                             Layer                                                           DB
                                            Biz Logic Layer    Integration Layer


                                            Foundation Layer




                                                                                                   Page l   4
Composition of the runtime environment                                                                                                Composition of eGovFrame


The runtime environment consists of 6 service groups, 38 services. Support
MVC, DI, AOP, etc patterns, based on Spring framework
                                                                       Runtime Environment

      Presentation Layer                                  UX Layer                      Biz Logic                 Persistence Layer                  Integration
                                                                                         Layer                                                          Layer
  Ajax Support        Internationalization         UX/UI Controller Component          Biz. Process             TBD
                                                                                                             Data Access            DataSource      Message Service
                                                                                       Management
      MVC                 Security                   HTML5            CSS3                                       TBD
                                                                                                                 ORM                Transaction     Naming Service
                                                                                    Exception Handling
   UI Adaptor                                   JavaScript Module App Framework                                                                       Web Service



                                                                             Foundation Layer


          AOP                                Cache             Compress/Decompress       Encryption/Decryption              Excel                 File Handling


   File Upload/Download                      FTP                    Hot-Deploy               ID Generation             IoC Container                Logging


           Mail                  Marshalling/Unmarshalling         Object Pooling              Property                    Resource                Scheduling


        String Util                 XML Manipulation




                                                                                                                                                                     Page l   5
Composition of the runtime environment                                                                                                Composition of eGovFrame


The runtime environment consists of 6 service groups, 38 services. Support
MVC, DI, AOP, etc patterns, based on Spring framework
                                                                       Runtime Environment

      Presentation Layer                                  UX Layer                      Biz Logic                 Persistence Layer                  Integration
                                                                                         Layer                                                          Layer
  Ajax Support        Internationalization         UX/UI Controller Component          Biz. Process             TBD
                                                                                                             Data Access            DataSource      Message Service
                                                                                       Management
      MVC                 Security                   HTML5            CSS3                                       TBD
                                                                                                                 ORM                Transaction     Naming Service
                                                                                    Exception Handling
   UI Adaptor                                   JavaScript Module App Framework                                                                       Web Service



                                                                             Foundation Layer


          AOP                                Cache             Compress/Decompress       Encryption/Decryption              Excel                 File Handling


   File Upload/Download                      FTP                    Hot-Deploy               ID Generation             IoC Container                Logging


           Mail                  Marshalling/Unmarshalling         Object Pooling              Property                    Resource                Scheduling


        String Util                 XML Manipulation




                                                                                                                                                                     Page l   6
Runtime Environment OSS                                                                                                                          Overview

Runtime Environment consists of a variety of open source software
            Open Source S/W            Version                     Applied Service        Reference URL

 Spring                                  3.0.5   IoC Container, AOP, Property, Resource   http://www.springsource.org/
 Spring Security                         2.0.4   Server Security                          http://static.springsource.org/spring-security/site/
 Log4j                                     1.3   Logging                                  http://logging.apache.org/
 EHCache                                 2.4.1   Cache                                    http://ehcache.sourceforge.net/
 Commons Compress                          1.1   Compress/Decompress                      http://commons.apache.org/compress/
 Commons VFS                               1.0   File Handling                            http://commons.apache.org/vfs/
 Commons FileUpload                      1.2.2   File Upload/Download                     http://commons.apache.org/fileupload
 Commons Net                             3.0.1   FTP                                      http://commons.apache.org/net/

 Common Email                              1.1   Mail                                     http://commons.apache.org/email/

 Commons Pool                            1.5.6   Object Pooling                           http://commons.apache.org/pool/

 Jakarta Regexp                            1.5   String Util                              http://jakarta.apache.org/regexp/

 Apache Xerces 2                         2.2.9                                            http://xerces.apache.org/xerces2-j/
                                                 XML Manipulation
 JDOM                                      1.1                                            http://www.jdom.org/

 java simplified encryption (jasypt)       1.7   Encryption/Decryption                    http://www.jasypt.org/
 Apache POI                                3.2                                            http://poi.apache.org/
                                                 Excel
 jXLS                                    0.9.9                                            http://jxls.sourceforge.net/
 Castor                                    1.2                                            http://www.castor.org/
                                                 Marshalling/Unmarshalling
 Apache XML Beans                          2.4                                            http://xmlbeans.apache.org/

 Quartz                                  1.8.5   Scheduling                               http://www.opensymphony.com/quartz/


                                                                                                                                                   Page l   7
Features & Effects                                                                                   Overview



 Features
  • Adopt proven open source SW, optimized for e-government projects
  • Utilize Spring framework as a core foundation that is a pervasive lightweight framework
  • Apply DI, AOP, MVC, etc for SW architecture and implementation
  • Provide a common interface for integrating solutions as defining associated standard interface


 Effects
  • Improve development productivity
  • Improve e-government system reusability
  • Improve interoperability of e-government system
  • Standardize e-government application software
  • Promote Open Source Software
  • Enhance SMEs competitiveness




                                                                                                       Page l   8
RE*) Open Source - Spring Framework Overview                                          Foundation Layer



       Overview
          • Open source framework supports Java based enterprise applications
          • POJO based lightweight container (very loosely coupled)
          • Developed by Rod Johnson (Based on “Expert one-on-one J2EE Design and Development”)


       Spring Mission and Goals
        • Spring should be fun and easier than J2EE in use.
        • Spring should not depend on the API.
        • Spring integrates with existing good solutions rather than competing.


       EJB Problems
       • Heavy weight remote model
       • High complexity + Portability, Difficult to ensure performance and scalability



· RE*) : Runtime Environment

                                                                                                   Page l   9
Spring Framework Composition                                                 Foundation Layer


Spring Framework consists of DAO, ORM, AOP, JEE, Web, based on the core that governs the
Bean object life cycle




                                                                                       Page l   10
IoC Container                                                                                       Foundation Layer



 Overview
    • Manage creating objects and object dependencies by external setting, rather than hard coding
      within source code
    • IoC is an abbreviation of the “Inversion of Control” or referred to “Reverse control”
    • Improve flexibility and scalability



 Key Features
  • Dependency Injection
    - Inject dependencies among objects in the external setting

    - Framework determines dependencies(objects) and relationships which will be used at run time

  • Bean Lifecycle Management
    - Manage the life cycle of object creation, destruction, etc




                                                                                                             Page l   11
IoC Container                                                                                                Foundation Layer


 Inversion of Control (IoC) is an object-oriented programming practice where the object coupling
 is bound at run time by an assembler object and is typically not known at compile
 time using static analysis.
 In traditional programming, the flow of the business logic is determined by objects that are statically assigned to one another.
 With IoC, the flow depends on the object graph that is instantiated by the assembler and is made possible by object
 interactions being defined through abstractions. The binding process is achieved through dependency injection.

 Inversion of control as a design guideline serves the following purposes:
    • There is a decoupling of the execution of a certain task from implementation.
    • Every module can focus on what it is designed for.
    • Replacing modules has no side effect on other modules.

 IoC Container
     The container is an object that implements the concept of Inversion of Control. It manages the object lifecycle from
    creation to destruction and takes control for all objects.

 Dependency Injection (DI)
   DI is a software design pattern that allows a choice of component to be made at run-time rather than compile time. It is a
   style of object configuration in which an objects fields and collaborators are set by an external entity, such as bean
   definition.

                                                                                                                           Page l   12
IoC Container                                                                 Foundation Layer


 Key Features
  • DI (Dependency Injection)

             A              B
                                           C
                                                                         Configuration



   [Module Call Conceptual View – Non DI       [Module Call Conceptual View –Use DI


 • Bean Lifecycle Management




                                                                                         Page l   13
IoC Container                                                                    Foundation Layer

 Non-IoC/DI vs IoC/DI


  Non-IoC/DI                               IoC/DI


                                Bar                       Bar

                Foo                                                              Foo

                                Baz                       Baz

                                      vs
                                           package x.y;
  package x.y;                             public class Foo {
                                             public Foo(Bar bar, Baz baz) {
                                               // ...
  public class Foo {                         }
                                           }
      public void process() {              <beans>
        Bar bar = new Bar();                 <bean name="foo" class="x.y.Foo">
                                               <constructor-arg>
        Baz baz = new Baz();                      <bean class="x.y.Bar"/>
        // ...                                 </constructor-arg>
      }                                        <constructor-arg>
                                                  <bean class="x.y.Baz"/>
  }                                            </constructor-arg>
                                             </bean>
                                           </beans>



                                                                                          Page l   14
IoC Container                                                                          Foundation Layer


 Container
  • creates objects and take a role as an
    assembler to inject dependency between                                       Business Objects
    objects                                                                      (POJOs)

 Configuration Metadata                                                   The Spring
                                                                           Container
  • represents how the Spring container              Configuration
    instantiates, configures, and assembles the        Metadata
    objects in an application. It is traditionally                               produces
    supplied in a simple and intuitive XML
    format.                                                          Fully configured system
                                                                         Ready for use
 Bean

  • is an object that created and managed by
    Spring IoC Container


                                                                                                Page l   15
IoC Container                                                                      Foundation Layer


 In Spring, the Bean Factory is an IoC container to control beans and inject dependency
 among them. The Application Context is spring's more advanced container(include
 Bean Factory) and it adds more enterprise-specific functionality. Normally, the
 Application Context is used over the BeanFactory.

 BeanFactory
  • The Bean Factory is the actual container which instantiates, configures, and manages a
    number of beans. (ex: dependency injection, bean lifecyclemanagement)
  • It is represented by the interface org.springframework.beans.factory.BeanFactory, for
    which there are multiple implementations.

 Application Context
  • Extend BeanFactory interface and add functionality such as Spring AOP, message
    resource, internationalization, event processing, etc to develop and run an enterprise
    application
  • As the ApplicationContext includes all functionality of the BeanFactory, it is generally
    recommended that it be used over the BeanFactory


                                                                                               Page l   16
IoC Container                                                                            Foundation Layer


 Injection Type
      • Constructor Injection : Configuring dependency through an argument constructor
      • Setter Injection : Configuring dependency through setters on the object.



  package x.y;                                               <beans>
                                                               <bean name="foo" class="x.y.Foo">
  public class Foo {                                             <property name="bar">
    public void setBar(Bar bar) {                                   <bean class="x.y.Bar" />
      // ...                                                     </property>
    }                                                            <property name="baz">
                                                                    <bean class="x.y.Baz" />
      public void setBaz(Baz baz) {                              </property>
        // ...                                                 </bean>
      }                                                      </beans>
  }




                                                                                                   Page l   17
IoC Container                                                                                 Foundation Layer



 XML configuration file
 • Bean configuration file has <beans/> as root, and provides related Namespace and Schema
   <?xml version="1.0" encoding="UTF-8"?>
   <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

    <bean id="..." class="...">
     <!-- collaborators and configuration for this bean go here -->
    </bean>

    <bean id=“xmlEmpDAO” class=“egovframework.example.service.impl.XmlEmpDAO“ />

    <bean id=“xmlEmpService” class=“egovframework.example.service.impl.XmlEmpServiceImpl” >
      <property name=“xmlDAO” ref=“xmlEmpDAO” />
    </bean>

    <bean name=“otherExampleBean” class=“egovframework.example.OtherExampleBean“ />

   </beans>




                                                                                                       Page l   18
IoC Container                                                                               Foundation Layer



 Annotation
 • Available to use Java annotation instead of XML configuration files (Java 5 or higher)
 • As using annotation, simplify configuration files, and mapping between view pages and objects or methods
   can be clearly defined.




                                                                                                     Page l   19
IoC Container                                                                     Foundation Layer


 Annotation Type
 • Using Java Annotation, Spring Bean definitions can be set, then need to add namespace
   and element
   <?xml version="1.0" encoding="UTF-8"?>
   <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://www.springframework.org/schema/context
         http://www.springframework.org/schema/context/spring-context-3.0.xsd">
      <context:annotation-config/>
   </beans>




                                                                                           Page l   20
IoC Container                                                                                                 Foundation Layer


 Auto Scan, based on Annotation
    • Normally declaring all the beans or components in XML bean configuration file, so that Spring
      container can detect and register beans or component.
    • Spring is also able to auto scan, detect and instantiate beans from pre-defined project package.
    • ‘base-package’ attribute is the basic package to find components, can be assigned multiple package
      with ‘,’ separation mark.
    • <context:exclude-filter> tag and <context:include-filter> tag are used to state what component is
      included or excluded to the scanning

     <?xml version="1.0" encoding="UTF-8"?>
     <beans ··· >

       <context:component-scan base-package=“egovframework“/>
         <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
         <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
         <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
       </context:component-scan>

     </beans>




                                                                                                                       Page l   21
IoC Container                                                                                Foundation Layer


 Annotation type
    • @Required : Applied to setter method, mark a property as being 'required-to-be-set' (i.e. an annotated
      (setter) method of a class must be configured to be dependency injected with a value) ethods
          public class SimpleMovieLister {
            // the SimpleMovieLister has a dependency on the MovieFinder
            private MovieFinder movieFinder;
            // a setter method so that the Spring container can 'inject' a MovieFinder
            @Required
             public void setMovieFinder(MovieFinder movieFinder) {
                 this.movieFinder = movieFinder;
            }
            // business logic that actually 'uses' the injected MovieFinder is omitted...
          }

    • @Autowired : auto wire a bean on the setter method, constructor or a field. It can autowire property
      in a particular bean
    •   @Resource : marks a resource that is needed by the application. It finds the target bean with name
          @Service public UserServiceImpl implements UserService {
            @Resource (name="userDAO")
            private UserDAO userDAO;
          }

    • @PostConstruct, @PreDestroy : Use to assign Instantiation callback, Destruction callback methods


                                                                                                         Page l   22
IoC Container                                                         Foundation Layer



 @Resource
  @Resource annotation의 name 값으로 대상 bean을 찾을 수 있다. @Resource annotation은 field 또는
  메소드에 사용할 수 있다.

    public class SimpleMovieLister {

        private MovieFinder movieFinder;

        @Resource(name="myMovieFinder")
        public void setMovieFinder(MovieFinder movieFinder) {
          this.movieFinder = movieFinder;
        }
    }




                                                                               Page l   23
IoC Container                                                                                                               Foundation Layer



 Auto-detecting components
 • Set Name- Set bean name with @Component, @Repository, @Service, @Controller annotation’s
   name value
    @Service("myMovieLister")                                                @Repository
    public class SimpleMovieLister {                                         public class MovieFinderImpl implements MovieFinder {
      // ...                                                                   // ...
    }                                                                        }



 ApplicationContext for web application
 • Spring provides classes for easy WebApplicationContext setting
 • Add following settings in web.xml for ApplicationContext setting with the Listener
   (Servlet 2.4 or later)

    <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>/WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <listener>
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>




                                                                                                                                     Page l   24
AOP                                                                                    Foundation Layer



 Overview
   • Aspect-oriented programming (AOP) is a programming paradigm which aims to
     increase modularity by allowing the separation of cross-cutting concerns
   • AOP is programming techniques to support the processing of modularizing Logging, security,
     transactions, and common functions without changing existing business logic



                                                                                        Configuration
                                                                                            File




                                                AOP
                                               Applied



                  OOP                                                     OOP + AOP




                                                                                                  Page l   25
AOP                                                                               Foundation Layer


 Main Concept
    • Advice, JoinPoint, Pointcut, Weaving, Aspect




                                                                       Pointcut



                                                  JoinPoint
                        Weaving


                                                              Advice
 Benefits
    • Remove duplicate code
    • Improve readability of the business logic
    • Improve productivity
    • Improve reusability
    • Increase ease of change


                                                                                           Page l   26
AOP                                                                                        Foundation Layer



 Relations for AOP components

                                                   A set of Join point
                   Join point is the time         (condition: select*)
             which a method is called in Spring



        Source Code

          EmployeeService                                          Aspect
                      소스코드

                                                                            Processing what you want to apply
         insertEmployee()
         updateEmployee()                         Pointcut
         selectEmployeeList()                                                Advice
         selectEmployee()
         deleteEmployttList()

                                    Joinpoint




                                                                                                          Page l   27
AOP                                                                                                 Foundation Layer


 Develop functions of cross-cutting concerns (Create Advice)
    • Advice, JoinPoint, Pointcut
   public class AdviceUsingXML {
     public void beforeTargetMethod(JoinPoint thisJoinPoint) {
       Class clazz = thisJoinPoint.getTarget().getClass();
       String className = thisJoinPoint.getTarget().getClass().getSimpleName();
       String methodName = thisJoinPoint.getSignature().getName();
       // Obtain the target method Logger and log the current class and method status information
       Log logger = LogFactory.getLog(clazz);
       logger.debug(className + "." + methodName + " executed.");
     }
   }


 Apply AOP (Create setting file)
    • Remove duplicated code
     <aop:config>
       <aop:pointcut id="targetMethod"
        expression="execution(* egovframework.rte.fdl.aop.sample.*Sample.*(..))" />
       <aop:aspect ref="adviceUsingXML">
          <aop:before pointcut-ref="targetMethod" method="beforeTargetMethod" />
     </aop:aspect>
     </aop:config>




                                                                                                             Page l   28
Data Source                                                                                     Persistence Layer


 Overview
  •   Service for providing database connection

  •   Remove dependencies about business logic and database connection



 Key Features
  •   Service to connect database

        -   Create database connection, using JDBC driver

  <bean id="dataSource”
    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="${driver}" />
    <property name="url" value="${dburl}" />
    <property name="username" value="${username}" />
    <property name="password" value="${password}" />
  </bean>
                                                   • driverClassName : JDBC driver class name
                                                   • url : Database access JDBC URL
                                                   • username : Database access username
                                                   • password : Database access password



                                                                                                          Page l   29
Data Source                                                                                           Persistence Layer


 Key Features
  •   DBCP DataSource

        -   Database connection module, using JDBC driver. This is database connection pool, called Commons DBCP
            in Jakarta projects.


  <bean id="dataSource” class="org.apache.commons.dbcp.BasicDataSource” destroy-method="close">
    <property name="driverClassName" value="${driver}" />
    <property name="url" value="${dburl}" />
    <property name="username" value="${username}" />
    <property name="password" value="${password}" />
    <property name="defaultAutoCommit" value="false" />
    <property name="poolPreparedStatements" value="true" />
  </bean>
                           • driverClassName : jdbc driver class name
                           • url : DataBase url
                           • username : DataBase access user name
                           • password : DataBase access password
                           • defaultAutoCommit : configure auto-commit function about connection
                           • poolPreparedStatements : PreparedStatement configuration (user or not)




                                                                                                                Page l   30
Data Access                                                                                 Persistence Layer


 Overview
  • Provide a service to respond in a consistent manner for a variety of database solutions and database
    access technologies
  • Improve business efficiency by providing abstract data access method
  • SQL statement can be mapped easily to JavaBeans(or Map), using iBATIS which apply simple XML
    technology rather than java code to access a relational database


 Key features
  • Provide an abstraction access method for JDBC (Do not directly call JDBC related API)
  • Support removing SQL statement from Java source code (Ensure ease of management /
    maintenance / tuning)
  • Support various binding/mapping for input/output objects of Query execution
  • Support dynamic query change through dynamic SQL
  • Support a variety of DB processing (Batch SQL, Paging, Callable statement, BLOB/CLOB, etc)




                                                                                                           Page l   31
Data Access                                                                                Persistence Layer


 Features
  • iBATIS is a persistence framework that emphasize on simplicity and minimize the
     repetitive and complex DB query using SQL Map
      - Support Stored Procedure with XML or mapping between SQL statements and Java objects, as
        emphasis on simplicity, one of iBATIS main ideas
      - Persistence framework, developed by Clinton Begin(Apache Software Foundation) in 2001


        Elements                iBATIS              Hibernate                     comparison
                                                                      Hibernate takes more time due to
  Round Trip Delay Time          Short                Long            features such as automatic generation
                                                                      of query

        Flexibility              Good                 Poor


     Learning Curve              Short                Long            iBATIS is much more similar to JDBC


     SQL knowledge          Should be higher   Do not required much




                                                                                                        Page l   32
Spring with iBatis                                                                               Persistence Layer


 Spring and iBATIS
  • In order to use iBATIS in Spring, define the sqlMapClient of iBATIS like below
  • Bean definition (context-sqlMap.xml)
    - id and class name are fixed values
    - dataSource : make Spring manages DataSource as using DataSource bean id which configured in
    Spring
    - configLocation : configure the location of SqlMap Configuration file다

    <beans . . .>
        <!-- SqlMap setup for iBATIS Database Layer -->
        <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"
             p:dataSource-ref="dataSource"
             p:configLocation-ref="classpath:/egovframework/sqlmap/rte/sql-map-config.xml" />
    </beans>




                                                                                                           Page l   33
Spring with iBatis                                                                 Persistence Layer


 Persistence Layer development sequence, using iBATIS
  • Define SqlMapClient Bean (context-sqlMap.xml)
  • Define the location of SQL Map XML in SQL Map Config XML
  • Configure SQL related information in SQL Map XML files
  • Create a DAO class
     Extends EgovAbstractDAO class which inherits SqlMapClientDaoSupport to make DB query and run,
     using SQL Map XML query id




                                                                                              Page l   34
MVC                                                                                       Presentation Layer



 Overview

 • MVC(Model-View-Controller) pattern separates code by
   Model, View, Controller 3 factors, depending on functions
      - Model : objects include application data
        and business logic
      - View : display the information of model to users
      - Controller : intermediary of Model and View
        (Reflect the status of model change, based on the user request and select view for a response)

 • MVC pattern reduces dependency by separating the UI code and business code, increases reusability
   and can be easier to change

 • Though ‘MVC pattern’ is not used only for Web Framework, ‘MVC service’ in eGovFrame means
   Web MVC Framework utilizing MVC pattern




                                                                                                         Page l   35
MVC                                                                                                   Presentation Layer

 Relationship and flow between Spring MVC components




 •   When client’s request comes in, the DispatcherServlet first receives the request.
 •   The DispatcherServlet consults the HandlerMapping and invokes the Controller associated with the request.
 •   The Controller process the request by calling the appropriate service methods and returns a ModeAndView object to
     the DispatcherServlet. The ModeAndView object contains the model data and the view name.
 •   The DispatcherServlet sends the view name to a ViewResolver to find the actual View to invoke.
 •   Now the DispatcherServlet will pass the model object to the View to render the result.
 •   The View with the help of the model data will render the result back to the user.

                                                                                                                   Page l   36
MVC                                                                                        Presentation Layer


 Spring MVC core components
 • DispatcherServlet
      - The front controller of Spring MVC Framework. Supervise life cycle of web request and
        respond.
 • HandlerMapping
      - Decide which controller will process the target URL when web request comes in.
 • Controller
      - Perform the business logic and the result data is reflected in the ModelAndView.
 • ModelAndView
      - Consist of model data object which reflects controller’s result and target page information (or
        view object).
 • ViewResolver
      - Provide a mapping between view names and actual views.
 • View
      - Display the model object which is result data.



                                                                                                          Page l   37
Page l   38

Mais conteúdo relacionado

Mais procurados

Application Grid: Platform for Virtualization and Consolidation of your Java ...
Application Grid: Platform for Virtualization and Consolidation of your Java ...Application Grid: Platform for Virtualization and Consolidation of your Java ...
Application Grid: Platform for Virtualization and Consolidation of your Java ...Bob Rhubart
 
TDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE ApplicationTDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE ApplicationArun Gupta
 
Summer training java
Summer training javaSummer training java
Summer training javaArshit Rai
 
Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...
Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...
Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...Lucas Jellema
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudArun Gupta
 
Natasja Paulssen S A P M D M And E S O A At Philips
Natasja  Paulssen    S A P  M D M And E S O A At  PhilipsNatasja  Paulssen    S A P  M D M And E S O A At  Philips
Natasja Paulssen S A P M D M And E S O A At PhilipsSOA Symposium
 
(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive
(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive
(ATS3-GS03) Accelrys Enterprise Platform Deeper DiveBIOVIA
 
Manage Agility through Manage-ability – Introducing Design Time at Run Time ...
Manage Agility through Manage-ability – Introducing Design Time at Run Time ...Manage Agility through Manage-ability – Introducing Design Time at Run Time ...
Manage Agility through Manage-ability – Introducing Design Time at Run Time ...Lucas Jellema
 
Engineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the FutureEngineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the FutureBob Rhubart
 
Switch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandSwitch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandAlfresco Software
 
Oracle Security: Bridging the gap between enterprise and cloud
Oracle Security: Bridging the gap between enterprise and cloudOracle Security: Bridging the gap between enterprise and cloud
Oracle Security: Bridging the gap between enterprise and cloudNormand Sauve
 
Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Arun Gupta
 
Expendables E-AppStore
Expendables E-AppStoreExpendables E-AppStore
Expendables E-AppStorelobalint
 
N(i)2 technical architecture 2.0 (v1 1)
N(i)2 technical architecture 2.0 (v1 1)N(i)2 technical architecture 2.0 (v1 1)
N(i)2 technical architecture 2.0 (v1 1)kvz
 
Innovations in Data Grid Technology with Oracle Coherence
Innovations in Data Grid Technology with Oracle CoherenceInnovations in Data Grid Technology with Oracle Coherence
Innovations in Data Grid Technology with Oracle CoherenceBob Rhubart
 

Mais procurados (18)

Application Grid: Platform for Virtualization and Consolidation of your Java ...
Application Grid: Platform for Virtualization and Consolidation of your Java ...Application Grid: Platform for Virtualization and Consolidation of your Java ...
Application Grid: Platform for Virtualization and Consolidation of your Java ...
 
TDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE ApplicationTDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE Application
 
Summer training java
Summer training javaSummer training java
Summer training java
 
Introduction inbox v2.0
Introduction inbox v2.0Introduction inbox v2.0
Introduction inbox v2.0
 
Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...
Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...
Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (O...
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the Cloud
 
Natasja Paulssen S A P M D M And E S O A At Philips
Natasja  Paulssen    S A P  M D M And E S O A At  PhilipsNatasja  Paulssen    S A P  M D M And E S O A At  Philips
Natasja Paulssen S A P M D M And E S O A At Philips
 
(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive
(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive
(ATS3-GS03) Accelrys Enterprise Platform Deeper Dive
 
Manage Agility through Manage-ability – Introducing Design Time at Run Time ...
Manage Agility through Manage-ability – Introducing Design Time at Run Time ...Manage Agility through Manage-ability – Introducing Design Time at Run Time ...
Manage Agility through Manage-ability – Introducing Design Time at Run Time ...
 
Engineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the FutureEngineered Systems: Oracle’s Vision for the Future
Engineered Systems: Oracle’s Vision for the Future
 
Switch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandSwitch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New Zealand
 
Ofm msft-interop-v5c-132827
Ofm msft-interop-v5c-132827Ofm msft-interop-v5c-132827
Ofm msft-interop-v5c-132827
 
Oracle Security: Bridging the gap between enterprise and cloud
Oracle Security: Bridging the gap between enterprise and cloudOracle Security: Bridging the gap between enterprise and cloud
Oracle Security: Bridging the gap between enterprise and cloud
 
Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7
 
Nemo intro-100811
Nemo intro-100811Nemo intro-100811
Nemo intro-100811
 
Expendables E-AppStore
Expendables E-AppStoreExpendables E-AppStore
Expendables E-AppStore
 
N(i)2 technical architecture 2.0 (v1 1)
N(i)2 technical architecture 2.0 (v1 1)N(i)2 technical architecture 2.0 (v1 1)
N(i)2 technical architecture 2.0 (v1 1)
 
Innovations in Data Grid Technology with Oracle Coherence
Innovations in Data Grid Technology with Oracle CoherenceInnovations in Data Grid Technology with Oracle Coherence
Innovations in Data Grid Technology with Oracle Coherence
 

Destaque

Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2Chuong Nguyen
 
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1Chuong Nguyen
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training bookChuong Nguyen
 
02. egovFrame Development Environment workshop II en(nexus&ci)
02. egovFrame Development Environment workshop II en(nexus&ci)02. egovFrame Development Environment workshop II en(nexus&ci)
02. egovFrame Development Environment workshop II en(nexus&ci)Chuong Nguyen
 
Thucdaydongcolamviec
ThucdaydongcolamviecThucdaydongcolamviec
ThucdaydongcolamviecNhat Nguyen
 
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book IChuong Nguyen
 
Quan Tri Hoc -Ch8 Dong Co Thuc Day
Quan Tri Hoc -Ch8 Dong Co Thuc DayQuan Tri Hoc -Ch8 Dong Co Thuc Day
Quan Tri Hoc -Ch8 Dong Co Thuc DayChuong Nguyen
 
Communicate in english on the telephone
Communicate in english on the telephoneCommunicate in english on the telephone
Communicate in english on the telephoneChuong Nguyen
 
Thư viện trẻ sáng tạo - LCK - instruction storytime
Thư viện trẻ sáng tạo - LCK - instruction storytimeThư viện trẻ sáng tạo - LCK - instruction storytime
Thư viện trẻ sáng tạo - LCK - instruction storytimeChuong Nguyen
 
100 cách khích lệ nhân viên [truongvannam.com]
100 cách khích lệ nhân viên [truongvannam.com]100 cách khích lệ nhân viên [truongvannam.com]
100 cách khích lệ nhân viên [truongvannam.com]Lừa Tình
 

Destaque (10)

Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P2
 
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1
Kỹ năng tham gia Hội Chợ Triển Lãm Đà Nẵng Workshop P1
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training book
 
02. egovFrame Development Environment workshop II en(nexus&ci)
02. egovFrame Development Environment workshop II en(nexus&ci)02. egovFrame Development Environment workshop II en(nexus&ci)
02. egovFrame Development Environment workshop II en(nexus&ci)
 
Thucdaydongcolamviec
ThucdaydongcolamviecThucdaydongcolamviec
Thucdaydongcolamviec
 
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book I
 
Quan Tri Hoc -Ch8 Dong Co Thuc Day
Quan Tri Hoc -Ch8 Dong Co Thuc DayQuan Tri Hoc -Ch8 Dong Co Thuc Day
Quan Tri Hoc -Ch8 Dong Co Thuc Day
 
Communicate in english on the telephone
Communicate in english on the telephoneCommunicate in english on the telephone
Communicate in english on the telephone
 
Thư viện trẻ sáng tạo - LCK - instruction storytime
Thư viện trẻ sáng tạo - LCK - instruction storytimeThư viện trẻ sáng tạo - LCK - instruction storytime
Thư viện trẻ sáng tạo - LCK - instruction storytime
 
100 cách khích lệ nhân viên [truongvannam.com]
100 cách khích lệ nhân viên [truongvannam.com]100 cách khích lệ nhân viên [truongvannam.com]
100 cách khích lệ nhân viên [truongvannam.com]
 

Semelhante a 03.egovFrame Runtime Environment Training Book

WCF, EF, Katmanlı Model
WCF, EF, Katmanlı ModelWCF, EF, Katmanlı Model
WCF, EF, Katmanlı Modelzenithbilisim
 
Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...
Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...
Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...WSO2
 
01.egovFrame Training Book II
01.egovFrame Training Book II01.egovFrame Training Book II
01.egovFrame Training Book IIChuong Nguyen
 
Lcds & Blaze Ds by Corneliu Creanga
Lcds & Blaze Ds by Corneliu CreangaLcds & Blaze Ds by Corneliu Creanga
Lcds & Blaze Ds by Corneliu CreangaJUG Genova
 
20120620 moving to windows azure
20120620 moving to windows azure20120620 moving to windows azure
20120620 moving to windows azureLuis Martins
 
Jazoon 2012 - Systems Integration in the Cloud Era with Apache Camel
Jazoon 2012 - Systems Integration in the Cloud Era with Apache CamelJazoon 2012 - Systems Integration in the Cloud Era with Apache Camel
Jazoon 2012 - Systems Integration in the Cloud Era with Apache CamelKai Wähner
 
HP Service Delivery Platform 3.0 Launch
HP Service Delivery Platform 3.0 LaunchHP Service Delivery Platform 3.0 Launch
HP Service Delivery Platform 3.0 Launchgrahamwright
 
Syllabus PS03CINT05 detailing
Syllabus PS03CINT05 detailingSyllabus PS03CINT05 detailing
Syllabus PS03CINT05 detailingOPENLANE
 
Concepts integrationandbiztalksoa andbpm
Concepts integrationandbiztalksoa andbpm Concepts integrationandbiztalksoa andbpm
Concepts integrationandbiztalksoa andbpm Sandro Pereira
 
Aras PLM Roadmap
Aras PLM RoadmapAras PLM Roadmap
Aras PLM RoadmapAras
 
End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012wwwally
 
The role of hyper-v in nist model
The role of hyper-v in nist modelThe role of hyper-v in nist model
The role of hyper-v in nist modelAlexey Bokov
 
Paving the Way to IT-as-a-Service
Paving the Way to IT-as-a-ServicePaving the Way to IT-as-a-Service
Paving the Way to IT-as-a-Servicebuildacloud
 
Oracle - Programatica2010
Oracle - Programatica2010Oracle - Programatica2010
Oracle - Programatica2010Agora Group
 
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?ukdpe
 
MPLS 2010: Network Enabled Cloud and Service Models
MPLS 2010: Network Enabled Cloud and Service ModelsMPLS 2010: Network Enabled Cloud and Service Models
MPLS 2010: Network Enabled Cloud and Service ModelsCisco Service Provider
 

Semelhante a 03.egovFrame Runtime Environment Training Book (20)

Exchange 2013 ABC's: Architecture, Best Practices and Client Access
Exchange 2013 ABC's: Architecture, Best Practices and Client AccessExchange 2013 ABC's: Architecture, Best Practices and Client Access
Exchange 2013 ABC's: Architecture, Best Practices and Client Access
 
Grottarossa:Why?
Grottarossa:Why?Grottarossa:Why?
Grottarossa:Why?
 
WCF, EF, Katmanlı Model
WCF, EF, Katmanlı ModelWCF, EF, Katmanlı Model
WCF, EF, Katmanlı Model
 
Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...
Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...
Achieve Cloud Scale by Implementing Elastic Load Balancing, Asset Deployment,...
 
01.egovFrame Training Book II
01.egovFrame Training Book II01.egovFrame Training Book II
01.egovFrame Training Book II
 
Lcds & Blaze Ds by Corneliu Creanga
Lcds & Blaze Ds by Corneliu CreangaLcds & Blaze Ds by Corneliu Creanga
Lcds & Blaze Ds by Corneliu Creanga
 
Nuno Godinho
Nuno GodinhoNuno Godinho
Nuno Godinho
 
20120620 moving to windows azure
20120620 moving to windows azure20120620 moving to windows azure
20120620 moving to windows azure
 
Jazoon 2012 - Systems Integration in the Cloud Era with Apache Camel
Jazoon 2012 - Systems Integration in the Cloud Era with Apache CamelJazoon 2012 - Systems Integration in the Cloud Era with Apache Camel
Jazoon 2012 - Systems Integration in the Cloud Era with Apache Camel
 
HP Service Delivery Platform 3.0 Launch
HP Service Delivery Platform 3.0 LaunchHP Service Delivery Platform 3.0 Launch
HP Service Delivery Platform 3.0 Launch
 
IT Governance Portals
IT Governance   PortalsIT Governance   Portals
IT Governance Portals
 
Syllabus PS03CINT05 detailing
Syllabus PS03CINT05 detailingSyllabus PS03CINT05 detailing
Syllabus PS03CINT05 detailing
 
Concepts integrationandbiztalksoa andbpm
Concepts integrationandbiztalksoa andbpm Concepts integrationandbiztalksoa andbpm
Concepts integrationandbiztalksoa andbpm
 
Aras PLM Roadmap
Aras PLM RoadmapAras PLM Roadmap
Aras PLM Roadmap
 
End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012
 
The role of hyper-v in nist model
The role of hyper-v in nist modelThe role of hyper-v in nist model
The role of hyper-v in nist model
 
Paving the Way to IT-as-a-Service
Paving the Way to IT-as-a-ServicePaving the Way to IT-as-a-Service
Paving the Way to IT-as-a-Service
 
Oracle - Programatica2010
Oracle - Programatica2010Oracle - Programatica2010
Oracle - Programatica2010
 
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
 
MPLS 2010: Network Enabled Cloud and Service Models
MPLS 2010: Network Enabled Cloud and Service ModelsMPLS 2010: Network Enabled Cloud and Service Models
MPLS 2010: Network Enabled Cloud and Service Models
 

Mais de Chuong Nguyen

HO CHI MINH CITY ECONOMIC FORUM HEF 2023 ENG FINAL - v1.pdf
HO CHI MINH CITY ECONOMIC FORUM  HEF 2023 ENG FINAL - v1.pdfHO CHI MINH CITY ECONOMIC FORUM  HEF 2023 ENG FINAL - v1.pdf
HO CHI MINH CITY ECONOMIC FORUM HEF 2023 ENG FINAL - v1.pdfChuong Nguyen
 
DIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdf
DIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdfDIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdf
DIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdfChuong Nguyen
 
2. THAM LUAN 02 - BO KH_CN Đánh giá sự phát triển của hệ sinh thái khởi nghi...
2. THAM LUAN 02 - BO KH_CN  Đánh giá sự phát triển của hệ sinh thái khởi nghi...2. THAM LUAN 02 - BO KH_CN  Đánh giá sự phát triển của hệ sinh thái khởi nghi...
2. THAM LUAN 02 - BO KH_CN Đánh giá sự phát triển của hệ sinh thái khởi nghi...Chuong Nguyen
 
2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...
2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...
2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...Chuong Nguyen
 
1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...
1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...
1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...Chuong Nguyen
 
03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English
03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English
03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc EnglishChuong Nguyen
 
4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI
4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI
4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VIChuong Nguyen
 
4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN
4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN
4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc ENChuong Nguyen
 
1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...
1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...
1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...Chuong Nguyen
 
The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...
The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...
The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...Chuong Nguyen
 
DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...
DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...
DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...Chuong Nguyen
 
DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022
DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022
DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022Chuong Nguyen
 
Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021
Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021
Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021Chuong Nguyen
 
Dnes introduction Vietnam version 2021
Dnes introduction Vietnam version 2021Dnes introduction Vietnam version 2021
Dnes introduction Vietnam version 2021Chuong Nguyen
 
DNES profile - introduction 2021 English version
DNES profile - introduction 2021 English versionDNES profile - introduction 2021 English version
DNES profile - introduction 2021 English versionChuong Nguyen
 
INVIETNAM - DANANG - HOI AN - TRAVEL GUIDE
INVIETNAM - DANANG - HOI AN - TRAVEL GUIDEINVIETNAM - DANANG - HOI AN - TRAVEL GUIDE
INVIETNAM - DANANG - HOI AN - TRAVEL GUIDEChuong Nguyen
 
Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19
Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19
Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19Chuong Nguyen
 
Vietnam in the digital era 2020
Vietnam in the digital era 2020Vietnam in the digital era 2020
Vietnam in the digital era 2020Chuong Nguyen
 
Customer experience and loyalty
Customer experience and loyaltyCustomer experience and loyalty
Customer experience and loyaltyChuong Nguyen
 
Quan ly trai nghiem khach hang nielsen
Quan ly trai nghiem khach hang  nielsenQuan ly trai nghiem khach hang  nielsen
Quan ly trai nghiem khach hang nielsenChuong Nguyen
 

Mais de Chuong Nguyen (20)

HO CHI MINH CITY ECONOMIC FORUM HEF 2023 ENG FINAL - v1.pdf
HO CHI MINH CITY ECONOMIC FORUM  HEF 2023 ENG FINAL - v1.pdfHO CHI MINH CITY ECONOMIC FORUM  HEF 2023 ENG FINAL - v1.pdf
HO CHI MINH CITY ECONOMIC FORUM HEF 2023 ENG FINAL - v1.pdf
 
DIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdf
DIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdfDIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdf
DIỄN ĐÀN KINH TẾ TP. HỒ CHÍ MINH HEF 2023 VN FINAL Vietnamese Version.pdf
 
2. THAM LUAN 02 - BO KH_CN Đánh giá sự phát triển của hệ sinh thái khởi nghi...
2. THAM LUAN 02 - BO KH_CN  Đánh giá sự phát triển của hệ sinh thái khởi nghi...2. THAM LUAN 02 - BO KH_CN  Đánh giá sự phát triển của hệ sinh thái khởi nghi...
2. THAM LUAN 02 - BO KH_CN Đánh giá sự phát triển của hệ sinh thái khởi nghi...
 
2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...
2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...
2. THAM LUAN 02 - BO KH_CN EN - Đánh giá sự phát triển của hệ sinh thái khởi ...
 
1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...
1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...
1. SO KHCN - VIE Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - Viet...
 
03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English
03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English
03.THAM LUAN - Hệ sinh thái khởi nghiệp sáng tạo Queensland, Úc English
 
4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI
4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI
4.THAM LUAN - HAN QUOC-VN Kinh nghiệm từ Hàn Quốc VI
 
4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN
4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN
4. THAM LUAN - HAN QUOC - Kinh nghiệm từ Hàn Quốc EN
 
1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...
1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...
1. SO KHCN - ENG - Xây dựng Đà nẵng thành trung tâm khởi nghiệp sáng tạo - EN...
 
The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...
The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...
The role of Innovation Ecosystem in supporting Startups go global [Mr. Yi Cha...
 
DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...
DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...
DNES Google IO ext 2022 Báo cáo Hệ sinh thái khởi nghiệp đổi mới sáng tạo Việ...
 
DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022
DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022
DNES - Thành đoàn - Chính sách hỗ trợ khởi nghiệp tại TP Đà Nẵng 2022
 
Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021
Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021
Z0gravity Giải pháp quản lý dự án và quản lý danh mục dự án đầu tư - 2021
 
Dnes introduction Vietnam version 2021
Dnes introduction Vietnam version 2021Dnes introduction Vietnam version 2021
Dnes introduction Vietnam version 2021
 
DNES profile - introduction 2021 English version
DNES profile - introduction 2021 English versionDNES profile - introduction 2021 English version
DNES profile - introduction 2021 English version
 
INVIETNAM - DANANG - HOI AN - TRAVEL GUIDE
INVIETNAM - DANANG - HOI AN - TRAVEL GUIDEINVIETNAM - DANANG - HOI AN - TRAVEL GUIDE
INVIETNAM - DANANG - HOI AN - TRAVEL GUIDE
 
Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19
Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19
Kiên tâm qua khủng hoảng - Chiến đấu và chiến thắng COVID-19
 
Vietnam in the digital era 2020
Vietnam in the digital era 2020Vietnam in the digital era 2020
Vietnam in the digital era 2020
 
Customer experience and loyalty
Customer experience and loyaltyCustomer experience and loyalty
Customer experience and loyalty
 
Quan ly trai nghiem khach hang nielsen
Quan ly trai nghiem khach hang  nielsenQuan ly trai nghiem khach hang  nielsen
Quan ly trai nghiem khach hang nielsen
 

03.egovFrame Runtime Environment Training Book

  • 1. eGovFrame Training Book Runtime Environment eGovFrame Center 2012
  • 2. Table of contents I Overview II Foundation Layer III Persistence Layer IV Presentation Layer Page l 2
  • 3. Runtime Environment Composition Overview Runtime Environment is the foundation of software applications and provides the basic functionality required to run software eGovFrame Runtime Environment Presentation UX Business Logic Persistence Integration Layer Layer Layer Layer Layer Foundation Layer Service Group Page l 3
  • 4. Runtime Environment Composition of eGovFrame Runtime Environment is the foundation of software applications and provides the basic functionality required to run an enterprise application Application Program Runtime Environment UX Layer Persistent Layer Client Screen Presentation Layer DB Biz Logic Layer Integration Layer Foundation Layer Page l 4
  • 5. Composition of the runtime environment Composition of eGovFrame The runtime environment consists of 6 service groups, 38 services. Support MVC, DI, AOP, etc patterns, based on Spring framework Runtime Environment Presentation Layer UX Layer Biz Logic Persistence Layer Integration Layer Layer Ajax Support Internationalization UX/UI Controller Component Biz. Process TBD Data Access DataSource Message Service Management MVC Security HTML5 CSS3 TBD ORM Transaction Naming Service Exception Handling UI Adaptor JavaScript Module App Framework Web Service Foundation Layer AOP Cache Compress/Decompress Encryption/Decryption Excel File Handling File Upload/Download FTP Hot-Deploy ID Generation IoC Container Logging Mail Marshalling/Unmarshalling Object Pooling Property Resource Scheduling String Util XML Manipulation Page l 5
  • 6. Composition of the runtime environment Composition of eGovFrame The runtime environment consists of 6 service groups, 38 services. Support MVC, DI, AOP, etc patterns, based on Spring framework Runtime Environment Presentation Layer UX Layer Biz Logic Persistence Layer Integration Layer Layer Ajax Support Internationalization UX/UI Controller Component Biz. Process TBD Data Access DataSource Message Service Management MVC Security HTML5 CSS3 TBD ORM Transaction Naming Service Exception Handling UI Adaptor JavaScript Module App Framework Web Service Foundation Layer AOP Cache Compress/Decompress Encryption/Decryption Excel File Handling File Upload/Download FTP Hot-Deploy ID Generation IoC Container Logging Mail Marshalling/Unmarshalling Object Pooling Property Resource Scheduling String Util XML Manipulation Page l 6
  • 7. Runtime Environment OSS Overview Runtime Environment consists of a variety of open source software Open Source S/W Version Applied Service Reference URL Spring 3.0.5 IoC Container, AOP, Property, Resource http://www.springsource.org/ Spring Security 2.0.4 Server Security http://static.springsource.org/spring-security/site/ Log4j 1.3 Logging http://logging.apache.org/ EHCache 2.4.1 Cache http://ehcache.sourceforge.net/ Commons Compress 1.1 Compress/Decompress http://commons.apache.org/compress/ Commons VFS 1.0 File Handling http://commons.apache.org/vfs/ Commons FileUpload 1.2.2 File Upload/Download http://commons.apache.org/fileupload Commons Net 3.0.1 FTP http://commons.apache.org/net/ Common Email 1.1 Mail http://commons.apache.org/email/ Commons Pool 1.5.6 Object Pooling http://commons.apache.org/pool/ Jakarta Regexp 1.5 String Util http://jakarta.apache.org/regexp/ Apache Xerces 2 2.2.9 http://xerces.apache.org/xerces2-j/ XML Manipulation JDOM 1.1 http://www.jdom.org/ java simplified encryption (jasypt) 1.7 Encryption/Decryption http://www.jasypt.org/ Apache POI 3.2 http://poi.apache.org/ Excel jXLS 0.9.9 http://jxls.sourceforge.net/ Castor 1.2 http://www.castor.org/ Marshalling/Unmarshalling Apache XML Beans 2.4 http://xmlbeans.apache.org/ Quartz 1.8.5 Scheduling http://www.opensymphony.com/quartz/ Page l 7
  • 8. Features & Effects Overview  Features • Adopt proven open source SW, optimized for e-government projects • Utilize Spring framework as a core foundation that is a pervasive lightweight framework • Apply DI, AOP, MVC, etc for SW architecture and implementation • Provide a common interface for integrating solutions as defining associated standard interface  Effects • Improve development productivity • Improve e-government system reusability • Improve interoperability of e-government system • Standardize e-government application software • Promote Open Source Software • Enhance SMEs competitiveness Page l 8
  • 9. RE*) Open Source - Spring Framework Overview Foundation Layer  Overview • Open source framework supports Java based enterprise applications • POJO based lightweight container (very loosely coupled) • Developed by Rod Johnson (Based on “Expert one-on-one J2EE Design and Development”)  Spring Mission and Goals • Spring should be fun and easier than J2EE in use. • Spring should not depend on the API. • Spring integrates with existing good solutions rather than competing.  EJB Problems • Heavy weight remote model • High complexity + Portability, Difficult to ensure performance and scalability · RE*) : Runtime Environment Page l 9
  • 10. Spring Framework Composition Foundation Layer Spring Framework consists of DAO, ORM, AOP, JEE, Web, based on the core that governs the Bean object life cycle Page l 10
  • 11. IoC Container Foundation Layer  Overview • Manage creating objects and object dependencies by external setting, rather than hard coding within source code • IoC is an abbreviation of the “Inversion of Control” or referred to “Reverse control” • Improve flexibility and scalability  Key Features • Dependency Injection - Inject dependencies among objects in the external setting - Framework determines dependencies(objects) and relationships which will be used at run time • Bean Lifecycle Management - Manage the life cycle of object creation, destruction, etc Page l 11
  • 12. IoC Container Foundation Layer Inversion of Control (IoC) is an object-oriented programming practice where the object coupling is bound at run time by an assembler object and is typically not known at compile time using static analysis. In traditional programming, the flow of the business logic is determined by objects that are statically assigned to one another. With IoC, the flow depends on the object graph that is instantiated by the assembler and is made possible by object interactions being defined through abstractions. The binding process is achieved through dependency injection.  Inversion of control as a design guideline serves the following purposes: • There is a decoupling of the execution of a certain task from implementation. • Every module can focus on what it is designed for. • Replacing modules has no side effect on other modules.  IoC Container The container is an object that implements the concept of Inversion of Control. It manages the object lifecycle from creation to destruction and takes control for all objects.  Dependency Injection (DI) DI is a software design pattern that allows a choice of component to be made at run-time rather than compile time. It is a style of object configuration in which an objects fields and collaborators are set by an external entity, such as bean definition. Page l 12
  • 13. IoC Container Foundation Layer  Key Features • DI (Dependency Injection) A B C Configuration [Module Call Conceptual View – Non DI [Module Call Conceptual View –Use DI • Bean Lifecycle Management Page l 13
  • 14. IoC Container Foundation Layer  Non-IoC/DI vs IoC/DI Non-IoC/DI IoC/DI Bar Bar Foo Foo Baz Baz vs package x.y; package x.y; public class Foo { public Foo(Bar bar, Baz baz) { // ... public class Foo { } } public void process() { <beans> Bar bar = new Bar(); <bean name="foo" class="x.y.Foo"> <constructor-arg> Baz baz = new Baz(); <bean class="x.y.Bar"/> // ... </constructor-arg> } <constructor-arg> <bean class="x.y.Baz"/> } </constructor-arg> </bean> </beans> Page l 14
  • 15. IoC Container Foundation Layer  Container • creates objects and take a role as an assembler to inject dependency between Business Objects objects (POJOs)  Configuration Metadata The Spring Container • represents how the Spring container Configuration instantiates, configures, and assembles the Metadata objects in an application. It is traditionally produces supplied in a simple and intuitive XML format. Fully configured system Ready for use  Bean • is an object that created and managed by Spring IoC Container Page l 15
  • 16. IoC Container Foundation Layer In Spring, the Bean Factory is an IoC container to control beans and inject dependency among them. The Application Context is spring's more advanced container(include Bean Factory) and it adds more enterprise-specific functionality. Normally, the Application Context is used over the BeanFactory.  BeanFactory • The Bean Factory is the actual container which instantiates, configures, and manages a number of beans. (ex: dependency injection, bean lifecyclemanagement) • It is represented by the interface org.springframework.beans.factory.BeanFactory, for which there are multiple implementations.  Application Context • Extend BeanFactory interface and add functionality such as Spring AOP, message resource, internationalization, event processing, etc to develop and run an enterprise application • As the ApplicationContext includes all functionality of the BeanFactory, it is generally recommended that it be used over the BeanFactory Page l 16
  • 17. IoC Container Foundation Layer  Injection Type • Constructor Injection : Configuring dependency through an argument constructor • Setter Injection : Configuring dependency through setters on the object. package x.y; <beans> <bean name="foo" class="x.y.Foo"> public class Foo { <property name="bar"> public void setBar(Bar bar) { <bean class="x.y.Bar" /> // ... </property> } <property name="baz"> <bean class="x.y.Baz" /> public void setBaz(Baz baz) { </property> // ... </bean> } </beans> } Page l 17
  • 18. IoC Container Foundation Layer  XML configuration file • Bean configuration file has <beans/> as root, and provides related Namespace and Schema <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="..." class="..."> <!-- collaborators and configuration for this bean go here --> </bean> <bean id=“xmlEmpDAO” class=“egovframework.example.service.impl.XmlEmpDAO“ /> <bean id=“xmlEmpService” class=“egovframework.example.service.impl.XmlEmpServiceImpl” > <property name=“xmlDAO” ref=“xmlEmpDAO” /> </bean> <bean name=“otherExampleBean” class=“egovframework.example.OtherExampleBean“ /> </beans> Page l 18
  • 19. IoC Container Foundation Layer  Annotation • Available to use Java annotation instead of XML configuration files (Java 5 or higher) • As using annotation, simplify configuration files, and mapping between view pages and objects or methods can be clearly defined. Page l 19
  • 20. IoC Container Foundation Layer  Annotation Type • Using Java Annotation, Spring Bean definitions can be set, then need to add namespace and element <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <context:annotation-config/> </beans> Page l 20
  • 21. IoC Container Foundation Layer  Auto Scan, based on Annotation • Normally declaring all the beans or components in XML bean configuration file, so that Spring container can detect and register beans or component. • Spring is also able to auto scan, detect and instantiate beans from pre-defined project package. • ‘base-package’ attribute is the basic package to find components, can be assigned multiple package with ‘,’ separation mark. • <context:exclude-filter> tag and <context:include-filter> tag are used to state what component is included or excluded to the scanning <?xml version="1.0" encoding="UTF-8"?> <beans ··· > <context:component-scan base-package=“egovframework“/> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/> </context:component-scan> </beans> Page l 21
  • 22. IoC Container Foundation Layer  Annotation type • @Required : Applied to setter method, mark a property as being 'required-to-be-set' (i.e. an annotated (setter) method of a class must be configured to be dependency injected with a value) ethods public class SimpleMovieLister { // the SimpleMovieLister has a dependency on the MovieFinder private MovieFinder movieFinder; // a setter method so that the Spring container can 'inject' a MovieFinder @Required public void setMovieFinder(MovieFinder movieFinder) { this.movieFinder = movieFinder; } // business logic that actually 'uses' the injected MovieFinder is omitted... } • @Autowired : auto wire a bean on the setter method, constructor or a field. It can autowire property in a particular bean • @Resource : marks a resource that is needed by the application. It finds the target bean with name @Service public UserServiceImpl implements UserService { @Resource (name="userDAO") private UserDAO userDAO; } • @PostConstruct, @PreDestroy : Use to assign Instantiation callback, Destruction callback methods Page l 22
  • 23. IoC Container Foundation Layer  @Resource @Resource annotation의 name 값으로 대상 bean을 찾을 수 있다. @Resource annotation은 field 또는 메소드에 사용할 수 있다. public class SimpleMovieLister { private MovieFinder movieFinder; @Resource(name="myMovieFinder") public void setMovieFinder(MovieFinder movieFinder) { this.movieFinder = movieFinder; } } Page l 23
  • 24. IoC Container Foundation Layer  Auto-detecting components • Set Name- Set bean name with @Component, @Repository, @Service, @Controller annotation’s name value @Service("myMovieLister") @Repository public class SimpleMovieLister { public class MovieFinderImpl implements MovieFinder { // ... // ... } }  ApplicationContext for web application • Spring provides classes for easy WebApplicationContext setting • Add following settings in web.xml for ApplicationContext setting with the Listener (Servlet 2.4 or later) <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> Page l 24
  • 25. AOP Foundation Layer  Overview • Aspect-oriented programming (AOP) is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns • AOP is programming techniques to support the processing of modularizing Logging, security, transactions, and common functions without changing existing business logic Configuration File AOP Applied OOP OOP + AOP Page l 25
  • 26. AOP Foundation Layer  Main Concept • Advice, JoinPoint, Pointcut, Weaving, Aspect Pointcut JoinPoint Weaving Advice  Benefits • Remove duplicate code • Improve readability of the business logic • Improve productivity • Improve reusability • Increase ease of change Page l 26
  • 27. AOP Foundation Layer  Relations for AOP components A set of Join point Join point is the time (condition: select*) which a method is called in Spring Source Code EmployeeService Aspect 소스코드 Processing what you want to apply insertEmployee() updateEmployee() Pointcut selectEmployeeList() Advice selectEmployee() deleteEmployttList() Joinpoint Page l 27
  • 28. AOP Foundation Layer  Develop functions of cross-cutting concerns (Create Advice) • Advice, JoinPoint, Pointcut public class AdviceUsingXML { public void beforeTargetMethod(JoinPoint thisJoinPoint) { Class clazz = thisJoinPoint.getTarget().getClass(); String className = thisJoinPoint.getTarget().getClass().getSimpleName(); String methodName = thisJoinPoint.getSignature().getName(); // Obtain the target method Logger and log the current class and method status information Log logger = LogFactory.getLog(clazz); logger.debug(className + "." + methodName + " executed."); } }  Apply AOP (Create setting file) • Remove duplicated code <aop:config> <aop:pointcut id="targetMethod" expression="execution(* egovframework.rte.fdl.aop.sample.*Sample.*(..))" /> <aop:aspect ref="adviceUsingXML"> <aop:before pointcut-ref="targetMethod" method="beforeTargetMethod" /> </aop:aspect> </aop:config> Page l 28
  • 29. Data Source Persistence Layer  Overview • Service for providing database connection • Remove dependencies about business logic and database connection  Key Features • Service to connect database - Create database connection, using JDBC driver <bean id="dataSource” class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${driver}" /> <property name="url" value="${dburl}" /> <property name="username" value="${username}" /> <property name="password" value="${password}" /> </bean> • driverClassName : JDBC driver class name • url : Database access JDBC URL • username : Database access username • password : Database access password Page l 29
  • 30. Data Source Persistence Layer  Key Features • DBCP DataSource - Database connection module, using JDBC driver. This is database connection pool, called Commons DBCP in Jakarta projects. <bean id="dataSource” class="org.apache.commons.dbcp.BasicDataSource” destroy-method="close"> <property name="driverClassName" value="${driver}" /> <property name="url" value="${dburl}" /> <property name="username" value="${username}" /> <property name="password" value="${password}" /> <property name="defaultAutoCommit" value="false" /> <property name="poolPreparedStatements" value="true" /> </bean> • driverClassName : jdbc driver class name • url : DataBase url • username : DataBase access user name • password : DataBase access password • defaultAutoCommit : configure auto-commit function about connection • poolPreparedStatements : PreparedStatement configuration (user or not) Page l 30
  • 31. Data Access Persistence Layer  Overview • Provide a service to respond in a consistent manner for a variety of database solutions and database access technologies • Improve business efficiency by providing abstract data access method • SQL statement can be mapped easily to JavaBeans(or Map), using iBATIS which apply simple XML technology rather than java code to access a relational database  Key features • Provide an abstraction access method for JDBC (Do not directly call JDBC related API) • Support removing SQL statement from Java source code (Ensure ease of management / maintenance / tuning) • Support various binding/mapping for input/output objects of Query execution • Support dynamic query change through dynamic SQL • Support a variety of DB processing (Batch SQL, Paging, Callable statement, BLOB/CLOB, etc) Page l 31
  • 32. Data Access Persistence Layer  Features • iBATIS is a persistence framework that emphasize on simplicity and minimize the repetitive and complex DB query using SQL Map - Support Stored Procedure with XML or mapping between SQL statements and Java objects, as emphasis on simplicity, one of iBATIS main ideas - Persistence framework, developed by Clinton Begin(Apache Software Foundation) in 2001 Elements iBATIS Hibernate comparison Hibernate takes more time due to Round Trip Delay Time Short Long features such as automatic generation of query Flexibility Good Poor Learning Curve Short Long iBATIS is much more similar to JDBC SQL knowledge Should be higher Do not required much Page l 32
  • 33. Spring with iBatis Persistence Layer  Spring and iBATIS • In order to use iBATIS in Spring, define the sqlMapClient of iBATIS like below • Bean definition (context-sqlMap.xml) - id and class name are fixed values - dataSource : make Spring manages DataSource as using DataSource bean id which configured in Spring - configLocation : configure the location of SqlMap Configuration file다 <beans . . .> <!-- SqlMap setup for iBATIS Database Layer --> <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean" p:dataSource-ref="dataSource" p:configLocation-ref="classpath:/egovframework/sqlmap/rte/sql-map-config.xml" /> </beans> Page l 33
  • 34. Spring with iBatis Persistence Layer  Persistence Layer development sequence, using iBATIS • Define SqlMapClient Bean (context-sqlMap.xml) • Define the location of SQL Map XML in SQL Map Config XML • Configure SQL related information in SQL Map XML files • Create a DAO class Extends EgovAbstractDAO class which inherits SqlMapClientDaoSupport to make DB query and run, using SQL Map XML query id Page l 34
  • 35. MVC Presentation Layer  Overview • MVC(Model-View-Controller) pattern separates code by Model, View, Controller 3 factors, depending on functions - Model : objects include application data and business logic - View : display the information of model to users - Controller : intermediary of Model and View (Reflect the status of model change, based on the user request and select view for a response) • MVC pattern reduces dependency by separating the UI code and business code, increases reusability and can be easier to change • Though ‘MVC pattern’ is not used only for Web Framework, ‘MVC service’ in eGovFrame means Web MVC Framework utilizing MVC pattern Page l 35
  • 36. MVC Presentation Layer  Relationship and flow between Spring MVC components • When client’s request comes in, the DispatcherServlet first receives the request. • The DispatcherServlet consults the HandlerMapping and invokes the Controller associated with the request. • The Controller process the request by calling the appropriate service methods and returns a ModeAndView object to the DispatcherServlet. The ModeAndView object contains the model data and the view name. • The DispatcherServlet sends the view name to a ViewResolver to find the actual View to invoke. • Now the DispatcherServlet will pass the model object to the View to render the result. • The View with the help of the model data will render the result back to the user. Page l 36
  • 37. MVC Presentation Layer  Spring MVC core components • DispatcherServlet - The front controller of Spring MVC Framework. Supervise life cycle of web request and respond. • HandlerMapping - Decide which controller will process the target URL when web request comes in. • Controller - Perform the business logic and the result data is reflected in the ModelAndView. • ModelAndView - Consist of model data object which reflects controller’s result and target page information (or view object). • ViewResolver - Provide a mapping between view names and actual views. • View - Display the model object which is result data. Page l 37
  • 38. Page l 38