Database Reference
In-Depth Information
Spring Data philosophy
One of the most critical functions of any enterprise application is to provide the compon-
ents or a pattern for performing Create, Read, Update, and Delete ( CRUD ) operations
over the enterprise data. Keeping aside the complexity involved in defining the data struc-
tures for storing the data, the data access itself has many pitfalls. Starting from managing
connections, code for querying, unwrapping results and transforming them into Java ob-
jects, and last but not least, handling exceptions is really painful, and over a period of time,
it becomes unmanageable and the code starts smelling. Developers are very careful in cod-
ing for each of these processes and eventually they end up spending significant time in
handling these processes. As a result, there is less time to deal with or define business lo-
gic, or it may result in long development cycles.
Over and above, the complete code is very much specific to a database and you are in real
trouble if a new data source is introduced or the existing one is replaced!!!
Spring comprehended the severity of the architectural problems with the traditional data ac-
cess patterns and introduced an additional module Spring Data access .
One of the important goals of Spring is to provide a simple programming model that is
based on object-oriented principles, where developers need to code for interfaces and not
implementations.
Continuing the legacy of Spring, Spring Data access is also based on object-oriented prin-
ciples and extends/leverages the POJO-based template programming model and provides
an abstraction over the complex piece of data access code.
Spring Data access was developed for relational data structures also known as RDBMS,
such as Oracle, MySQL, SQL Server, and so on, and provides different templates for using
and leveraging various ORM frameworks, such as Hibernate, iBatis, EclipseLink, and so
on.
Spring Data access abstracted the underlying implementation of various databases and
ORM frameworks from developers and provided data in the form of objects that can be
linked to each other by annotations or configurations. Now developers need to make the
changes in Object Oriented Data Model ( OODM ), which will be further persisted within
the database by the Spring Framework. OODM is database independent and can be used or
re-used with any type of RDBMS or DBMS.
Search WWH ::




Custom Search