Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

developing a simple orm [closed]

Tags:

java

orm

I want to develop a simple orm which performs CRUD functionality.Shold i use reflection? does libs like hibernate use reflection?? does using reflection will cause the speeed to drop down by a large extent?

like image 211
akshay Avatar asked Dec 06 '22 03:12

akshay


2 Answers

Yes Hibernate uses reflection and annotations (or XML configuration files), but it will only index and read all meta information once (at startup). I would recommend though to look at the existing ORM solutions first before you start rolling your own.

like image 128
Daff Avatar answered Dec 07 '22 16:12

Daff


A simple ORM is DAO (Data Access Object). You can specify your CRUD operations very well.

For More ORM patterns or Methodology, read Martin Fowler's book: Patterns of Enterprise Application Architecture

Also, you can use the existing JPA (Java Persistence API) and write your own JPA.

like image 41
Buhake Sindi Avatar answered Dec 07 '22 17:12

Buhake Sindi