Skip to content

Philosophy

Fabrice Daugan edited this page Apr 12, 2018 · 2 revisions

The main ideas are Convention over Configuration and modularity.

Convention over Configuration

There is a default behaviour based on the convention, but it's always possible to override it.

REST Endpoint

By convention, the status code is determined for you (200, 204, 400, ...) and follow the best practices.

Exception handling

You could never use "try catch" statements in your application. Let the error reaching the filters that will generate the status code and REST payload for you. More details there Exception handling.

Validation handling

Implicit validation management is proceed before the REST controller is actually called. Properties mapping, types, and BVAL constraints are managed for you. This avoids a lot of useless code and tests. More details there Jackson Ext and CXF Ext.

Entity equals/hashcode

No equals or hashcode are required. The design above Spring-Data implies these methods are not required to build a consistant cache for Hibernate.

getter/setter

Thanks to Lombok, dont't write anymore getX and setX.

Basic ORM operations

Thanks to Spring Data, basic operations such as findAll or findOne are available at zero cost. In addition, some operations have been added (findAllBy, findOneExpected, ...), see Spring-Data Ext

Database mapping

JPA to DDL generation is backed by Hibernate. We have added conventional ManyToOne column naming ensuring the proper compatibility with constraints (@Unique,...), case (in)sensitive databases and exception handling. More details there Hibernate Ext.

Security over REST

With REST, comes some conventional meaning of GET, POST,... methods. The integrated RBAC security layer make easy dynamical security configuration.

Modularity

Split your code to make micro-services grid. Instead of having a global configuration file (XML, YML,...), a centralized Spring-Boot java configuration, or some useless code to write to register your features.

Cache

With Hazelcast, even with Spring-Boot you cannot easily split your CacheConfig. We have built a merged configuration that collects the available CacheConfig to register them for to the HazelcastInstance. More details there Hibernate Ext.

JPA

JPA specification requires that your orm.xml comes along your entities, even with package auto-discovery classes. But in a modular application, it's not possible to anticipate the entities you'll get in the classpath. More details there Hibernate Ext.