EIEIOTECHNOVATION
← Training programmes

EIEIO / PROGRAMMING & DEVELOPMENT

Spring

Course outline

3 days

Duration

3 days

Overview

A framework provides a standard way to build and deploy applications. Framework provides generic functionality, which can be selectively changed by additional user-written code, thus providing application-specific software. Frameworks aim to facilitate software development by allowing programmers to devote their time to meeting software requirements rather than dealing with more standard low-level details of providing a working system, thereby reducing overall development time. For instance, a team developing a banking website can focus on writing code particular to banking rather than the mechanics of request handling, user role management and state management.

Web applications can be developed using existing JEE technologies such as servlets, JDBC, JSP. When application grows without a framework the hard-wired page navigations, control logic, business logic will start causing headaches and the code gets messy. Spring is an open source powerful Java application framework, used in a wide range of Java applications. Spring provides enterprise services to Plain Old Java Objects (POJOs) and uses dependency injection to achieve simplification and increase testability. The extensions available in Spring framework assist in building web applications on top of Java EE platform. Spring framework targets to make J2EE development easier to use and promotes good programming practices by enabling a POJO-based programming model.

This course provides an introduction to Spring framework. It discusses the features of Spring and how to utilize Spring to rapidly develop web applications using Spring.

Objective

  • Understand the basics of Web Application - POST, GET, HTTP, MVC Pattern
  • Create Spring MVC Applications using various options
  • Run the applications using the embedded servlet containers
  • Styling the web project using Bootstrap framework
  • Connect to databases using Spring Data
  • Build REST Services in Spring Boot
  • Secure your applications using Spring Security
  • Create an executable JAR of your application
  • Understand Spring Boot Actuator and Spring Boot Developer Tools

Target Participants

The primary target audience for this course is software developers / programmers. Students new & beginner to the Spring Framework.

Program Prerequisites

  • Students should be familiar with the Java programming language
  • Web Development Experience (HTML / CSS / JavaScript)
  • A computer that can run Spring Tools Suite
  • Familiar with MVC

Mode of Delivery

Every participant will be provided with course notes and are required to bring in their own laptops for hands-on exercise and practice sessions.

Course Outcome

By end of this program every participant will complete "creating a web based customer profile solution". The solution will allow the administrator to login and create customers. Every customer record will have multiple tabs consisting of address details, order details, payment details and shipping details.

The customer will be able to login to the portal and view their details, modify their address details, order details and also update their payment details.

Day 1

  • Introduction to Spring

Overview

  • Spring Framework
  • Why Spring
  • Spring Introduction
  • Shortcomings of Java EE and the Need for Loose Coupling
  • Managing Beans, The Spring Container, Inversion of Control
  • The Factory Pattern
  • Configuration Metadata - XML, @Component, Auto-Detecting Beans
  • Dependencies and Dependency Injection (DI) with the BeanFactory
  • Setter Injection
  • Dependency Injection
  • Using the Application Context
  • Constructor Injection
  • Property Editors
  • Factory Methods
  • Crucial Namespaces 'p' and 'c'
  • Configuring Collections
  • Bean Definition Inheritance and Collection Merging
  • Expression Languages, SpEL
  • The Spring Container and API
  • The Spring Managed Bean Lifecycle
  • Key interfaces, Annotations and BeanPostprocessors
  • Event Handling and Listeners
  • Message Sources and Internationalization
  • Autowiring Dependencies
  • Other Metadata Configurations
  • Annotation Configuration @Autowired, @Required, @Resource
  • @Component, Component Scans. Component Filters
  • @Value and @Qualifier
  • Life Cycle Annotations
  • Java Configuration, @Configuration, XML free configuration (Optional)
  • The Annotation Config Application Context

Day 2

  • Spring 4 Specifics
  • Groovy Bean Definition DSL
  • Generic Qualifiers for Bean Injection
  • Using CGLib Proxy classes with the objenesis library
  • Using @Conditional and @Lazy
  • Java 8 feature support
  • Spring and Persistence
  • Spring and JDBC
  • JdbcTemplate/JdbcDaoSupport
  • Spring and Hibernate
  • HibernateTemplate/HibernateDaoSupport
  • Spring and JPA
  • JpaTemplate/ JpaDaoSupport
  • Direct access to JPA via @PersistenceUnit and @PersistenceContext
  • CRUD methods
  • Spring AOP
  • PointCuts, JoinPoints, Aspects, Adices
  • Before, After, AfterReturning, AfterThrowing, Around
  • Annotation Configuration
  • XML Configuration
  • Transaction Management
  • Transaction Propagation
  • Declarative Transaction Management: @Transactional
  • Annotation Configuration, Rollback Rules, Isolation
  • Advisors
  • XML Configuration
  • Develop Web Applications using the Spring Framework – Spring MVC
  • The WebApplicationContext and the ContextLoaderListener
  • Model View Controller
  • Front Controller Pattern
  • DispatcherServlet Configuration
  • Controllers, RequestMapping
  • Working with Forms
  • Getting at the Request @RequestParam
  • Getting at the @RequestHeader
  • Getting at the @CookieValue
  • ModelAndView
  • Using the POST Redirect GET pattern with FlashAttributes

Day 3

  • Advanced techniques
  • Spring form tags and Model Binding, @ModelAttribute
  • Chain multiple View Resolvers
  • Handler Interceptors
  • Data Validation JSR303
  • Spring Controllers and Ajax
  • JavaScript (JQuery) access to Controllers
  • URI Templates
  • Using @ResponseBody
  • JSON and XML data exchange
  • HTTP GETS and POSTS
  • RESTful Web Services
  • Core REST concepts
  • REST support in Spring 4.x
  • Use Spring MVC to create RESTful Web services
  • REST specific Annotations in Spring
  • Introduction to spring Microservices
  • Working with RestTemplate
  • URITemplates, @PathVariable, @RequestParam
  • JSON and XML data exchange
  • @RequestMapping
  • Spring Boot
  • What is Spring Boot? – Auto Config
  • How to use Spring Boot?
  • Maven Dependencies
  • Plugin In POM
  • Spring Starter POM
  • Spring Boot Application Starters
  • @EnableAutoConfiguration
  • @SpringBootApplication
  • General Configuration :-
  • Application.properties
  • Excluding AutoConfigured Beans
  • Embedded Database Support
  • Configuring Emdedded Server
  • Reading Property file
  • Ease : Avoiding Prefix
  • YAML

Programme scope, delivery arrangements and suitability are confirmed during enquiry.