A simple, easy-to-use lightweight Java application development framework

A simple, easy-to-use lightweight Java application development framework

2022-09-16 0 724
Resource Number 38586 Last Updated 2025-02-24
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue recommends a lightweight Java application development framework – YMP.

A simple, easy-to-use lightweight Java application development framework插图

YMP is a very simple and easy to use lightweight Java application development framework, covering AOP, IoC, WebMVC, ORM, Validation, Plugin, Serv, Cache and other features, so that development work as easy as building blocks!

Features

  • Package in componentized, modular way, can be assembled on demand, flexible and extensible
  • Using microkernel to achieve AutoScan, AOP, IoC, Event, etc., covering most of the core functions in SSH and SSM framework
  • Unified configuration architecture, feel different file resource configuration and management mode
  • Integrate multiple logging systems (Log4j, JCL, Slf4j, etc.), log files can be stored separately
  • Lightweight persistence layer encapsulation with support for RDBMS (MySQL, SQL Server, Oracle, PostgreSQL) and NoSQL (MongoDB, Redis)
  • Perfect plug-in mechanism to help finer granularity of business splitting
  • Unique Serv development experience
  • Powerful validation framework, based entirely on Java annotations, easy to use and extend
  • Flexible caching service, supporting EhCache, Redis, and MultiLevel caching technology
  • Configure simple MVC architecture, powerful and easy to maintain and extend, support RESTful style, support JSP, HTML, Binary, Freemarker, Velocity and other view technologies

Modules

YMP framework is mainly composed of Core and several Modules, the overall structure is simple and clear, as shown in the figure:

A simple, easy-to-use lightweight Java application development framework插图1

Core

The core is also called the application container (IApplication), which is mainly responsible for framework initialization, Events broadcasting and monitoring, module definition and its life cycle management, international resource management (I18N) and class object management, etc. Its core functions are automatic scanning of packages and classes (AutoScan), object lifecycle management, inversion control (IoC), dependency injection (DI), and method interception (AOP).

Configuration

Realize unified management of various resources such as configuration files during project development and maintenance through a simple directory structure, and provide flexible, simple and effective solutions for modular development and deployment:

  • Standardize the modular development process and unify the life cycle management of resource files from the perspective of development;
  • Integrate all resources in the whole system from the perspective of maintainability, with the advantages of effective resource reuse and flexible system integration construction, deployment, data backup and migration;
  • Simple configuration file retrieval, loading and management mode;
  • Resource sharing between modules. Modules can share resource files such as configuration, classes and jar packages of projects.
  • The default support for XML, Properties and JSON configuration file parsing, can be customized through the IConfigurationProvider interface, support caching, avoid repeated loading;
  • The configuration object supports @Configuration annotation declaration, and the configuration content can be automatically loaded and filled into the class object without coding.
  • Modify the configuration file without restarting the service, and support automatic reload.
  • Build (compile) and distribute integrated modules, start and stop services, and clear classification structure of resource files can be quickly located;

Log

Based on the open source log framework Log4j 2, it provides unified management of log recorder objects and integrates excellent log systems such as JCL and Slf4j. It can call any log recorder at any location to output logs, which realizes the separation of system and business logs. At the same time with the YMP configuration system module, the effect is better.

Persistence

JDBC

JDBC Persistence module A set of simple solutions for relational database (RDBMS) data access, focusing on data access efficiency, ease of use, stability and transparency, with the following features:

    • Lightweight packaging based on JDBC framework API, simple structure, easy to develop, debug and maintain;
    • Optimize batch data update, standardize result sets, and precompiled SQL statement processing;
    • Support single entity ORM operation, no need to write SQL statements;
    • Provide scaffolding tools, quickly generate data entity classes, support chain calls;
    • Support for custom SQL statements via memory annotations or dynamic loading of SQL from configuration files and automatic execution;
    • Support automatic assembly of result sets and value objects, support custom assembly rules;
    • Support multiple data sources, default support C3P0, DBCP, Druid, HikariCP, JNDI connection pool configuration, support data source extension;
    • Support a variety of databases (such as Oracle, MySQL, SQLServer, SQLite, H2, PostgreSQL, etc.);
    • Support object-oriented database query encapsulation, helping to reduce or reduce program compile-time errors;
    • Support database transaction nesting;
    • Support database views and stored procedures;

MongoDB

According to the characteristics of MongoDB data access operation, the design idea of JDBC persistence module is simply encapsulated, the session mechanism is adopted, the transaction processing logic is simplified, and the multi-data source configuration and entity operation are supported. Objectify query conditions based on IOperator, and integrate MapReduce, GridFS, aggregation, function expressions, etc.

Redis

Based on Jedis driver, simple encapsulation based on the design idea of JDBC persistence module, using session mechanism, unified API call, simplifying subscribe and publish operations, supporting multi-data source and connection pool configuration, Support for data source connections such as jedis, shard, sentinel, and cluster.

Plugin

The plug-in module uses an independent ClassLoader to manage private packages, classes, resource files, etc. The design goal is to split the requirements into finer particles under the interface development mode, so as to achieve an idealized reusable code encapsulation form.

Each plug-in is a closed world, the only way to communicate between plug-ins and the outside world is through the business interface call, the container management of these plug-ins is called the plug-in factory (IPluginFactory), which is responsible for plug-in analysis, loading and initialization, as well as plug-in life cycle management. The plug-in module supports the creation of multiple plug-in factory instances, and the factory objects are completely independent from each other without any dependencies.

Service (Serv)

Service (Serv) is a communication service framework based on NIO implementation, providing TCP, UDP protocol client and server encapsulation, flexible message monitoring and message content encoding/decoding, simple configuration makes secondary development more convenient. At the same time, the client provides default service support such as disconnection and link maintenance (heartbeat). You only need to understand the business to complete the development work easily.

Validation

Verification module is a server-side parameter validity verification tool. It adopts annotation declaration to configure verification rules, which is simpler, more intuitive and friendly. It supports method parameter and class member attribute verification, international I18N resource binding of verification results, custom validators and multiple verification modes.

Cache

Cache module takes EhCache as the default JVM in-process cache service, integrates external Redis service to achieve MultiLevel lightweight cache framework, and deeply integrates with YMP framework (supports caching for class methods, Can be cached based on method parameter values), flexible configuration, easy to use, and extensible.

WebMVC

WebMVC module is another very important module in YMP framework in addition to JDBC persistence module. It integrates many features of YMP framework, and still maintains a consistent simple style in the design and use of functional structure. At the same time, it also inherits the genes of the mainstream MVC framework, and it is extremely easy for developers who understand and are familiar with framework technologies such as SSH or SSM to get started and have no learning costs.

Its main functions are as follows:

  • Standard MVC implementation, clear structure, completely annotation-based configuration is simple;
  • Support convention mode, no need to write controller code, directly match and execute view ‘
  • Support for multiple view technologies (Binary, Forward, Freemarker, HTML, HttpStatus, JSON, JSP, Redirect, Text, Velocity, etc.);
  • Support RESTful mode and URL style;
  • Support automatic binding of request parameters to controller method parameters;
  • Support parameter validity verification;
  • Support for controller method interception;
  • Support annotation configuration controller request route mapping;
  • Support automatic scanning controller classes and registration;
  • Support for custom handling of events and exceptions;
  • Support I18N resource internationalization;
  • Support for controller methods and view caching;
  • Support plug-in extension;

Common Tool Kit (Commons)

The commonly used tool class library package is some very practical auxiliary tools accumulated during the development of YMP framework. Which mainly involves HttpClient request wrapper, JSON wrapper, file and resource management, data import and export, video image processing, two-dimensional code, serialization, class, date and time, mathematics, latitude and longitude, string encryption and decryption, runtime environment, network, thread operation, etc.

—END—

Open Source protocol: Apache2.0

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code A simple, easy-to-use lightweight Java application development framework https://ictcoder.com/a-simple-easy-to-use-lightweight-java-application-development-framework/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services