Full Stack Development with JHipster
上QQ阅读APP看书,第一时间看更新

Spring Framework

The Spring Framework (https://spring.io) might be the best thing since sliced bread in the Java world. It changed the Java web application landscape for the good. The landscape was monopolized by JavaEE vendors before the rise of Spring and soon after Spring, it became the number one choice for Java web developers, giving JavaEE a run for its money. At its core, Spring is an Inversion of Control (IoC) (https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans) container providing dependency injection and application context. The main features of Spring or the Spring triangle, combine IoC, Aspect-Oriented Programming (AOP) (https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#aop), and technology abstractions together in a consistent way. The framework has numerous modules aimed at different tasks, such as data management, security, REST, web services, and so on. Spring Framework and its modules are free and open source. Let us see some of the important modules in a bit more detail.

IoC  is a software design pattern where custom or task-specific code is invoked by a library, rather than the traditional procedural programming approach where custom code calls libraries when required. IoC helps to make the code more modular and extendable. AOP  provides another way of thinking about program structure. The unit of modularity is the aspect that enables the modularization of concerns such as transaction management that cut across multiple types and objects.