Some tips on open source projects, Java architecture must be a few major technical points

Source: Internet
Author: User

Some techniques that must be learned about the learning architecture

1. Java Reflection Technology
2. xml file Processing
3. Properties Property File Processing
4. Thread-safe mechanism
5. Annocation annotations
6. Design mode
7. Agent mechanism (AOP)
8. Serlvet Base (filter, etc.)

Some of the more practical techniques:

1. Template language Freemarker
2. Ognl
3. Gson JSON Tool class


Everyone for a few big frame daunting, in fact, as long as understand his principle, will comprehend by analogy, here I say a few points of my humble opinion!

MVC layer (STRUTS,SPRINGMVC):

Very simple is to use a servlet to implement a unified jump, the configuration file holds the request, the processing class, the forwarding request relationship (via XML file or annotations)

Operation Flow: The page triggers the request, the framework obtains to the processing class by reading the configuration file, and then instantiates the class through reflection for the corresponding business processing

(now popular 0 configuration, it is simplified the MVC layer of writing)

Persistence Layer (Mybatis/hibernate):

MyBatis is actually the sql+mybatis logic tag.

Logical label Understanding how people have used the template language freemarer or velocity should be easy to understand, that is, custom rules tags
Hibernate is a bit more advanced, and it's simple, he uses annotations or configurations to configure entity and table fields in a way that dynamically generates SQL at startup
You can look at the open source project Minidao, you will know that the persistence layer originally written is very simple;



So the architecture can be simply understood as:

Configuration + reflection + Design mode + Script +AOP

To configure common practices:

1.xml file

2.annocation annotations

3.properties Properties File

4.0 Configuration Ideas

Script Processing methods:

Can write their own, can also use the template language Freemarker and so on

Mentor Architecture Class: Open Source Community Mentoring Program

Some tips on open source projects, Java architecture must be a few major technical points

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.