Spring and Hibernate Development

The Spring Framework is one of the leading lightweight architectures for creating enterprise-scale applications in Java. Hibernate is a popular object-relational mapping tool, and is well-suited to Spring-based solutions. This course provides thorough coverage of both technologies, and shows how they can be used together effectively. You will learn how to use Spring to create enterprise-scale components including Web applications, Web services, data-access components, and messaging components. You will also learn how to use Hibernate to map Java classes to databases, and how to execute queries using a variety of techniques.

What youll learn:

  • Creating and using Spring beans
  • Implementing dependency injection
  • Using Spring data access and transaction APIs
  • Creating Spring MVC Web applications
  • Defining and using Web services using Spring
  • Understand Hibernate mapping and API choices
  • Mapping classes to tables
  • Using JPA and/or HQL to query entities
  • Mapping associations

Audience:

  • Developers creating enterprise Java applications using Spring and Hibernate.

Prerequisites:

  • At least 6 months Java programming experience.
  • Familiarity with relational databases and SQL

Course outline:

Spring Framework - Essentials:

  • Implementing IoC in Spring
  • Implementing dependency injection via beans and bean factories
  • Spring bean definition profiles and environments

More about Spring Bean Configuration:

  • Property editors
  • Type converters
  • Autowiring and component scanning
  • Spring Expression Language
  • Spring unified property management
  • Bean definition profiles
  • Caching

Java-Based Bean Configuration:

  • Using the @Configuration annotation
  • Dependency injection in Java-based configuration
  • Using Spring support for XML namespaces in Java-based configuration
  • Accessing properties

Understanding the Application Context Lifecycle:

  • Bean factory post processing
  • Bean post processing
  • Implementing @PostConstruct and @PreDestroy methods
  • Understanding dynamic proxies

Aspect-Oriented Programming (AOP):

  • Spring AOP architecture
  • Defining pointcuts
  • Defining joinpoints
  • Implementing advice methods
  • Understanding pointcut designators
  • Implementing introductions

Spring Data Access:

  • Spring data access concepts
  • JdbcTemplate
  • Spring repositories and application architecture
  • JPA integration
  • Hibernate integration

Spring Transactions:

  • Local vs. global transactions
  • Understanding PlatformTransactionManager
  • Declarative transactions
  • @Transactional
  • Advising transactions
  • Roll-backs
  • Bean-specific transactions

Creating Web Applications with Spring Web MVC:

  • Overview of MVC
  • Spring MVC implementation
  • Configuring a dispatcher servlet
  • Defining a controller
  • Mapping request parameters
  • Mapping path variables
  • Accessing HTTP cookies, headers, and session state

Going Further with Spring Web MVC:

  • Form handing
  • Formatting
  • Validation
  • Java-based MVC configuration
  • Ajax support
  • Asynchronous requests

Spring Web Services:

  • Hosting SOAP web services in Spring
  • Implementing RESTful services
  • Using Spring REST annotations
  • Implementing RESTful Clients

Getting Started with Hibernate:

  • Object-relational mapping (ORM) concepts and issues
  • Overview of mapping
  • Introduction to HQL and JPA

Query Techniques:

  • Finding objects by primary key
  • Querying for entities
  • Using functions
  • Ordering, paging, and filtering
  • Projections
  • Handling simple associations
  • Named queries

Mapping Classes by using Annotations:

  • Getting ready for annotations
  • Using annotations
  • Strategies for generating IDs
  • Embedded Objects

Managing Entities:

  • Entity states
  • Managing attached entities
  • Managing detached entities

Mapping Associations:

  • Relationships and associations
  • Defining 1-1 associations
  • Defining 1-many associations
  • Defining many-many associations
  • Defining join classes
  • Cascading

Andy Olsen - author of the course

Andy is a freelance consultant and instructor based in the UK, working mostly in the City of London and Oxford. Andy has been working with .NET since the Beta 1 days and has extensive experience in many facets of .NET development including WCF, WPF, WF, ASP.NET MVC Web development, and mobile applications. Andy has designed and written many Microsoft Official Curriculum courses in the last decade, and has been engaged as author and technical reviewer with Apress on some of their biggest selling books.

Other relevant courses