Access to the data using Spring Data

Expertise in JDBC API is today certainly not enough to fully meet the business needs of the customers. Those can be satisfied by Spring Data. It facilitates the development of application when working with different database models. It is a unified programming model. Spring Data promotes the “convention over coding” principle – it uses dynamic proxies, so that it frees us from a template code. Thanks to Spring Data you gain time to build complete domain models. Higher quality of the delivered code in a short time- what more could you wish for? Spring Data also provides lightweight mechanisms to map specific data models for Java objects.

The aim of the course is to familiarize the participants with different working patterns with databases, as well as going beyond the relational data model. You will come to know the modelling techniques, unknown to you before, and you will take a fresh look at the ways to work with the data and the impact of different models on the application architecture. During the course you will develop a Web application using various modelling techniques based on the Spring Data library. You will come to know such databases as: MongoDb, Neo4j and Redis.

Course programme:

    1. Patterns of access to the data layer in applications
      1. Building abstraction layer to access data using the Data Access Objects and Data Transfer Objects
      2. Anemic domain model versus Domain Driven Design versus Naked objects
      3. Working with data – using Transaction Script patterns, Table Data Gateway and Active Record
      4. Data Access Layer and its role in the context of the application. Interacting with a data access layer in the context of Model View Controller and Command Query Responsibility Segregation patterns.
    2. Access to the relational databases using JPA (Java Persistence API) and Spring Data
      1. JPA repositories, basic CRUD operations
      2. Using “query by convention” mechanism
      3. Using “query using annotations” mechanism
      4. Mechanisms of expanding the base implementation of JPA repository
      5. Modification operations (data adding, deletion and updating)
      6. Use of the specifications in the creation of dynamic queries
      7. Strongly typed queries using QueryDSL library
    3. Introduction to NoSQL databases
      1. CAP, BASE and ACID Paradigms, various guarantees of data consistency
      2. NoSQL and various data models
      3. Selecting the right data model to a problem class
    4. Collections of documents or access to data in MongoDB
      1. Introduction to databases based on a document model, on the example of MongoDB
      2. Modelling using documents, basic patterns
      3. Mapping documents to Java objects
      4. Issuing queries to MongoDB
      5. The use of Map/Reduce techniques
      6. Cross store with the use of MongoDB and JPA
    5. Vertices and edges or graphs in Neo4j
      1. Introduction to the world of graphs, on the example of Neo4j
      2. Mapping vertices and edges in the graph to Java objects
      3. Issuing queries toNeo4j
      4. The use of DSLi Gremlin and Cypher to traverse the graph structure
      5. Cross store with the use of JPA
    6. Access to the key-value databases on the example of Redis
      1. Redis – a way to store various data structures
      2. Access to the key-value databases on the example of Redis
      3. Mapping Java Collections to data structures available in Redis
      4. Publish Subscribe model with the use of Redis
      5. Redis as the Cache implementation
    7. Pitfalls and best practices
      1. The use of Spring Data in Web applications
      2. The use of Spring Data in Java EE containers
      3. Testing the access to data using Spring Test

Ask for this course