Efficient Java Web development framework JessMA v3.2.1 officially released

Source: Internet
Author: User

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1130021N1-0.png "/>

JessMA (formerly known as Portal-Basic) is an efficient Java Full-Stack Web application development framework developed by JessMA Open Source, built-in and scalable MVC Web infrastructure and DAO database access components provide the Hibernate, MyBatis, and jdbc dao components ), integrates basic Web application components such as Action interception, Form/Dao/Spring Bean assembly, internationalization, file upload/download, and page static, to provide an efficient and flexible pure Jsp/Servlet API programming model, spring can be perfectly integrated, and Action Convention is supported. Traditional style and RESTful style applications can be developed quickly. The documents and examples are complete and easy to learn.


JessMA Official Website: http://www.jessma.org

MA: https://code.google.com/p/portal-basic/


JessMA is designed to focus on functions, performance, and user experience. Major features of JessMA:

Comprehensive functions:Built-in stable and efficient MVC infrastructure and DAO framework, supporting Action interception, Form Bean/Dao Bean/Spring Bean assembly, and clear transactions, provides common Web components such as internationalization, file upload and download, cache, and page static, to meet the needs of most Web applications.

Highly scalable:JessMA can be flexibly expanded through the plug-in mechanism. The JessMA-ext-rest and jessma-ext-spring contained in the jessma release package are provided in the form of plug-ins, you can load or uninstall these plug-ins as needed. Application developers can also compile custom plug-ins to expand JessMA based on actual needs.

Powerful integration capabilities:JessMA is a Full-Stack framework and an open framework. It can integrate third-party components in a very simple way. This document describes in detail how to integrate common frameworks and components such as FreeMarker, Velocity, UrlRewrite, EHCache-Web, Spring, Hibernate, and MyBaits in JessMA.

High performance:Performance requirements are hard indicators of JessMA. From the design of each module to the implementation of each line of code, they strive to be concise and efficient. In addition, JessMA does not encapsulate JSP/Servet APIs too much. Developers still use JSP/Servet APIs to develop applications. There are not too many detours and the performance is guaranteed.

Excellent user experience:One of the design goals of JessMA is to provide a good development experience and minimize the work of application developers. The API design is simple, complete, and clear. At the same time, JessMA provides a large number of Util tools for application development to deal with general problems that are common during application development, further reducing the workload of application developers.

Gentle learning curve:Gentle learning curve: to learn how to use JessMA, you only need to master certain Core Java and JSP/Servlet knowledge. This development manual will explain each knowledge point step by step, and each knowledge point will be described based on a complete example, knowledge points echo each other to ensure that the learners learn from each other and learn from each other.

Comprehensive Technical Support:In addition to providing complete development manuals and sample code, we also provide blogs and Q ~ Q ~ The group is used to answer all problems encountered during the use of JessMA. You can also visit the JessMA official website to learn more.

* JessMA overall architecture

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1130024108-1.png "alt =" Portal-Basic overall architecture "width =" 674 "height =" 320 "/>

JessMA consists of the following five parts:

Basic Application Framework

Base application framework loads application configuration file default: app-config.xml), listens to application lifecycle events, and sends application startup and close notifications to the upper-layer application, applications can process these notifications for additional initialization or cleanup. The basic application framework is implemented in the org. Ma. app package.

MVC Framework

MVC Framework load MVC configuration file default: mvc-config.xml), through the front-end controller ActionDispatcher to receive and parse all the client HTTP requests, and then by the corresponding Action for processing, finally, a view is generated and returned to the client. The MVC framework is implemented in the org. jessma. mvc package.

DAO framework

The DAO framework encapsulates all database access operations, including built-in JDBC, Hibernate, and MyBaits database access components, and connection pools such as Druid, Proxool, and JNDI. The DAO framework is scalable. You can implement your own database access components by extending org. Ma. dao. actactfacade and org. jessma. dao. AbstractSessionMgr. The DAO framework is implemented in the following package:
▪Org. jessma. dao
▪Org. jessma. dao. hbn
▪Org. jessma. dao. jdbc
▪Org. jessma. dao. mybatis
▪Org. jessma. ext. dao

Public Components

Public components provide a variety of common functions and help classes, such as string processing, type conversion, paging algorithms, compression/decompression, encryption/decryption, and email sending. These classes are irrelevant to the framework, it can be used in any application. Public components are implemented in the following package:
▪Org. jessma. util
▪Org. jessma. util. archive
▪Org. jessma. util. cache
▪Org. jessma. util. http
▪Org. jessma. util. mail
▪The org. jessma. daoDAO framework can also be viewed as a relatively large public component)

Extension

The extended plug-in is a function extension based on the JessMA core framework and is not a necessary component of JessMA. It can be customized by application developers as needed. The JessMA release package also comes with some extensions such as jessma-ext-spring and jessma-ext-rest ).

* JessMA application dependency

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/113002K33-2.png "alt =" Portal-Basic application dependency "width =" 662 "height =" 797 "/>

The basic application framework, MVC Framework, and DAO framework depend on public components. The basic application framework also depends on DAO framework. Therefore, the MVC Framework and DAO framework can be used independently from JessMA, to attach public components ). For example, the MVC Framework and DAO framework can be used for other Web projects other than JessMA, or for non-Web projects such as Swing/SWT desktop applications ).

JessMA 3.2.1 update:

1. The Portal-Basic Framework was officially renamed as JessMA.

1) The JessMA version follows the Portal-Basic version.
2) Change the package name com. bruce. * To org. Ma .*

2. Add the <base-path> configuration item to the mvc-confing.xml to support custom $ {__ base} Variables

1) There are three types of base-path.type: 'auto', 'manual', 'none', where 'auto' is the default type
2) 'auto': automatically sets $ {__ base }$ {__ base} to be saved in Request Attribute Based on the path information of the current Request)
$ {__ Base }={ scheme}: // {server_name }:{ server_port}/{app_context}
3) 'manual': manually set $ {__ base }$ {__ base} in the MVC configuration file and save it in Application Attribute)
4) 'none': Do not set $ {__ base}

3. Add the <result-path-aliases> configuration item to the mvc-confing.xml and support replacing the path of Action Result with an alias

For example:

<Result-path-aliases>
<Alias name = "index" path = "/jsp/index. jsp"/>
<Alias name = "jsp_base" path = "/jsp/test"/>
</Result-path-aliases>

The following configurations are equivalent:

1) do not use aliases

<Result>/jsp/index. jsp </result>Or annotation @ Result (path = "/jsp/index. jsp ")
<Result>/jsp/test/my. jsp </result> or annotation @ Result (path = "/jsp/test/my. jsp ")

2) use aliases

<Result >$ {index} </result> or annotation @ Result (path = "$ {index }")
<Result> $ {jsp_base}/my. jsp </result> or annotation @ Result (path = "$ {jsp_base}/my. jsp ")

4. dynamically update application configurations without restarting the server

1) Update the MVC configuration. Org. jessma. mvc. ActionDispatcher add method:
A) reload (delay) Updates MVC Configuration
B) pause () pause the MVC component
C) resume () restores the MVC component
D) Use the preceding three methods: pause ()-> reload (delay)-> resume ()

2) Update the REST configuration. Org. jessma. ext. rest. RestDispatcher:
A) reload (delay) updates the REST Configuration
B) pause () pause the REST component
C) resume the REST component
D) Use the preceding three methods: pause ()-> reload (delay)-> resume ()

3) Update the application configuration file app-config.xml) of the <user> node. How to add org. jessma. app. AppConfig:
A) reloadUserConfig (delay) Call the parse (user) method of UserConfigParser defined by <system>/<user-config-parser> node to reload the configuration information of the <user> node
B) the MVC component or REST component must be suspended before the update is executed to call their pause () method)

5. Modify org. jessma. util. Logger to make the Logger class more common.

1) default Logger: the default Logger name of the application is 'analyst'. You can call Logger. getdefaloglogger () to obtain the default Logger.
2) Other Logger: The application can call new Logger ("<logger_name>") anywhere to obtain other Logger configured in log4j. properties.

6. Add a JDBC SessionMgr

1) org. Sort Ma. dao. jdbc. JdbcSessionMgr: No JDBC SessionMgr used in the connection pool

7. Other updates

1) Change the MyPortal of the original test project to MyJessMA.
2) change the original dependent library portal-basic-lib to jessma-lib.
3) update all jar packages in the dependent libraries "ma-lib" and "spring-lib" to the latest version.
4) better support for deploying JessMA applications on cloud platforms such as GAE, BAE, and OpenShift
5) Update the development manual JessMA efficient Java MVC & REST development framework (v3.2)
6) The official website www.ma.org will provide various technical support in succession.

8. application upgrade instructions

JessMA 3.2.1 is fully compatible with Portal-Basic 3.1.1 In terms of functionality. to upgrade the original application to JessMA 3.2.1, do the following:
1) all the places in the application that use com. bruce. * are changed to org. Ma .*
2) to modify the XSD Schema reference of the XML configuration file, refer to the MyJessMA test project)
3) if the application uses org. Ma. util. Logger, the code for getting the Logger object must be adjusted. For details, refer to the MyJessMA test project)
4) if the application uses base. jsp, replace the original base. jsp with the jessma-base.jsp of JessMA 3.2.1

JessMA update history: ChangLog.txt

Development document directory:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/11300214O-3.jpg "/>

This article from the "Monster Garden" blog, please be sure to keep this source http://404201.blog.51cto.com/394201/1242355

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.