Technology Stack
Relevant source files
The following files were used as context for generating this wiki page:- pom.xml
- zheng-cms/pom.xml
- zheng-cms/zheng-cms-admin/pom.xml
- zheng-cms/zheng-cms-web/pom.xml
- zheng-cms/zheng-cms-job/pom.xml
- zheng-oss/zheng-oss-admin/pom.xml
- zheng-upms/zheng-upms-server/pom.xml
- zheng-api/zheng-api-server/pom.xml
- zheng-ui/zheng-cms-web/index.html
- zheng-ui/zheng-cms-web/topic/index.html
- zheng-ui/zheng-cms-web/qa/question/index.html
The zheng project is a multi-module, service-oriented application built using Apache Maven. The architecture is composed of several independent modules, such as zheng-upms (User Permission Management System), zheng-cms (Content Management System), and zheng-oss (Object Storage Service), which communicate with each other, likely via RPC. This structure suggests a microservices-like approach to building a comprehensive backend system.
The core of the project is built on Java, utilizing standard Java EE web technologies. The build system is configured to handle different deployment environments (dev, test, prod) through Maven profiles. Each web-facing module is packaged as a WAR file and configured to run on an embedded Jetty server for development, with each service on a distinct port.
Build System and Project Structure
The project is managed by Apache Maven and follows a multi-module structure. The root pom.xml acts as the aggregator for all sub-modules.
Sources: pom.xml:1-29
Core Modules
The project is divided into several high-level modules, each representing a distinct functional area of the system.
This diagram illustrates the top-level modules defined in the root pom.xml.
Sources: pom.xml:24-37
Java Version
The project is configured to use Java 1.7 for both source and target compilation.
| Property | Value |
|---|---|
maven.compiler.source | 1.7 |
maven.compiler.target | 1.7 |
maven.compiler.compilerVersion | 1.7 |
Sources: pom.xml:18-22
Backend Technologies
The backend is built on a Java stack, with specific libraries and frameworks chosen for different functionalities.
Web Server
For development and testing, the project utilizes the jetty-maven-plugin. Each web application module is configured to run on a specific port, facilitating a multi-service development environment.
| Module | Port |
|---|---|
zheng-upms-server | 1111 |
zheng-cms-admin | 2222 |
zheng-cms-job | 2223 |
zheng-cms-web | 2224 |
zheng-api-server | 6666 |
zheng-oss-admin | 7772 |
Sources: zheng-upms/zheng-upms-server/pom.xml:83, zheng-cms/zheng-cms-admin/pom.xml:81, zheng-cms/zheng-cms-job/pom.xml:72, zheng-cms/zheng-cms-web/pom.xml:84, zheng-api/zheng-api-server/pom.xml:87, zheng-oss/zheng-oss-admin/pom.xml:87
Core Dependencies
The following table summarizes key dependencies found across the modules.
| Group ID | Artifact ID | Version | Description |
|---|---|---|---|
javax.servlet | servlet-api | 2.5 | Provides the core Java Servlet API. Used with provided scope. |
javax.servlet | jstl | 1.2 | JavaServer Pages Standard Tag Library. |
junit | junit | 4.12 | A widely used testing framework for Java. |
com.alibaba.rocketmq | rocketmq-client | 3.6.2.Final | A client for Apache RocketMQ, a distributed messaging and streaming platform. |
com.taobao.pamirs.schedule | tbschedule | 3.2.8-SNAPSHOT | A distributed scheduling framework from Taobao. |
com.zheng | zheng-upms-client | 1.0.0 | A client library for the User Permission Management System, used for authentication and authorization. |
com.zheng | zheng-admin | 1.0.0 | A common administration module shared across services. |
Sources: zheng-cms/zheng-cms-admin/pom.xml:20-44, zheng-cms/zheng-cms-web/pom.xml:20-48, zheng-upms/zheng-upms-server/pom.xml:20-40
Module Inter-dependencies
Modules within the zheng project have clear dependencies on each other, forming a service-oriented architecture. For example, the zheng-cms-admin module relies on both zheng-admin for common UI/logic and zheng-upms-client for security.
This diagram shows the direct dependencies of the zheng-cms-admin module.
Sources: zheng-cms/zheng-cms-admin/pom.xml:20-34
The zheng-cms-web module integrates messaging and scheduling capabilities.
This diagram highlights the messaging and scheduling dependencies in zheng-cms-web.
Sources: zheng-cms/zheng-cms-web/pom.xml:20-24, 34-48
Frontend Technologies
The user interface is built with a combination of a server-side templating engine and standard web libraries.
Templating Engine
The frontend uses Thymeleaf as its server-side template engine. This is evident from the th: namespace declaration in all HTML files.
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
...
</html>
Sources: zheng-ui/zheng-cms-web/index.html:2, zheng-ui/zheng-cms-web/topic/index.html:2
Core Libraries
The UI relies on Bootstrap for styling and jQuery for DOM manipulation and AJAX requests.
| Library | Version | Usage |
|---|---|---|
| jQuery | 1.11.2 | Core JavaScript library for DOM manipulation, event handling, and AJAX. |
| Bootstrap | 3.x (inferred from CSS file name) | CSS framework for responsive design and UI components. |
| html5shiv | (unspecified) | Enables use of HTML5 sectioning elements in legacy Internet Explorer. |
| respond.js | (unspecified) | A polyfill for CSS3 Media Queries for older browsers. |
Sources: zheng-ui/zheng-cms-web/index.html:9-13, 59-61, zheng-ui/zheng-cms-web/qa/question/index.html:68-70
The following diagram shows the frontend technology stack.
Sources: zheng-ui/zheng-cms-web/index.html
Summary
The zheng project employs a robust and modular technology stack. It is a Java-based, multi-module Maven project designed with a service-oriented architecture. Key backend technologies include Jetty for development, RocketMQ for messaging, and a custom zheng-upms module for security. The frontend is built with Thymeleaf for server-side rendering, styled with Bootstrap, and made interactive with jQuery. This combination of technologies provides a solid foundation for a scalable and maintainable enterprise application.