You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conditions on frameworks which I choose for consideration:
40
+
1. The framework should embrace - not hide - SQL language and RDBMS we are using
41
+
2. The framework can implement DDD
42
+
3. Can utilize JPA annotations, but must not be full JPA implementation
43
+
4. The framework must be mature enough for "enterprise level" use
44
+
45
+
#### Subjective pros/cons of each framework
46
+
**Hibernate/JPA**
47
+
*[Compare to JPA](http://ebean-orm.github.io/architecture/compare-jpa)
48
+
49
+
**MyBatis**
50
+
* Pros
51
+
* Writing SQL statements in XML mapper file feels good - it's easy to work with parameters
52
+
* Cons
53
+
* Quite a lot of files for single DAO implementation
54
+
* Can't run batch and non-batch operations in single SqlSession
55
+
. Can't implement DDD
56
+
57
+
**EBean**
58
+
* Pros
59
+
* Everything looks very nice - all the scenarios are implemented by very readable code
60
+
* Super simple batch operations (actually it's only about using right method :) )
61
+
* Although there are methods which make CRUD operations and Querying super simple, there are still means how to execute plain SQL and even a way how to get the basic JDBC Transaction object, which you can use for core JDBC stuff. That is really good.
62
+
* Cons
63
+
* Not found any
28
64
29
65
## Quick Start ##
30
66
31
-
Create maven project,recommend to use spring boot to build web project.
32
-
33
-
If using spring-boot-starter-data-ebean, see example [spring-boot-data-ebean-samples](https://github.com/hexagonframework/spring-boot-data-ebean-samples)
Create maven project,recommend to use spring boot and [spring-data-ebean-spring-boot](https://github.com/hexagonframework/spring-data-ebean-spring-boot.git) to build web project.
45
68
46
-
If using maven to compile, package, run,should add:
47
-
48
-
```xml
49
-
<build>
50
-
<plugins>
51
-
<plugin>
52
-
<groupId>io.repaint.maven</groupId>
53
-
<artifactId>tiles-maven-plugin</artifactId>
54
-
<version>2.8</version>
55
-
<extensions>true</extensions>
56
-
<configuration>
57
-
<tiles>
58
-
<tile>org.avaje.tile:java-compile:1.1</tile>
59
-
<tile>io.ebean.tile:enhancement:5.1</tile>
60
-
</tiles>
61
-
</configuration>
62
-
</plugin>
63
-
</plugins>
64
-
</build>
65
-
```
66
-
67
-
If run with ide, should install, enable ebean enhancement plugin.
68
-
69
-
The simple Spring Data Ebean configuration with Java-Config looks like this:
0 commit comments