IBatis Chapter 1: Basic Knowledge Overview & MVC ideas, ibatis Chapter 1 Overview

Source: Internet
Author: User

IBatis Chapter 1: Basic Knowledge Overview & MVC ideas, ibatis Chapter 1 Overview

I. java is a language that is very popular with developers and ranks top in the development language rankings. People have different opinions on it. As far as I feel, I think the main advantages of java are as follows:
1. java is an open-source language. developers can find a wealth of materials and constantly improve the language.
2. the java language has many frameworks. developers can combine various frameworks as needed to achieve efficient development.
Software development language ranking:

 

Ii. Concept of "Framework": The term "Framework" has a specific meaning in software engineering, similar to other engineering frameworks, it is a word that outlines the specific structure abstracted from the project. For example, if we build a tall building, the most important thing is to build a framework structure first. After the framework structure is built, the core part of the entire project is basically done, the rest is to fill and modify the framework. The same is true for the framework of software engineering. It abstracts common technologies and core ideas to form a specific framework structure. When we need to develop, we can introduce the framework, it is also a technology that is developed on this basis to improve development efficiency.

Framework:


Decorated house:

Iii. Common Software frameworks
Because Software Engineering basically follows the MVC design idea, the framework is implemented hierarchically from the following aspects.

Presentation Layer: mainly deals with technologies that try to use. Common frameworks include JS frameworks such as jQuery, AngularJS, and freemarker.
Business logic layer: This layer mainly controls business logic. Common services include Struts1, Struts2, Spring MVC, and Spring frameworks that are good at integrating layers.
Data access layer: It mainly processes the interaction with the database, also known as the persistence layer framework. Common frameworks include Hibernate, iBatis, MyBatis, and other framework technologies.

As mentioned above, how does one use various frameworks in the project? The answer is not unique. Generally, based on the characteristics of various companies and projects, it is best to select different combinations to suit you. For example, common combinations of SSH (Struts2 + Spring + Hibernate) and SSI (Struts2 + Spring + iBatis) are combined. Generally, different framework technology groups are selected for a project, build a framework suitable for your own development.

Several concepts are introduced:
1. ORM ing is short for Object Relation Mapping. We know that in java, We are object-oriented programming. However, currently, all mainstream databases are relational databases. We need to convert Object-oriented Data into relational data. when interacting with databases, we need to convert an object to a link. Therefore, ORM is a solution dedicated to solving such problems. For example, our Hibernate and iBatis can all be called ORM frameworks, because they mainly provide object relationship ing services for us.

2. Persistence: persistence stores instantaneous data. A simple understanding is to save the interactive data in our project to the database for long-term storage. Because the data of our project is temporary intercommunication and torsion in the memory, once the power is down or the program is terminated, the persistence is required.

3. JDBC: as explained in this way on the network, JDBC (Java Data Base Connectivity, java database connection) is a Java API used to execute SQL statements and can provide unified access to multiple relational databases, it consists of a group of classes and interfaces written in Java. In fact, a simple understanding is a technical means for java to access the database.

4. Data sources
Data sources, we need to access the database and get a database connection to perform relevant operations on this basis. The data source is the place where we get the connection, similar to a pool, when we need water, we can get it from this place. This pool is dedicated to providing database connection for us in the database.

Iv. Position of the iBatis framework in the project
The main position of iBatis in the project is in the DAO layer, that is, the data access layer, which serves as a bridge between the business layer and the database, saving and updating the data at the business layer to the database, or, search the data from the database as needed.

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.