Appendix A. Solutions to Exercises

Chapter 1, Introducing the Spring Framework

Q1. What is Spring?

Spring is an open-source framework created by Rod Johnson. He addressed the complexity of enterprise application development, and described a simpler, alternative approach in his book Expert One-on-One J2EE Design and Development, Wrox. Spring is a lightweight inversion of control and aspect-oriented container framework. Any Java EE application can benefit from the Spring Framework, in terms of simplicity, loose coupling, and testability.

Spring is modular, allowing you to use only those parts that you need without having to bring in extra complexity. The Spring Framework can be used either for all layer implementations or for the development of particular layer of an application.

Q2. List some of the features of Spring?

The Spring Framework contains following features:

  • Lightweight: Spring is described as a lightweight framework when it comes to size and transparency.
  • Non-intrusive: Non-intrusive means that your domain logic code has no dependencies on the framework itself. The Spring Framework is designed to be non-intrusive.
  • Container: Spring's container is a light-weight container that contains and manages the life cycle and configuration of application objects.
  • Inversion of Control: IoC is an architectural pattern that describes the Dependency Injection that needs to be done by an external entity, rather than creating the dependencies by the component itself.
  • Aspect-oriented programming: AOP refers to the programming paradigm that isolates supporting functions from the main program's business logic.
  • JDBC exception handling: The JDBC abstraction layer of the Spring Framework provides an exception hierarchy.
  • Spring Web MVC framework: This helps in building robust and maintainable web applications. The Spring Web MVC framework also offers utility classes to handle some of the most common tasks in the web application development.
  • Spring Security: This provides a declarative security mechanism for Spring-based applications, which is a critical aspect of many applications.

Q3. Explain different modules in the Spring Framework.

The Spring Framework contains following modules:

  • Spring Core Module
  • Spring AOP Module
  • Spring DAO(JDBC) Module
  • Spring ORM Module
  • Spring Web Module
  • Spring Test Module
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.181.145