Тренингът се води от Траян Илиев, Oracle® сертифициран Java програмист с 20 годишен опит, разработчик на end-to-end reactive fullstack приложения с ES6/7, TypeScript, Angular, React и Vue, 15+ години опит като IT трейнър за международни софтуерни компании. Има множество презентации на Voxxed Days, jPrime, jProfessionals, BGOUG, BGJUG, DEV.BG на теми като SOA & REST (JAX-RS, Microservices), Spring и Spring Reactor, Angular, React, Redux, high-performance Java programming.
Продължителност: 40 часа
За кого е курса: Java разработчици
Какви умения ще придобиете:
- бърза разработка на Java Web и SOA (ориентирани към уеб услуги) приложения чрез богатата Spring екосистема от проекти и модули;
- цялостни уеб проекти – разработка, внедряване, оптимизация, сигурност и тестване на готови за продукция уеб приложения, услуги и клиенти с Hibernate, Spring MVC и REST;
- детайлен hands-on опит със Java, Spring Boot, Hibernate, JPA, Spring MVC, Spring Data, Spring Security, Spring MVC Test framework, JUnit, Mockito;
- новости в Java, Spring WebFlux и Spring Boot – функционално реактивно програмиране, обработка на потоци от събития в реално време, сигурност.
Програма на курса:
- Introduction to Spring – evolution of Java Spring framework, main features, Spring main modules. Introduction to Maven and Gradle for Java. Building a HelloSpring application using XML and annotation-based configurations. Introduction to Spring Boot – building HelloSpringMVC simple web application using spring-boot-starter-web. Configuring dispatcher, resolver, static resources, locale, multipart, error handling and encoding with Spring Boot and Spring embedded servlet container (Tomcat). (2 h)
- Inversion of Control (IoC) and Dependency Injection (DI) in Spring – lookup vs. injection, constructor, setter and field-based DI in Java. Instantiating the container. Beans and BeanFactory Configuring ApplicationContext – basic configuration, classpath scanning and filters, component declaring meta-annotations. XML-based configuration using GenericXmlApplicationContext. Java annotations configuration (@Bean, @Configuration, @ComponentScan) – AnnotationConfigApplicationContext. Mixing XML & Java – @Import, @ImportResource. Instantiating beans using constructor and static/instance factory methods. Dependency resolution process. Dependencies and configuration in detail – values, bean references, inner beans, collections, maps, null handling, p- and c-namespaces, compound property names, depends-on, lazy initialization, autowiring. Excluding a bean from autowiring. Limitations and disadvantages of autowiring. (4 h)
- Introduction to Spring Web MVC – Spring MVC architecture: DispatcherServlet, HandlerMappingm Controller, ViewResolver, View. Using Thymeleaf templates to build our first page. Building simple controller – @Controller, @RequestMapping. Passing data to the View using Model, ModelMap, and ModelAndView. Getting data with a request parameter – @RequestParam. Building a sample Spring MVC application. (2 h)
- Inversion of Control (IoC) and Dependency Injection (DI) in Spring (Advanced) – Bean scopes – singleton, request, session, application, websocket, and custom scopes. Web configuration. Scoped beans as dependencies – <aop:scoped-proxy>. Lifecycle callbacks – initialization, destruction, @PostConstruct, @PreDestroy. ApplicationContextAware, BeanNameAware interfaces. Using Spring resource injection annotations – @Autowired, @Component, @Scope, @Value, @Required, @Qualifier, @Lazy, @Primary. Using JSR 330 standard annotations – @Resource, @Inject, @Named, @ManagedBean, @Qualifier, @Alternative. Environment and profiles, @PropertySource. I18N using MessageSource. Events and event listeners – @EventListener, @Order, @Async. (3 h)
- Resources and resource loaders. Validation, data binding, and type conversion. JSR-349 Bean Validation 1.1. Spring’s Validator Resolving codes to error messages. PropertyEditors and type conversion. Null-safety annotations. (1 h)
- Handling forms and complex URL mapping – validation, customizing validation messages. Enabling internationalization (i18n) and localization (l10n) – configuring i18n in the DispatcherServlet configuration, changing locale, translating application text. Displaying lists. Request mapping in depth – HTTP methods, URI patterns, suffix match, matrix variables, parameters, headers. Handling file uploads. Handling errors and error message translation. Custom error pages. Using sessions. (3 h)
- Introduction to Spring Expression Language (SpEL) and Aspect Oriented Programming (AOP) with Spring. AOP concepts – aspect, advice, joint point, pointcut, introduction, target object, AOP proxy. Types of advices. Dynamic proxies. Declaring Advisors examples: declarative transactions, retrying operation execution. (2 h)
- Spring JDBC Support – DAO pattern, simple relational DB example, Spring JDBC Infrastructure, database Connections and DataSources, embedded database support, exception handling. JdbcTemplate Retrieving nested entities with ResultSetExtractor. Spring classes modelling main JDBC operations. Inserting data and retrieving the generated key. Spring Data project – JDBC extensions. Spring Boot starter JDBC. (3 h)
- Object to Relational Mapping (ORM). Using Hibernate and JPA with Spring. Transactions – Hibernate API Java Persistence API (JPA). Important ORM concepts using Hibernate. Configuring the Hibernate SessionFactory. ORM mapping using Hibernate annotations. Hibernate Session interface – querying, inserting, updating and deleting data. Annotating fields or properties. Spring Data access using JPA 2.1 – ORM mapping using JPA annotations, database operations using JPA Repository abstraction, custom queries. Spring Boot starter data JPA. Validation using Beans Validation annotations. Considerations choosing the right data management approach. (4 h)
- Transaction management – transaction types, interfaces PlatformTransactionManager, TransactionDefinition and TransactionStatus, AOP-based transaction management config. Using programmatic transactions. (1 h)
- Building RESTful Web Services with Spring – introduction to SOA, REST and HATEOAS, levels of maturity of web applications, resources and sub-resources, URI templates. Using Spring MVC to expose RESTful web services – @Controller, @RequestMapping, @ResponseBody, @RestController. Configuring JSON/XML data binding. Configuring Spring web application. Using curl client to test the REST service. Building dedicated Spring client using RestTemplate. Securing RESTful web service with Spring Security – @EnableWebSecurity, WebSecurityConfigurerAdapter, HttpSecurity, Documentation with Swagger. RESTful web services with Spring Boot. (3 h)
- Building fully featured web applications with Spring Web MVC – implementing multi-layer web applications including DAO, service and presentation layers. Spring MVC architecture – requests life-cycle, responding to normal HTTP and Ajax requests, WebApplicationContext hierarchy, main components – handlers, handler interceptors, error and view resolvers, configuration. Spring integration with different view technologies. Implementing views with Thymeleaf. Securing web apps with Spring Security. Cross Origin Resource Sharing (CORS). Production grade Spring MVC optimizations – gzipping, cache control, using application cache (@EnableCaching, CacheManager, @Cacheable, @CachEvict, @CachePut, @Caching, @CacheConfig), async methods, ETags (ShallowEtagHeaderFilter). Using WebSocket API with Spring and SockJS. (4 h)
- Spring web application testing – TDD, unit, integration, front-end (end-to-end), and performance testing. Mocks and stubs. Using Spring Testing Unit testing Spring components using JUnit and Mockito. Integration testing – configuring service-layer testing profile, Spring MVC Test framework. End-to-end testing with Selenium / FluentLenium.(4 h)
- Spring WebFlux – reactive programming, Reactive Streams Project Reactor. REST services with WebFlux –annotation-based and functional reactive. Router, handler and filter functions. Reactive repositories and database access with Spring Data. End-to-end non-blocking reactive web services with Netty. Reactive WebClients and integration testing. Reactive WebSocket Real-time event streaming to JS clients using SSE. (4 h)
Презентациите, демонстрациите и hands-on упражненията се провеждат паралелно с цел незабавно затвърждаване на концепциите чрез практика.
Участниците ще се научат да разработват, внедряват и тестват готови за продукция и сигурни уеб приложения и услуги със Spring Boot, Hibernate, Spring MVC, и REST. Обучението се осъществява в малки групи – до 10 човека. По време на тренинга ще можем да дискутираме и допълнителни въпросиима възможност за дискутиране на допълнителни въпроси от интерес за участниците.
За повече информация и въпроси ни пишете на e-mail: office@iproduct.org