2.1. Stack of TERASOLUNA Server Framework for Java (5.x)

Caution

This version is already obsolete. Please check the latest guideline.

2.1.1. Summary of Software Framework of TERASOLUNA Server Framework for Java (5.x)

Software Framework being used in TERASOLUNA Server Framework for Java (5.x) is not a proprietary Framework but a combination of various OSS technologies around Spring Framework.

../_images/introduction-software-framework.png

2.1.2. Main Structural Elements of Software Framework

Libraries which constitute TERASOLUNA Server Framework for Java (5.x) are as follows:

../_images/introduction-software-stack.png

2.1.2.1. DI Container

Spring Framework is used as DI Container.

2.1.2.2. MVC Framework

Spring MVC is used as Web MVC Framework.

2.1.2.3. O/R Mapper

This guideline assumes the use of any one of the below.

Note

To be precise MyBatis is a “SQL Mapper”, but it is classified as “O/R Mapper” in this guidelines.

Warning

Every project must not adopt JPA. For situations in which table design has been done and “Most of the tables are not normalized”, “The number of columns in the table is too large” etc, use of JPA is difficult.

Furthermore, this guideline does not explain the basic usage of JPA. Hence, it is pre-requisite to have JPA experience people in the team.

2.1.2.4. View

JSP is used as View.

Use the following to standardize the view layout.

2.1.2.5. Security

Spring Security is used as the framework for Authentication and Authorization.

Tip

In addition to providing a mechanism of authentication and authorization in Spring Security 3.2, the mechanism has been enhanced to protect a Web application from malicious attackers.

For mechanism to protect Web applications from malicious attackers, Refer,

2.1.2.6. Validation

2.1.2.7. Logging

  • The SLF4J API is used for Logger.
    • The Logback API is used for implementation of Logger.

2.1.3. OSS Versions

List of OSS being used in version 5.1.0.RELEASE.

Tip

From version 5.0.0.RELEASE onwards, adopted the mechanism of importing <dependencyManagement> of Spring IO platform.

By importing the <dependencyManagement> of Spring IO platform,

  • Spring Framework offering library
  • Spring Framework dependent OSS library
  • Spring Framework compatible OSS library

dependencies resolved and OSS version to be used in the TERASOLUNA Server Framework for Java (5.x) is following the rule of Spring IO platform definition.

Furthermore, Spring IO platform version is 2.0.1.RELEASE specified in version 5.1.0.RELEASE.

Type GroupId ArtifactId Version Spring IO platform Remarks
Spring org.springframework spring-aop 4.2.4.RELEASE *  
Spring org.springframework spring-aspects 4.2.4.RELEASE *  
Spring org.springframework spring-beans 4.2.4.RELEASE *  
Spring org.springframework spring-context 4.2.4.RELEASE *  
Spring org.springframework spring-context-support 4.2.4.RELEASE *  
Spring org.springframework spring-core 4.2.4.RELEASE *  
Spring org.springframework spring-expression 4.2.4.RELEASE *  
Spring org.springframework spring-jdbc 4.2.4.RELEASE *  
Spring org.springframework spring-orm 4.2.4.RELEASE *  
Spring org.springframework spring-tx 4.2.4.RELEASE *  
Spring org.springframework spring-web 4.2.4.RELEASE *  
Spring org.springframework spring-webmvc 4.2.4.RELEASE *  
Spring org.springframework.data spring-data-commons 1.11.2.RELEASE *  
Spring org.springframework.security spring-security-acl 4.0.3.RELEASE *  
Spring org.springframework.security spring-security-config 4.0.3.RELEASE *  
Spring org.springframework.security spring-security-core 4.0.3.RELEASE *  
Spring org.springframework.security spring-security-taglibs 4.0.3.RELEASE *  
Spring org.springframework.security spring-security-web 4.0.3.RELEASE *  
MyBatis3 org.mybatis mybatis 3.3.0   *1
MyBatis3 org.mybatis mybatis-spring 1.2.3   *1
JPA(Hibernate) antlr antlr 2.7.7 * *2
JPA(Hibernate) dom4j dom4j 1.6.1 * *2
JPA(Hibernate) org.hibernate hibernate-core 4.3.11.Final * *2
JPA(Hibernate) org.hibernate hibernate-entitymanager 4.3.11.Final * *2
JPA(Hibernate) org.hibernate.common hibernate-commons-annotations 4.0.5.Final * *2 *4
JPA(Hibernate) org.hibernate.javax.persistence hibernate-jpa-2.1-api 1.0.0.Final * *2 *4
JPA(Hibernate) org.javassist javassist 3.18.1-GA * *2
JPA(Hibernate) org.jboss jandex 1.1.0.Final * *2 *4
JPA(Hibernate) org.jboss.logging jboss-logging-annotations 1.2.0.Final * *2 *4 *5
JPA(Hibernate) org.jboss.spec.javax.transaction jboss-transaction-api_1.2_spec 1.0.0.Final * *2 *4
JPA(Hibernate) org.springframework.data spring-data-jpa 1.9.2.RELEASE * *2
DI javax.inject javax.inject 1 *  
AOP aopalliance aopalliance 1 *  
AOP org.aspectj aspectjrt 1.8.7 *  
AOP org.aspectj aspectjweaver 1.8.7 *  
Log output ch.qos.logback logback-classic 1.1.3 *  
Log output ch.qos.logback logback-core 1.1.3 * *4
Log output org.lazyluke log4jdbc-remix 0.2.7    
Log output org.slf4j jcl-over-slf4j 1.7.13 *  
Log output org.slf4j slf4j-api 1.7.13 *  
JSON com.fasterxml.jackson.core jackson-annotations 2.6.4 *  
JSON com.fasterxml.jackson.core jackson-core 2.6.4 *  
JSON com.fasterxml.jackson.core jackson-databind 2.6.4 *  
JSON com.fasterxml.jackson.datatype jackson-datatype-joda 2.6.4 *  
Input check javax.validation validation-api 1.1.0.Final *  
Input check org.hibernate hibernate-validator 5.2.2.Final *  
Input check org.jboss.logging jboss-logging 3.3.0.Final * *4
Input check com.fasterxml classmate 1.1.0 * *4
Bean conversion commons-beanutils commons-beanutils 1.9.2 * *3
Bean conversion net.sf.dozer dozer 5.5.1   *3
Bean conversion net.sf.dozer dozer-spring 5.5.1   *3
Bean conversion org.apache.commons commons-lang3 3.3.2 * *3
Date operation joda-time joda-time 2.8.2 *  
Date operation joda-time joda-time-jsptags 1.1.1   *3
Date operation org.jadira.usertype usertype.core 3.2.0.GA   *2
Date operation org.jadira.usertype usertype.spi 3.2.0.GA   *2
Connection pool org.apache.commons commons-dbcp2 2.1.1 * *3
Connection pool org.apache.commons commons-pool2 2.4.2 * *3
Tiles commons-digester commons-digester 2.1 * *3
Tiles org.apache.tiles tiles-api 3.0.5 * *3
Tiles org.apache.tiles tiles-core 3.0.5 * *3
Tiles org.apache.tiles tiles-jsp 3.0.5 * *3
Tiles org.apache.tiles tiles-servlet 3.0.5 * *3
Tiles org.apache.tiles tiles-template 3.0.5 * *3 *4
Tiles org.apache.tiles tiles-autotag-core-runtime 1.1.0 * *3 *4
Tiles org.apache.tiles tiles-request-servlet 1.0.6 * *3 *4
Tiles org.apache.tiles tiles-request-api 1.0.6 * *3
Tiles org.apache.tiles tiles-request-jsp 1.0.6 * *3 *4
Utility com.google.guava guava 17.0 *  
Utility commons-collections commons-collections 3.2.2 * *3
Utility commons-io commons-io 2.4 * *3
Servlet org.apache.taglibs taglibs-standard-jstlel 1.2.5 *  
Servlet org.apache.taglibs taglibs-standard-spec 1.2.5 * *4
Servlet org.apache.taglibs taglibs-standard-impl 1.2.5 * *4
  1. Dependent libraries, when MyBatis3 is used for data access.
  2. Dependent libraries, when JPA is used for data access.
  3. Libraries which are not dependent on Common Library, but recommended in case of application development using TERASOLUNA Server Framework for Java (5.x).
  4. Libraries that are supported by Spring IO platform, but library that relies individually.
    (Library is not managed as dependencies in Spring IO platform)
  5. Library versions that are applied in the Spring IO platform is a Beta or RC (Release Candidate)
    (Library that explicitly specify the GA version at TERASOLUNA Server Framework for Java (5.x))

2.1.4. Building blocks of Common Library

Common Library includes + alpha functionalities which are not available in Spring Ecosystem or other dependent libraries included in TERASOLUNA Server Framework for Java (5.x). Basically, application development is possible using TERASOLUNA Server Framework for Java (5.x) without this library but “convenient to have” kind of existence.

No. Project Name Summary Java source-code availability
(1) terasoluna-gfw-common Provide general-purpose functionalities and dependency definitions irrespective of Web. Yes
(2) terasoluna-gfw-string Provide function related to string processing. (Add from 5.1.0) Yes
(3) terasoluna-gfw-codepoints Provide function to check whether the code point constituting target string is incorporated in the codepoint set.(Add from 5.1.0) Yes
(4) terasoluna-gfw-validator Provide by adding a constraint annotation of generic Bean validation. (Add from 5.1.0) Yes
(5) terasoluna-gfw-jodatime Provide function that depends on Joda Time and dependency relation definition. (Add from 5.0.0) Yes
(6) terasoluna-gfw-web Provide function to be used while creating a Web application and dependency relation definition. Function not dependent on View and dependency relation definition are consolidated. Yes
(7) terasoluna-gfw-web-jsp Provide function and dependency relation definition to be used while creating a Web application which adopts JSP in View. Yes
(8) terasoluna-gfw-mybatis3 Provide dependency definitions for using MyBatis3. No
(9) terasoluna-gfw-jpa Provide dependency definitions for using JPA. No
(10) terasoluna-gfw-security-core Provide dependency definitions for using Spring Security (other than Web). No
(11) terasoluna-gfw-security-web Provide dependency definitions for using Spring Security (related to Web) and extended classes of Spring Security. Yes
(12) terasoluna-gfw-recommended-dependencies Provide dependency definitions of recommended libraries that doesn’t depends on web. No
(13) terasoluna-gfw-recommended-web-dependencies Provide dependency definitions of recommended libraries that depends on web. No
(14) terasoluna-gfw-parent Provide dependency libraries management and recommended settings of build plugins. No

The project which does not contain the Java source code, only defines library dependencies.

In addition, project dependencies are as follows:

../_images/FrameworkStackProjectDependencies.png

2.1.4.1. terasoluna-gfw-common

terasoluna-gfw-common provide following components.

Classification Component Name Description
Exception Handling Exception Class Provide general exception classes.
  Exception Logger Provide logger class for logging the exception that occurred in application.
  Exception Code Provide mechanism (classes) for resolving the exception code (message ID) that corresponds to the exception class.
  Exception Logging Interceptor Provide interceptor class of AOP for logging the exception that occurred in domain layer.
System Date System Date Time Factory Provide classes for retrieving the system date time.
Codelist CodeList Provide classes for generating CodeList.
Database Access (Common) Query Escape Provide class for escape processing of value to bind into the SQL and JPQL.
  Sequencer Provide classes for retrieving the sequence value.

2.1.4.2. terasoluna-gfw-string

terasoluna-gfw-string provides following components.

Classification Component Name Description
String Processing Half width to full width conversion Provide a class which carries out a process wherein half width character of input string is converted to full width and a process wherein full width character is converted to half width based on mapping table of half width string and full width string.

2.1.4.3. terasoluna-gfw-codepoints

terasoluna-gfw-codepoints provides following components.

Classification Component Name Description
String Processing Codepoint check Provide a class which checks whether the codepoint constituting target string is incorporated in the codepoint set.
Input Validation Bean validation constraint annotation for codepoint check Provide constraint annotation to carry out Bean validation for codepoint check.

2.1.4.4. terasoluna-gfw-validator

terasoluna-gfw-validator provides following components.

Classification Component name Description
Input Validation Bean Validation constraint annotation for byte length check Provide a constraint annotation to check whether the byte length in the character code of input value is less than or equal to specified maximum value, and greater than or equal to specified minimum value, using Bean Validation.
  Bean Validation constraint annotation for field value comparison correlation check Provide a constraint annotation to check magnitude correlation of two fields using Bean Validation.

2.1.4.5. terasoluna-gfw-jodatime

terasoluna-gfw-jodatime provide following components.

Classification Component Name Description
System Date System Date Time Factory for Joda Time Provide classes for retrieving the system date time using the Joda Time API.

2.1.4.6. terasoluna-gfw-web

terasoluna-gfw-web provide following components.

Classification Component Name Description
Double Submit Protection Transaction Token Check Provide mechanism (classes) for protecting Web Application from double submitting of request.
Exception Handling Exception Handler Provide exception handler class(sub class of class that provided by Spring MVC) for integrating with exception handling components that provided from common library.
  Exception Logging Interceptor Provide interceptor class of AOP for logging the exception that handled by Spring MVC.
Codelist Populate CodeList interceptor Provide interceptor class of Spring MVC for storing CodeList information into request scope, for the purpose of retrieving CodeList from View.
File Download General Download View Provide abstract class for retrieving data from input stream and writing to stream for download.
Logging ServletFilter for storing Tracking ID Provide Servlet Filter class for setting Tracking ID into MDC(Mapped Diagnostic Context) and request scope and response header, for the purpose of improving traceability. (If does not exist a Tracking ID in request header, generate a Tracking ID by this component)
  General ServletFilter for storing MDC Provide abstract class for storing any value into Logger’s MDC
  ServletFilter for clearing MDC Provide ServletFilter class for clearing information that stored in Logger’s MDC.

2.1.4.7. terasoluna-gfw-web-jsp

terasoluna-gfw-web-jsp provides following components.

Classification Component name Description
Double Submit Protection JSP tag for transaction token output Provide a JSP tag library to output transaction tokens as hidden items.
Pagination JSP Tag for displaying Pagination Links Provide JSP Tag Library for displaying Pagination Links using classes that provided by Spring Data Commons.
Message Management JSP Tag for displaying Result Messages Provide JSP Tag Library for displaying Result Messages.
EL Functions EL Functions for XSS countermeasures Provide EL Functions for XSS countermeasures.
  EL Functions for URL Provide EL Functions for URL as URL encoding.
  EL Functions for DOM conversion Provide EL Functions for DOM conversion.
  EL Functions for Utilities Provide EL Functions for general utilities processing.

2.1.4.8. terasoluna-gfw-security-web

terasoluna-gfw-security-web provide following components.

Classification Component Name Description
Logging ServletFilter for storing name of authenticated user Provide ServletFilter class for setting name of authenticated user into MDC, for the purpose of improving traceability.