Java architects must know several major technical points, reprint Daniel's experience

Java architecture must have several major technical points

 

About learning architecture, you must know a few technologies
 1. java reflection technology
 2. xml file processing
 3. properties attribute file processing
 4. thread safety mechanism
 5. annocation annotation
 6. design pattern
 7. proxy mechanism (aop)
 8. serlvet foundation (filters, etc.)



Several more practical technologies:
 1. Template language freemarker
 2.
 ognl 3. gson json tool class



    Everyone is intimidated by several major frameworks, in fact, as long as you understand his principles, you will bypass analogies, here I say Tell me your own opinions!

MVC层(Struts,Springmvc):

           It is very simple to use a servlet to achieve a unified jump, and the configuration file saves the relationship between requests, processing classes, and forwarding requests (through xml files or annotations)

      

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

                (The popular zero configuration now simplifies the writing of the mvc layer)

Persistence layer (Mybatis/Hibernate):

        mybatis is actually the sql+mybatis logical tag

        逻辑标签的理解如何大家用过模板语言freemarer或者velocity应该会很容易理解,就是自定义的规则标签
        Hibernate略显高级,也很简单,他是采用注解或者配置的方式将实体字段和表字段进行一个配置,在启动的时候动态生成sql
         大家可以看下开源项目minidao,就会知道持久层原来写很简单;



所以架构可以简单理解为:

                      配置+反射+设计模式+脚本+AOP 

    配置常用做法:

                1.xml文件

                 2.annocation注解

                 3.properties属性文件

                 4.零配置思想

脚本处理方法:

                 可以自己写,也可以采用模板语言freemarker等等

 

 

       架构技术QQ交流群: 39596137

  师徒架构班: 开源社区师徒架构班

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326358943&siteId=291194637