Atitit.orm's shortcomings and ORM framework market share, Selection Attilax summary

Source: Internet
Author: User

Atitit.orm 's shortcomings and ORM Framework market share, selection attilax Summary

1. Attilax 's ORM Framework Requirements 1

2. ORM Framework Market share 2

3. Spring JDBC TEMPLT 3

4. Eclipselink/toplink not good for 4

5. Summary of Jooq 4

6. selection of attilax atiorm 4

7. Reference 4

1. Attilaxof theORMFramework Requirements

1. No configuration files or annotations are required. generate SQL directly from map,JSON

2. Get SQLdirectly: No database connection required. Easy to Debug. Or this SQL transport.

Author:: Old Wow's paw attilax Ayron, email:[email protected]

Reprint please indicate source: Http://blog.csdn.net/attilax

2. OrmFrame Market Share

ORM Frameworks in use

HB 67

JDBC 22

Spring JDBC Template 20

Eclipselink 13

MyBatis 7

Jooq 2

Datasource:::rebellabs ( WEBSITE )

Conclusion.
But in any case, just use ORM Framework, the landlord can rest assured to learn, do not worry about the cost of time problems, will not take up too much time

3. Spring JDBC TEMPLT

2, using the Namedparameterjdbctemplate class, the implementation of JDBC, parameters are sent by the map collection

· @Override

· public void Insert (User entity) {

· TODO auto-generated Method Stub

· String sql= "INSERT into User (Name,age,sex) VALUES (: Name,:age,:sex)";

· Map<string,object> map=new hashmap<string,object> ();

· Map.put ("Name", Entity.getname ());

· Map.put ("Age", Entity.getage ());

· Map.put ("Sex", entity.getsex ());

· int temp=npjt.update (SQL, map);

· if (temp>0) {

· System.out.println (" Insert succeeded!  ");

· }else{

· System.out.println (" insert failed!  ");

· }

· }

· @Override

· public void update (User entity) {

· TODO auto-generated Method Stub

· String sql= "Update user set name=:name,age=:age,sex=:sex where Id=:id";

· Map<string,object> map=new hashmap<string,object> ();

· Map.put ("Name", Entity.getname ());

· Map.put ("Age", Entity.getage ());

· Map.put ("Sex", entity.getsex ());

· Map.put ("id", Entity.getid ());

· int temp=npjt.update (SQL, map);

· if (temp>0) {

· SYSTEM.OUT.PRINTLN (" Update succeeded!  ");

· }else{

· SYSTEM.OUT.PRINTLN (" update failed!  ");

· }

· }

4. Eclipselink/toplinkBad Use5. Jooqthe summary

1. Create.select (T_author. First_Name, T_author. Last_Name, COUNT ())

2.. from (T_author)

3: Join (T_book). On (T_book. Author_id.equal (t_author.id))

4.. where (T_book. Language.equal ("DE"))

5... and (T_book. Published.greaterthan (parsedate (' 2008-01-01 '))

6.. groupBy (T_author. First_Name, T_author. last_name)

7: Having (count (). GreaterThan (5))

8.. t_author. LAST_NAME.ASC (). Nullsfirst ())

9: Limit (1, 2)

Ten. Forupdate ();

Jooq using the IDE is convenient. But it doesn't automatically map json to, so it's still a hassle.

6. AttilaxThe ChoiceAtiorm

It looks like Spring Temple is best used ... use tired hanging three , Good to have a business to use ... Horse Transac, Go can't save ...

The son of a good GA from the orm Orchid .

7. Ormthe advantages of the interface in the use of

Directly provided by the Walk ten JSON interface , Direct conversion to an orm Walk ten easy to use AH .

8. Reference

Spring uses JDBC to make additions and deletions --iteye technology website . htm

Atitit.orm's shortcomings and ORM framework market share, Selection Attilax summary

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.