Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

The advantages and disadvantages and possible applications MyBatis framework

MyBatis advantage

  • (1) Compared with the JDBC, reducing the amount of code more than 50%.

  • (2) MyBatis the mouth persistence and single frame, compact and easy to learn.

  • (3) MyBatis quite flexible, does not impose any impact on the existing application or database design, SQL written in the XML file, complete separation from the program code, reduce the coupling to facilitate unified management and optimization, and reusable .

  • (4) provides XML tags, support the preparation of dynamic SQL, to meet different business needs.

  • (5) provides a mapping label, field support ORM object relationship mapping database.

MyBatis shortcomings

  • Written work (1) SQL statements larger, the ability to write SQL developers have certain requirements.

  • (2) SQL statement depends on the database, resulting in the database does not have good portability, can not easily replace the database.

Applications MyBatis framework

MyBatis focused on SQL itself, is a sufficiently flexible DAO layer solutions. High performance requirements, or more changes in project requirements, such as a Web project, then MyBatis is the only choice.

Fudan University Master of Engineering with your handwriting MyBatis, hand-built open-source framework (attached detailed video tutorial)

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

  • 1. five minutes anatomy MyBatis;
  • 2.MyBatis core processes analysis;
  • 3. The three-step handwriting, second large coffee!
  • 4. Are you sure you do not need to learn the source code?

What Mybatis that?

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

MyBatis core processes three stages

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

Initialization phase

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

Saying SqlSession

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

A question worth considering

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

Why should there be a proxy stage?

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

Starter Mybatis realization of ideas

Master of Engineering taught you look at Fudan University handwriting MyBatis, hand-built open-source framework

to sum up

We went through the analysis of different angles, and by year's competitors, and in the actual production environment, MyBatis is a very good persistence framework, we must learn and master it, not just its use, as well as its underlying the basic principle

Guess you like

Origin blog.51cto.com/13904503/2415215