Nhibing is currently the most popular Java o/R Mapping Framework hibernate porting version, the current version is 1.0 RC-1. It originated from sf.net.. ibatisnet and is another excellent Java o/R Mapping Framework. The current version is 1.2. It is a subproject of Apache.
Compared with nhibbench "O/R", ibatisnet Is An ORM Implementation of "SQL mapping.
Nhibing provides a complete encapsulation of the database structure. The o/R Mapping of Nhibernate implements Po ing between Po and database tables, as well as automatic generation and execution of SQL statements. Program Generally, you only need to define the Po ing between Po and database tables to complete the persistent layer operations using the methods provided by nhib.pdf. Programmers do not even need to be familiar with SQL. Nhibernate will automatically generate the corresponding SQL based on the developed storage logic and call the ADO. net interface for execution.
Ibatisnet focuses on the Po ing between Po and SQL. That is to say, ibatisnet does not automatically generate SQL statements for programmers at runtime. The specific SQL needs to be compiled by the programmer, and then map the parameters required by the SQL and the returned result fields to the specified PO BY ing the configuration file.
Using the ORM mechanism provided by ibatisnet, for business logic implementers, they are faced with pure DOTNET objects. This layer is basically consistent with the implementation of ORM through nhib.pdf, while for specific data operations, nhibernate automatically generates SQL statements, while ibatisnet requires developers to write specific SQL statements. Compared with nhib.pdf, ibatisnet provides more free space for system design with the workload of SQL development and database portability concessions.
Comparison between the two:
1. ibatisnet is very simple and easy to learn. nhib.pdf is relatively complicated and has a high threshold.
2. Both are excellent open-source products
3. When the system is under secondary development and cannot control or modify the database structure, ibatisnet is more flexible than nhib.pdf.
4. The system has a huge amount of data processing capacity and extremely demanding performance requirements. This often means that we must use highly optimized SQL statements (or stored procedures) to achieve system performance design indicators. In this case, ibatisnet has better controllability and performance.
5. ibatisnet requires handwritten SQL statements and can also generate some of them. nhib.pdf can basically be automatically generated and occasionally write hql. For the same requirement, ibatisnet has a much larger workload than nhib.pdf. Similarly, if modification to database fields is involved, there are very few changes to Nhibernate, while ibatisnet should modify those SQL mapping places one by one.
6. the po and nhibernte ing obtained by one-to-one ing of database fields are completely different. The essential difference is that the Po is flat, unlike the Po mapped by Nhibernate, it can express three-dimensional object inheritance, aggregation, and other relationships, which will directly affect the design idea of your entire software system.
7. The most important sentence is what ibatisnet author says:
If you are starting a new project and you're in full control of your object model and database design, Nhibernate is a good choice of O/R tool.
If you are accessing any 3rd party Databases
(E.g. vendor supplied), or you're working with a legacy database, or even just a really poorly designed database, then an O/R mapper might not be capable of handling the situation. that's were an SQL mapper comes in handy.