3.2. intra-mart Application Development Summary¶
Topics
Note
How are these 2 Development Models used?
JavaEE Development Model
This development model would improve development productivity in large-scale system development project through component re-utilization or parallel distributed development.
Script Development Model
This development model would improve productivity in smaller system developmeent project, bacause business processes are stated in one file instead of depending on the component architecture.
- Even in the large-scale system development, you can reduce development cost by combining these 2 models like using the light programming method for screens with minimum component re-utilization (Master Maintenance Screen etc.). (There would be too much overhead in developing everything in JavaEE model.)
- im-BizAPI (Java business components) can be commonly used by both development models.
3.2.1. Application Development by Script Development Model¶
3.2.1.1. Presentation Page¶
Presentation page corresponds to the User Interface part. Its extension is fixed and is [.html].Developers or end users would create Web-based presentation pages by utilizing “e Builder (Script Development Function)”. Moreover, since the presentation pages are implemented as HTML files, user interface part can be extracted during Web system development and given to the home page designer for work.By adding the <IMART> tag to the HTML files that are generated by the home page creation tools and so on, you can associate them with the JavaScript in the Function Container and call them. You can also add the <IMART> extension tag to call user definition function.Completed HTML files would, immediately after their page presentation, operate at high speed with close linkage with the database.
3.2.1.2. Function Container¶
Function Container corresponds to the Business Logic part that operates on Application Runtime in the multi-layer architecture. File extension is [.js] and fixed. Since a Function Container and a Presentation Page make one pair, same file label names should be used for them.Developers are supposed to state and create JavaScript in the function container, which will be called by the presentation page.Specifically, developers will choose the necessary objects and functions from the functions provided by intra-mart Accel Platform, and then state and create the business logic in JavaScript utilizing “e Builder (Script Development Function)”, which would use these objects and functions that operate on the server side. SQL statement for database should also be stated in the function container.Actual connection to RDB or issuance of SQL is to be performed by intra-mart Accel Platform. Therefore, developers do not need to worry about the detail session management or transaction management.Business logic which has been created will be called by the <IMART> tag of the presentation page and executed. Details of the functions provided by intra-mart Accel Platform are shown in [intra-mart API List].Since developers can code these Scripts in JavaScript and not in the Java language that could be difficult to learn, they should be able to develop a full-scale Web system that collaborates with the database with an extended effort of conventional home page again.It should also be noted that significant function echancement has been made in the Script Development Model of intra-mart Accel Platform to achieve productivity and maintenance improvement in the following areas :
- Updated JavaScript engine to the latest one and achieved high speed processing
- URLs got simpler. Linkage from other systems to each screen got easier.
- Supported exception processes
- Added Validation function
- Supported Stream for file processing (large capacity file can now be handled)
- Provided API for New Database (implemented exporting mechanism of SQL statement)
3.2.2. Application Development by JavaEE Development Model¶
Web system development by JavaEE has proliferated, because JavaEE is a common platform which is independent of particular OS or Web application server.However, since the development by JavaEE is based on Java, it would require advanced knowledge and experience such as object oriented development and JavaEE knowledge, which might be difficult for beginners. Moreover, because of the development flexibility where you can do anything as long as you conform to the JavaEE development conventions, different systems engineers would present different development styles.intra-mart Accel Platform has resolved these problems by utilizing JavaEE Framework (Seasar2(SAStruts+S2JDBC)), and has significantly enhanced the productivity of JavaEE development model.
3.2.2.1. JavaEE Development Framework¶
With regard to Web system development by JavaEE, there are many common parts in structure, and development productivity would be significantly enhanced by utilizing this commonality. On intra-mart Accel Platform all the common processes required for JavaEE development are offered as JavaEE frameworks, and unique parts are created by developers as components.
3.2.2.1.1. Advantages of Frameworks in JavaEE Development Model¶
There are following advantages in utilizing JavaEE frameworks for JavaEE development.
JavaEE based Development Platform Areas that require advanced knowledge are hidden, and developers create application logic as components.Even without the base knowledge, the completed system will become JavaEE recommended model,and MVC model can be implemented easily (program structure is integrated for better maintenance). Productivity Improvement All the common parts are provided in the Framework, and so reutilization of components is enhanced.Overall team productivity will be improved. (Sharing of components by team, Development Time reduction by parallel distributed development) Maintenanceability Improvement Base application program remains unchanged when the components are newly added.In this mechanism, when there is a function change, only the affected components will be modified, and other parts would not be affected. Reduction of Test Phase Period and Quality Improvement In this test phase it is not necessary to check the framework part.It would be easy to classify the problems. DI container will allow easy replacementof test mock (prototype, tentative implementation) and production components.During the installation following rules should be observed in utilizing the framework.
Roles and implementation contents are defined for each component.
By just following the rules there would be no need to consider the mechanism for componentization or commonality at the system design time.An attempt to implement various functions into one component should be avoided.
If you pack too many functions in one component, program readability, maintenanceability, and ease of reutilization would be affected.
By following these rules you can keep the application structure consistent. As long as you understand and use the frameworks, you can implement the structure that anybody can maintain.
3.2.2.2. Seasar2¶
Seasar2 is a framework for the efficient execution of large-scale development by J2EE/JavaEE. In Seasar2 highly productive program development has been made possible by reducing the required setting files than before and by the descriptions that have isolated dependencies.A variety of related software and tools have been developed and published, namely [S2Container] of DI Container and [S2AOP] offering AOP function as the central elements, [S2Dao] and [S2JDBC] for database access, [S2Struts] and [SAStruts] for easier linkage with Struts framework, and [S2JSF] for the generation of dynamic Web pages.Among these Seasar2 products, following 2 products have been adopted by intra-mart Accel Platform as JavaEE development frameworks.
- SAStruts(Super Agile Struts)
This product wraps Struts for easy use, which is a defacto standard of framework Web framework in the presentation layer (screen related).
- S2JDBC
This product is an O/R Mapper that aims at achieving the 10X productivity increase of Seasar2 standard database access framework database programming.
3.2.2.2.1. Positioning of SAStruts and S2JDBC¶
Note
About JavaEE Blue Print
This is a development guideline for JavaEE applications. It does not include functional specifications. It will rather serve as a “textbook” which demonstrates how to design a system by presenting sample application programs.
3.2.2.3. Application Development by SAStruts and S2JDBC¶
In the application development by SAStruts and S2JDBC, components such as Action, Form, JSP, DTO, Logic, Service, and Entity are created. Requests from the client will be processed in the sequence shown below. .. figure:: /_static/images/sa_s2jdbc.png :scale: 35%
Component Name Role Action
- Receives the request (form) from the client, and executes business logic
- Business logic is severed as a service and called by Action (it can also be defined inside Action)
Form
- Stores screen input information
- It is on object that receives request parameter in Action
- It corresponds to ActionForm class of Struts
JSP
- Screen
- It is forwarded after Action is processed. HTML returned to the browser is generated
- Uses the combination of SAStruts tag library, EL formula, JSTL etc.
EL formula (Expression Language)
It is a formula which is stated in ${~} format and gives simple description of object accessJSTL (Java Server Pages Standard Tag Library)
Tag which is standardized in JSP2.0DTO
- Data Object
- Stores data object other than Form or Entity
Example : Object for Screen Display, Search Condition, etc.Logic
- Business Logic
- Accesses the DTO (Search Condition), and calls Service (DB Access)
Service
- Business Logic
- Operations on Entity
- Defines database access process
If it is defined in Action, action process and database process will get mixed, and source code gets bigger.It is created to make database access process common and to separate database access process part from action.Entity It is an object that is mapped to the database table
3.2.2.4. TERASOLUNA Global Framework¶
TERASOLUNA Global Framwork is a Java Development Framework Stack published by NTT Data. ( http://terasoluna.org/ )As a framework stack, it has the structure of [SpringMVC 3.2+SpringFramework 3.2+JPA2.0, MyBATIS2.3.5+Common Libraries] as shown in the figure below.