Upgrade to Pro — share decks privately, control downloads, hide ads and more …

xgeeks - spring : projects, features and news

xgeeks - spring : projects, features and news


  1. Spring: projects, features and news Kamila Santos

  2. Kamila santos Backend Developer community organizer book co-author

  3. It provides a comprehensive model of configurations for Java-based applications,

    it allows us to focus on developing the application, already leaving most of the configurations ready or extremely simplified for us developers. Spring Framework
  4. Has features for dependency injection, data validation, tests, access to

    databases, development of Web applications, integrations and can also be used with languages such as Kotlin and Groovy. Spring Framework
  5. Spring Framework - Architecture Image From: https://www.tutorialspoint.com/spring/spring_architecture.htm

  6. Bean: provides beanFactory, wich is a implementation of factory pattern

    Core Container
  7. Core: provides the fundamental parts of the framework, including IOC

    (inversion of control ) and dependency injection features Core Container
  8. Context: is a medium to access any objects defined and

    confiured. The ApplicationContext interface is the focal point of this module. Core Container
  9. SpEL: provides a very powerful expression language used for manipulating

    and querying an object graph at runtime. Core Container
  10. JDBC: provides a JDBC -abstraction layer that removes the needs

    for some JDBC configuration/code Data Access Container
  11. ORM: provides integration layers for popular object-relational APIs (JPA, Hibernate...)

    Data Access Container
  12. OXM: provides an abstraction layers for supports Objects/XML mapping implementations

    (for example XStream,JAXB, Castor...) Data Access Container
  13. JMS (Java Messaging Service): contains features for producing and consuming

    messages. Data Access Container
  14. Transaction: supports transaction management for classes that implement special interfaces

    and for all Plain Old Java Objects. Data Access Container
  15. WebSocket: provides support for WebSocket- based, tow-way coomunication between client-

    server apps. Web Container
  16. Servlet (MVC): contains Spring MVC (Model-View- Controller) for web apps.

    Web Container
  17. Web: provides web-oriented features, such as initilialization of the IoC

    container using servlet- listenets and a web-oriented application context. Web Container
  18. Portlet: provides the MVC implementation to be used in a

    portlet environment. Web Container
  19. aspect-oriented programming: allow you to define method-interceptors and pointcuts to

    cleanly decouple code. AOP
  20. provides integration with AspectJ Aspects

  21. provides class instrumentation support and class loader implementations to be

    used in servers Instrumentation
  22. provides support for STOMP (Simple Text Orientated Messaging Protocol) as

    the WebSocket sub-protocol to use in applications. Messaging
  23. supports the testing of Spring components whith Junit or TestNG.

  24. It allows the creation of an application quickly, having an

    embedded server, a "starter" where we can choose the initial dependencies of the application, health check of the application, without the need to configure several dependencies via XML. Spring Boot
  25. Spring Initialzr

  26. It abstracts most of the settings and already provides a

    basis for your application to run, through Spring Security we can easily add authentication to our application and connect and query the database with almost no configuration through Spring data Web Apps
  27. Through the Spring Cloud Project, we have several solutions to

    be used in our microservices. Microsservices
  28. Imagem from : https://spring.io/microservices

  29. provides several tools that assist in the development of microservices,

    such as Config Server, load balance, circuit breakers, gateway, among others. Spring Cloud
  30. Image from : https://spring.io/cloud

  31. Service discovery enables microsservices to easily discover the route of

    other services that need to access Service Discovery
  32. most used: - spring cloud eureka - spring cloud consul

    Service Discovery
  33. has the role of being intermediaries in our requests for

    other services gateway
  34. most used: - spring cloud gateway - zuul gateway

  35. allows you to store configuration settings centrally Config server

  36. Ribon (depreciated), has the Spring Cloud Load Balancer as an

    alternative Load Balancer
  37. Facilitates the use of clients in a declarative and simplified

    way. Feign
  38. In Serverless applications we don't need to worry so much

    about allocating resources of other features related to the application server, Faas (Function as a Service), Sprimg Cloud Function Serverless
  39. for event-oriented applications (stream), we have the Spring Cloud Stream

    that has integration with Kafka. Event Driven
  40. For processing large routines and jobs in general, we have

    the Spring Batch project Batch
  41. responsible for abstracting a large part of our work with

    databases, such as writing simple queries (save, search by id, among others). Spring Data
  42. Supports authentication via JWT, Oauth services (developing your own Oauth

    server or being the client and connecting to the authentication server via social network eg), it also allows you to work with scopes Spring Security
  43. Spring WebFlux can be defined as a “parallel” version to

    the already known and widely used Spring MVC (servlet), having as main difference the support for reactive NIO streams and for supporting the concept of backpressure with the Netty server coming by default embedded in its architecture. spring webflux
  44. From version 5.0 of the Spring Framework we have a

    reactive part in addition to the Servlet structure that already existed, each module of these is optional, you can use the Servlet part, the reactive part or even both in your applications. spring webflux
  45. Spring Webflux was developed because we needed non-blocking applications that

    could work with a small number of threads simultaneously and that could be run with some hardware resources. spring webflux
  46. in Servlet 3.1, an NIO API was provided, but its

    use does not correspond to the rest of the API and to all the concepts behind Servlet, which has blocking contracts. spring webflux
  47. These factors were decisive for the development of a new

    API that was used independently of the execution time and in a non-blocking way, which was possible with the servers (Netty for example) that consolidated themselves in the asynchronous and non- blocking operation. spring webflux
  48. the proposal of spring native (which is in beta /

    experimental version) is to provide official support for compiling spring applications for native images with the graal vm Spring Native
  49. the proposal of spring native (which is in beta /

    experimental version) is to provide official support for compiling spring applications for native images with the graal vm Spring Native
  50. advantage of native images -> less memory usage and faster

    startup Spring Native
  51. Having this native image, we obtain executable code, through the

    AOT (Ahead of Time) compilation, Graal VM statically analyzes all dependencies, libs, jdk and etc. Spring Native
  52. generating an executable, in the early compilation, metadata is discarded.

    Whatever is not used for the application to work, it discards, leaving only what is necessary to run the application Spring Native
  53. https://spring.io/why-spring https://spring.io/projects/spring- framework#overview https://spring.io/web-applications https://spring.io/microservices https://spring.io/cloud https://spring.io/reactive References

  54. https://spring.io/event-driven https://spring.io/batch https://spring.io/projects/spring-boot https://spring.io/projects/spring-data https://spring.io/blog/2021/03/11/announcing- spring-native-beta https://www.tutorialspoint.com/spring/spring_a rchitecture.htm References