Web Application Development Using Spring, and JPA

Duration: 5 Days (Face-to-Face & Remote-Live), or 35 Hours (On-Demand)

Price: $2495 (Face-to-Face & Remote-Live), or $1495 (On-Demand)

Discounts: We offer multiple discount options. Click here for more information.

Delivery Options: Attend face-to-face in the classroom, remote-live or on-demand training.

Students Will Learn

The core principles of Spring and of Structuring code using Hibernate Dependency Injection (DI)/Inversion of protocols Control Using Hibernate Mapping to map Using the Spring core module and DI to persistent objects to the database configure and wire application objects (Beans) together Working with collections and associations Using the different types of metadata Using Hibernate's versioning support (XML, @Component, and @Configuration) Mapping inheritance hierarchies using Hibernate The complete capabilities of the core module Working with Hibernate Queries, HQL, and Criteria Using the ORM (Object-Relational Mapping) module to integrate Spring with Hibernate transaction support technologies such as Hibernate or JPA The relationship between Hibernate and Spring's transaction support the Persistence API (JPA) Integration of Spring with Java EE Web How to architect and code using JPA2 applications Exploiting AJAX integration The features and benefits of Hibernate Exploiting Web services How to architect applications using the Hibernate framework

Course Description

This course provides a comprehensive introduction to JPA (the Java Persistence API), the Spring and Hibernate open source frameworks as well as Web Services and AJAX. Suitable for both Spring3/Hibernate3 and Spring4/Hibernate4, the course includes coverage of the core Spring and Hibernate capabilities, as well as the integration capabilities provided by Spring.

This course introduces techniques for using the many new and powerful capabilities that Spring4 supports. It includes complete coverage of the three main configuration styles (@Configuration, @Component, XML), and guidelines for their usage. It also covers more advanced capabilities such as support for JDBC and persistence frameworks like Hibernate, Spring declarative transactions, and Spring integration with JEE Web technologies.

The course covers all important capabilities of the Hibernate open source object/relational persistence and query service for Java. Coverage includes developing persistent classes in Java, as well as using associations/relationships, inheritance, polymorphism, composition and collections. It also covers fundamentals of JPA (the Java Persistence API) including JPA Annotations and JPQL (Java Persistence Query Language).

Comprehensive hands on exercises are integrated throughout to reinforce learning and develop real competency. Attendees build working Spring/Hibernate applications utilizing the IDE, providing a knowledge foundation applicable to all major development environments.

Course Prerequisites

Java SE programming experience and an understanding of object-oriented design principles. Fundamental knowledge of XML, HTML, and JavaScript is helpful but not required. HOTT's course Java Programming or equivalent knowledge provides a solid foundation.

Course Overview

Introduction to Spring Configuration in Depth

Overview of Spring Technology Annotation Driven Challenges for Modern Applications Configuration Motivation for Spring JSR 330 (@Named) and Spring Architecture Spring (@Component) The API annotation styles Spring Fundamentals @Named/@Component, Managing Beans @Inject/@Autowired, Inversion of Control/IoC @Repository, @Service Dependency Injection/DI Configuring Beans and Configuration Metadata Autowiring with Annotations Configuring Beans (XML) Enabling Annotations - The Spring Container context:component- Function of the Spring Container scan ApplicationContext Overview Annotation Pros and Cons ClassPathXmlApplicationContext Java Based Configuration FileSystemXmlApplicationContext (@Configuration) AnnotationConfigApplicationContext API and Usage Overview of Code- Dependencies and Dependency Injection (DI) Centric Configuration Examining Dependencies @Configuration and Dependency Inversion @Bean Dependency Injection (DI) in Spring Dependency Injection Resolving Dependencies Basic Configuration and Usage on Other Beans Injecting Configuration Classes Pros and Cons Integrating Configuration Types Choosing a Configuration Style Integrating Configuration Styles Importing: @Import Scanning with @Configuration Style Bean Scope and Lifecycle Bean Scope Defined Singleton, Prototype and Other Scopes Configuring Scope Bean Creation Lifecycle Lifecycle Callbacks BeanPostProcessor and Event Handling

Wiring in Depth Introduction to Hibernate

Value Injection Issues with Persistence Layers Configuring Value Properties and Object-Relational Mapping (ORM) Property Conversions Hibernate Overview and Externalizing Values in Properties Files Benefits Constructor Injection Hibernate Architecture Constructor Injection Overview Configuring Hibernate Configuration - and XML @Configuration hibernate.cfg. File p: and c: Namespaces for XML Configuration Connection Properties Qualifiers and Domain Specific Language (DSL) Database Dialect Limitations of Autowiring SessionFactory Qualifiers and DSL Configuration and Creating and Using an Annotation-Based DSL Session for Bean Configuration Mapping a Class Benefits of Qualifiers for Bean Configuration Persistent Entity Class Profiles Hibernate Mapping File Profiles Overview Mapping the Entity Class Configuring Profiles (XML and Primary keys: ID @Configuration) property, Generated ID Activating Profiles Hibernate Type System Introduction to SpEL Working with Sessions and Persistent Objects Logging: hibernate.show_sql, log4j Overview and Configuration for Hibernate

Spring/Hibernate Integration Updates and Queries

Overview of Spring Database Support Inserting, Updating and Configuring a DataSource Deleting Entities Using Contextual Sessions HQL - Hibernate Query Spring/Hibernate Configuration with Language Fundamentals The Query Interface and LocalSessionFactoryBean Creating and Working with SessionFactory Creating Spring/Hibernate DAO Classes Using Queries Contextual Sessions Named Queries Overview of Template Approach Projection Queries Aggregate Queries

Transaction (TX) Management The Hibernate Persistence Lifecycle Hibernate Transaction Management Transaction Overview and Transactions in The Lifecycle of Managed Hibernate Objects Hibernate Transaction API (in Managed and Persistent, Transient, and Non-Managed Environments) Detached Objects Intro to Spring Transaction Management The Persistence (Session) Context (Lifespan, Relation to Spring Transaction Managers Managed Objects, Spring Declarative TX Management Propagation) Spring TX Scope and Propagation Contextual Sessions Spring TX Attributes (REQUIRED, SUPPORTS, Synchronization to the etc) Database XML Configuration of Spring Transactions The Session as Cache Specifying Advice, TX Attributes, and Methods Optimistic Locking/Versioning Linking Advice with Pointcuts Detached Objects and Benefits of XML Configuration of TX Behavior Optimistic Locking Versioning Overview and Using Versioning Locking Objects

Relationships Spring Web Integration

Object Relationship Overview Integrating Spring with Java Mapping Collections of Value Objects EE Web Apps Entity Relationships: 1-N, N-1, N-N, 1-1 Mapping Entity Relationships ContextLoaderListener WebApplicationContext Uni and Bi-Directional Relationships Using Spring Beans in The Relationship "Inverse" Wep App Controller Cascading Over Relationships Logic Queries Across Relationships Lazy Loading vs. Eager Loading Inheritance Mapping Entity Inheritance with Hibernate -per-Class Mapping Table-per-Subclass Mapping Table-per-Concrete Class Mapping

Hibernate Additional Topics Hibernate and JPA (Java Persistence API) Components and Multi-Table Mapping equals() and hashCode() Overview of the Java Caching and Efficiency Persistence API (JPA)/EJB 3 Design Considerations Relationship Between JPA and Hibernate Mapping Entities with JPA Annotations The EntityManager, Persistence Context and Persistence Unit Working with Transactions

EntityTransaction, Managed and Unmanaged Environments Inserts and Updates JPQL - Java Persistence Query Language Versioning Relationships

Introduction to AJAX Java and AJAX

AJAX Architecture and Capabilities Callback Functions/Methods Client Side Built-In Objects Server Side Parsing AJAX Responses Circumventing the Page Reload Paradigm XML and JSON Response CSS, HTML and AJAX Formats JavaScript and DOM Servlet Code to Handle AJAX Object Requests XMLHttpRequest Server Side Persistence readyState and responseXML Properties AJAX Patterns and Best Making AJAX Asynchronous Calls Practices AJAX Function Calling Conventions Limitations of AJAX Response Handling with JavaScript Debugging AJAX Browser Compatibility Issues Server-Side and Client-Side AJAX

Adding AJAX to Existing Web Applications Web Services on the Server Side

Issues Adding AJAX to Existing Apps Overview of Web Services Dealing with Asynchronous Responses Advantages of Web Services Cross Browser Libraries and Frameworks Creating a Web Service Working with AJAX Toolkits Deploying a Web Services Dojo Toolkit Requirements for a JAX-WS Prototype Web Service Endpoint DWR (Direct Web Remoting) Implementation Class The Web Service Endpoint AJAX and REST Design Compatibility Issues Implementation Class Security Issues Working with WSDL Files Web Service Interoperability

Web Services on the Client Side

Consuming a Web Service Client Side Artifacts JAX-WS Clients Java/WSDL Mapping RESTful Web Services RESTful Web Services in Java

Hands On Technology Transfer The Best Way to Transfer Technology Skills

1 Village Square, Suite 8 14 Fletcher Street Chelmsford, MA 01824

Copyright © 2021 Hands On Technology Transfer, Inc.