6. ๐ง Extension & Customization
6.1 Development Process
The development process based on HONGIKINGAN CMS consists of the following steps.
6.1.1 Development Stages
Development using HONGIKINGAN CMS follows the following process:
๐ Requirements Analysis
- Define functional requirements
- Define non-functional requirements
- Set system scope
๐๏ธ Design & Architecture
- Database design
- Screen design
- Interface design
- Architecture design
๐ป Implementation & Coding
- Feature implementation
- Unit testing
- Code review
๐งช Testing & Debugging
- Integration testing
- System testing
- Performance testing
- Bug fixing
6.1.2 eGovFrame Compatibility Maintenance Development
Since HONGIKINGAN CMS is based on eGovFrame, the following items must be observed during development:
Standard Architecture Compliance
- MVC pattern compliance
- Clear separation between layers
- Interface-based design
Standard Development Environment Utilization
- Utilize eGovFrame development environment
- Utilize standard libraries
Standard Coding Rules Compliance
- Naming convention compliance
- Comment rule compliance
- Code formatting rule compliance
6.1.3 Development Environment Configuration
The HONGIKINGAN CMS development environment is configured as follows:
Web Project Structure
- Web projects are developed in [WEB] project
- Backend management is implemented in [BO] project in a dual structure
Configuration Management
- Utilize configuration management tools such as SVN, GIT
- Version management and change history management
Build & Deployment
- Build using Maven
- CI/CD configuration possible using Jenkins, etc.
6.2 Project Configuration
HONGIKINGAN CMS is configured with the following project structure.
6.2.1 Project Structure
humanframe (Root Project)
โโโ humanframe.core (Library)
โโโ humanframe.backoffice (Admin Module)
โโโ humanframe.web (User Web Module)
Module Configuration
- humanframe.backoffice, humanframe.web: Sub-modules of parent project humanframe
- Cannot be deployed as independent web applications
- Finally deployed in the form of humanframe.web
Configuration (Version) Management
- It is recommended to integrate multiple version projects such as SVN, GIT
- Efficient development management through branch strategy
MAVEN Configuration
- When maven dependency addition or modification is needed, modify the parent project's pom.xml file
- Add only module-specific dependencies to each module's pom.xml
6.2.2 Configuration File Location Structure
The main configuration files of HONGIKINGAN CMS are located in the following locations:
Configuration File Location Paths
/humanframe.backoffice/src/main/resources/humanframe/spring/humanframe.web/src/main/resources/humanframe/spring
Main Configuration Files
| Configuration File | Description |
|---|---|
context-datasource.xml |
Database connection configuration |
context-mapper.xml |
MyBatis mapper configuration |
context-properties.xml |
System property configuration |
context-scheduler.xml |
Scheduler configuration |
human-resource.xml |
Resource-related configuration |
6.3 Customization Methods
HONGIKINGAN CMS can be customized in various ways.
6.3.1 Basic Configuration Customization
Property Configuration
- Change system properties in
context-properties.xmlfile - Separate configuration by environment (local, dev, prd)
Database Configuration
- Change database connection information in
context-datasource.xmlfile - Support for various DBMS (CUBRID, Oracle, MySQL, MS-SQL, Tibero)
Scheduler Configuration
- Configure scheduler tasks in
context-scheduler.xmlfile - Set execution cycle through Cron expressions
6.3.2 UI Customization
Theme Configuration
- Configure themes in
/humanframe.web/src/main/webapp/humanframe/themedirectory - Change resources such as CSS, JavaScript, images
Layout Configuration
- Change layout in Tiles configuration file
- Modify JSP templates in
humanframe.web/src/main/webapp/WEB-INF/jsp/theme
Component Customization
- Utilize custom tag libraries
- Modify JavaScript components
6.3.3 Feature Extension
๐ฎ Add Controller
- Write new controller classes
- Extend existing controllers
โ๏ธ Add Service
- Write new service interfaces and implementations
- Extend existing services
๐๏ธ Add DAO
- Write new DAO classes
- Extend existing DAOs
๐บ๏ธ Add Mapper
- Write new MyBatis mapper XML files
- Extend existing mappers
6.4 Sample Program Development
HONGIKINGAN CMS provides sample programs that developers can refer to.
6.4.1 Sample Program Configuration
Sample Program Location
- Sample programs are provided separately for admin/user
- The Java project where sample programs are implemented is [WEB-humanframe.web] project
- Admin sources are located in "admin" folder
- JSP files are located in "fnct/sample" folder for admin and user respectively
Sample Program Source Locations
| Category | Path |
|---|---|
| JAVA Source | /humanframe.web/src/main/java/humanframe/web/ |
| Mapper Path | /humanframe.web/src/main/resources/humanframe/sqlmap/mappers |
| JSP Path | /humanframe.web/src/main/webapp/WEB-INF/jsp |
6.4.2 Sample Program Development Method
๐ฎ Write Controller
- Write new controller referring to
SampleControllerclass - Set
@Controllerannotation and@RequestMapping
โ๏ธ Write Service
- Write new service referring to
SampleServiceinterface andSampleServiceImplclass - Set
@Serviceannotation
๐๏ธ Write DAO
- Write new DAO referring to
SampleDAOclass - Set
@Repositoryannotation
๐ฆ Write VO
- Write new VO referring to
SampleVOclass - Implement Getter/Setter methods
๐บ๏ธ Write Mapper
- Write new mapper referring to
human-fnct-sample.xmlfile - Write SQL queries
๐ผ๏ธ Write JSP
- Write new JSP referring to sample JSP files
- Utilize JSTL, EL, custom tags
6.4.3 Sample Program Example
[Actual Code] humanframe.web.controller.front.SampleController
@Controller
@RequestMapping("/fnct/sample")
public class SampleController extends HumanAbstractController {
@Resource(name="sampleService")
private SampleService sampleService;
@Resource(name="fileService")
private FileService fileService;
@RequestMapping(value={"index","list"})
public String list(
HttpSession session
, HttpServletRequest request
, Model model) throws Exception {
SiteVO curSiteVO = (SiteVO)request.getAttribute("curSiteVO");
HumanListVO listVO = new HumanListVO(request);
listVO = sampleService.sampleListVO(listVO);
model.addAttribute("useAtCode", CodeMap.USE_AT);
model.addAttribute("listVO", listVO);
return "/front/"+ curSiteVO.getSiteSkn() + "/fnct/sample/list";
}
@RequestMapping(value={"form"})
public String form(
SampleVO sampleVO
, @RequestParam Map<String,Object> reqMap
, HttpServletRequest request
, Model model) throws Exception{
//log.debug("sampleVO: " + sampleVO.toString());
SiteVO curSiteVO = (SiteVO)request.getAttribute("curSiteVO");
SiteMenuVO curMenuVO = (SiteMenuVO)request.getAttribute("curMenuVO");
String currUri = curMenuVO.getMenuUri();
int sampleNo = EgovStringUtil.string2integer((String) reqMap.get("sampleNo"));
sampleVO.setSiteNo(curSiteVO.getSiteNo());
sampleVO.setMenuNo(curMenuVO.getMenuNo());
if(sampleNo == 0){
sampleVO.setCrud(CRUDValues.CREATE);
}else{
sampleVO = sampleService.retrieveSample(sampleNo);
sampleVO.setCrud(CRUDValues.UPDATE);
}
//return value
model.addAttribute("useAtCode", CodeMap.USE_AT);
model.addAttribute("sampleVO", sampleVO);
model.addAttribute("param", reqMap);
model.addAttribute("currUri", currUri);
return "/front/"+ curSiteVO.getSiteSkn() + "/fnct/sample/form";
}
// Other methods...
}
6.5 Menu and Program Registration
The method to register new menus and programs in HONGIKINGAN CMS is as follows.
6.5.1 Add Admin Menu
๐ Admin CMS Management - Menu Management
- Access "CMS Management > Menu Management" menu in admin page
- Click "Add Menu" button to add new menu
- Enter menu information (parent menu, menu name, program management URL, order, etc.)
- Save input information
๐ Menu Permission Configuration
- After adding menu, access "CMS Management > Permission Group Management" menu
- Select permission group and grant permission to added menu
- Save permission settings
โ Check Admin Page Display
- Logout and re-login required after adding menu
- Check display status in admin page
- Check accessibility according to permission settings
6.5.2 Add User Menu
๐ Admin Program - Program Management
- Access "Program > Program Management" menu in admin page
- Register new program information (service URL, etc.)
๐ Site-Menu Management
- Access "Site > Site Management" menu in admin page
- Click "Menu Settings" button to access site menu settings page
- Click "Add Menu" button to add new menu
- Select type-function program when entering menu information
- Click "Function Program Search" button to select program registered in program management (automatically added when checked)
- Save input information
๐ Menu Deployment
- After adding menu, access "Deployment > Deployment Management" menu
- Select newly created menu from list and click "Process" button to process deployment
โ Check User Page Display
- Check display status in user page after deployment processing
- Check display status according to menu display settings
6.6 Extension Module Development
HONGIKINGAN CMS can extend functionality by developing various extension modules.
6.6.1 Board Extension
Add Board Type
- Add new type referring to existing board types (Type 1~8)
- Write controller, service, DAO, VO, mapper, JSP, etc.
Add Board Skin
- Add new skin referring to existing board skins
- Write CSS, JavaScript, JSP, etc.
6.6.2 Additional Program Development
Write Additional Program Components
- Write additional program controller, service, DAO, etc.
- Write additional program JSP templates
Register Additional Program
- Register additional program in admin page