03 Mybatis conceptual framework and advantages --- 1-- framework study notes

Concepts framework

  Framework is actually semi-finished products for some applications , is a set of components for you to choose your own complete system. It simply is using someone else setting up the stage, you do the show . Moreover, the general framework is mature, and constantly upgrading the software. Our framework is a set of software development solutions, different framework for resolving the issue are different.

The benefits of using the framework:
  the framework encapsulates a lot of detail, so that developers can use minimalist way to achieve the function, greatly improve development efficiency .

2. The three-tier
  presentation layer: the data is representative of the
  business layer: dealing with business needs
  persistence layer: Yes and interact with the database

3. Technical Solution durable layer
  (1) JDBC technology:
    Connection
    the PreparedStatement
    the ResultSet
  (2) the Spring JdbcTemplate:
    Spring jdbc in the simple package
  (3) Apache of DBUtils:
    it and the Spring JdbcTemplate like, is also simple to Jdbc package

Note: These are not the framework for
  JDBC is to regulate
  the Spring JdbcTemplate and Apache DBUtils are just tools

4. MyBatis Framework Overview

  mybatis is an excellent java-based persistence framework, which is inside the package the jdbc , so developers only need to focus sql statement itself, without the need to spend energy to handle the loading drive, create a connection, create complicated process statement and so on.

  mybatis xml or annotation by way of various configuration statement to be executed together, and the final map generation sql statement executed by a java objects and dynamic parameters of the sql statement, and finally execute sql and mapping the result to the frame by a java object and mybatis return.

  Using ORM idea to solve the problem of database entities and mapping of jdbc is encapsulated, shielded jdbc api-level access details, so that we do not have to deal with jdbc api, you can complete the operation of the database persistence. 

In short:

  mybatis is a persistence framework, java prepared.
  It encapsulates many of the details jdbc operations, so that developers only need to focus sql statement itself, without concern registration drive, create a complicated process connections
  that use the ORM package ideas to achieve the result set.

ORM: Object Relational Mappging object-relational mapping
Simply put:
  that is, the database tables and entity classes and physical properties of the corresponding class together
  so that we can work with entity classes to achieve operation of the database table . Entity class field name attribute database table and consistent.

 

Guess you like

Origin www.cnblogs.com/luckyplj/p/11298203.html