Posted date
Updated date
Nablarch System Development Guide
Table of contents
- Preface
- Purpose of this document
- Who should read this document?
- Notes on reading
- Overall picture
- Project plan
- Requirements definition phase
- Requirement definition
- Architecture design
- Checking the project deliverables
- Test plan
- Creating a development guide for a project
- Design phase
- Standardization
- Programming and Unit testing phase
- Initial build of Nablarch project
- Setting up the team development environment
- Preparation of setup guide for development environment
- Establishment of development standards
- Integration test phase
- Preparation for integration test (communication confirmation)
- System test phase
- Maintenance operation
- Nablarch Pattern Collection
- Commonly used patterns in Nablarch
- Nablarch anti-pattern
- Nablarch Batch Processing Pattern
- Classification by startup method
- Classification by input/output
- Important points
- Asynchronous Operation in Nablarch
- To sending emails
- Nablarch Anti-pattern
- Web application
- Nablarch batch
- JSR352 batch
- Customization of UI Standards
- UI standard (screen)
- UI standard (screen) separate volume_UI parts catalog
- Examination of Test Items
- Collecting test viewpoints
- Extraction of test viewpoint
- Nablarch Environment Construction
- Generating projects from archetypes
- Component settings
- Introduction of static analysis tool
- Java Style Guide
- Setting Up the Team Development Environment
- Preparation of Setup Guide for Development Environment
- xxx Project development environment construction guide
- Prerequisites
- Development environment construction procedure
- Package Configuration Study
- Concept of package configuration
- Example of division by business function
- Example of division by class role
Package Configuration Study
Concept of package configuration
When it comes to the package configuration there is “no certain way to do this”, but there are basic concepts. Consider package configuration according to the project characteristics.
Basically, it is desirable to decide on a package structure that facilitates the division of labor. If you divide up the project so that the scope of responsibility for the deliverables is clear, such as assigning a member in charge to each package in consideration of the project structure, it will be easier to proceed with development.
The following 2 ways (or a combination) can be used to consider the package configuration.
- Division by business function
- Division by class role
As an example, the “member management system” has the following business functions.
Business name | Package name |
---|---|
Enrollment | enrollment |
Attribute change | settings |
Point | point |
Example of division by business function
When divided by business function, it is as follows.
- com.example.member
- enrollment
- XXXAction
- XXXForm
- XXXDto
- YYYAction
- YYYForm
- YYYDto
- ZZZService
- settings
- (omitted)
- point
- (omitted)
- enrollment
When development is carried out in a project, work is often assigned by grouping the business functions. For example, assigned as follows:
- Company A is in charge of xxx subsystem
- B is in charge of yyy function
In this case, dividing a package into business functions makes it easier to divide labor and parallel development because only that member’s work is stored under the package. For example, if an unused class is under the package, the person in charge of it is responsible for reviewing the need and removing it.
However, if segregation of a package is too big, development becomes more difficult as too many classes are stored in one package. In such a case, the number of classes in 1 package can be reduced by subdividing the package into multiple hierarchies. For example, if the function of “enrollment” business expands, create a hierarchy like enrollment/review
or enrollment/campaign
Example of division by class role
Division according to class role is as follows.
- com.example.member
- action
- XXXAction
- YYYAction
- (omitted)
- form
- XXXForm
- YYYForm
- (omitted)
- dto
- XXXDto
- YYYDto
- (omitted)
- service
- ZZZService
- (omitted)
- action
The so-called layered architecture is easier to achieve with this configuration. This is not very common, but sometimes the work is divided by layers rather than by business functions. (such as presentations and domains) In such cases, it is easier to divide the package according to class role.
If the system size is too large, development becomes difficult due to too many classes in the package. The problem cannot be solved with this package configuration, and large projects should avoid this configuration.
Example of division by class role – business function
The above two can also be combined.
- com.example.member
- action
- enrollment
- XXXAction
- YYYAction
- settings
- (omitted)
- point
- (omitted)
- enrollment
- form
- enrollment
- XXXForm
- YYYForm
- settings
- (omitted)
- point
- (omitted)
- enrollment
- dto
- XXXDto
- YYYDto
- settings
- (omitted)
- point
- (omitted)
- service
- enrollment
- ZZZService
- settings
- (omitted)
- point
- (omitted)
- enrollment
- action
In this case, the Action classes are aggregated into a single package. Since com.example.member.action
can be specified as the root package, it is easier to make entries in the routes.xml.
Example of division by business function – class role
At first glance it looks good, but it is difficult to handle with routes.xml of Nablarch because it allows multiple action packages. There is a disadvantage that if you try to forcibly use this method, the URL length will be longer.
- com.example.member
- enrollment
- action
- XXXAction
- YYYAction
- form
- XXXForm
- YYYForm
- dto
- XXXDto
- YYYDto
- service
- ZZZService
- action
- settings
- action
- (omitted)
- point
- (omitted)
- enrollment
This content is compliant with Creative Commons 4.0 “Attribution-ShareAlike”.