20
The Spring Framework @maxgoff BIG SMART DATA

The Spring Framework

Embed Size (px)

Citation preview

Page 1: The Spring Framework

The Spring Framework @maxgoff

BIG SMART DATA

Page 2: The Spring Framework

The Spring Framework:

BIG SMART DATA

⁻ What is Spring ⁻ Modules ⁻ Spring MVC

Page 3: The Spring Framework

What is Spring?

Comprehensive Programming/Config model Modern Java-based (JVM) Enterprise Focus: Lightweight & “Plumbing” Flexible Dependency Injection Infrastructure (support) for declarative:

transactions caching validation formatting

BIG SMART DATA

Spring Origin: Rod Johnson (Expert One-on-One J2EE Design and Development)

Page 4: The Spring Framework

What is Spring?

Powerful abstractions: JDBC, JPA, JTA, JMS

Support for open source frameworks: Hibernate, Quartz

Flexible Web Framework for RESTful MVC Rich testing facilities

BIG SMART DATA

Page 5: The Spring Framework

⁻ Modular in design ⁻ Incremental adoption ⁻ Range of deployment

platforms, such as Tomcat & WebSphere

⁻ Citizen of major clouds such as Heroku, VMware, & Amazon

What is Spring?

BIG SMART DATA

Page 6: The Spring Framework

• Dependency Injection • Aspect-oriented programming • Data access framework • Transaction management framework • Remote access framework • Convention-over-configuration • Model-view-controller framework

BIG SMART DATA

Spring Modules

Page 7: The Spring Framework

• Inversion of control container • Uses Java Reflection • Creates managed objects (“beans”) • Dependency Lookup • Dependency Injection Patterns: • Constructors • Properties • Factories

BIG SMART DATA

Dependency Injection

Spring Modules

Page 8: The Spring Framework

BIG SMART DATA

Dependency Injection

Spring Modules

The Spring Container

Fully configured

system

Configuration Metadata

Your Business Objects (POJOs)

produces

Page 9: The Spring Framework

• AOP: • increases modularity • allows for separation of cross- cutting concerns

BIG SMART DATA

Aspect-oriented framework

Spring Modules

Page 10: The Spring Framework

• Resource management • Exception handling • Transaction participation • Resource unwrapping • Abstraction

BIG SMART DATA

Data access framework

Spring Modules

Page 11: The Spring Framework

• Spring brings transaction abstractions:

• global, local, nested

• Platform TransactionManager

• Transaction Template

• metadata or Java annotations

BIG SMART DATA

Transaction management framework

Spring Modules

Page 12: The Spring Framework

• Abstraction for various RPC technologies

BIG SMART DATA

Remote access framework

Spring Modules

Convention-over-configuration • Spring Roo

(http://www.springsource.org/spring-roo)

Page 13: The Spring Framework

• Request-based framework • Strategy interfaces • GOAL: Simple and clear

BIG SMART DATA

MVC Framework Spring Modules

Page 14: The Spring Framework

• Front Controller: DispatcherServlet Class

BIG SMART DATA

MVC Framework Spring Modules

Page 15: The Spring Framework

• Clear separation of roles: Each role (controller, validator, command object, DispatcherServlet, etc) can be fulfilled by a specialized object

• Configuration of both framework and application classes as JavaBeans:

BIG SMART DATA

MVC Framework Spring Modules

Page 16: The Spring Framework

• Adaptability & flexibility: Define any controller method signature you need, possibly using one of the parameter annotations

• Reusable business code: Use existing business objects as command or form objects instead of mirroring them to extend a particular framework base class

BIG SMART DATA

MVC Framework Spring Modules

Page 17: The Spring Framework

• Customizable binding & validation • Customizable handler mapping & view resolution • Flexible model transfer:

Model transfer with a name/value Map supports easy integration with any view technology

• Customizable locale and theme resolution • Support for JSPs with/without Spring tag library

BIG SMART DATA

MVC Framework Spring Modules

Page 18: The Spring Framework

• Support for JSTL • Support for Velocity without the need for

extra bridges • Spring tag library for data binding & themes • JSP form tag library

BIG SMART DATA

MVC Framework Spring Modules

Page 19: The Spring Framework

Spring Resources Tutorials:

Developing a Spring Framework MVC application: http://static.springsource.org/docs/Spring-MVC-step-by-step/

Introduction to Spring Web MVC:

https://netbeans.org/kb/docs/web/quickstart-webapps-spring.html

Resources: The Spring Framework:

http://www.springsource.org/spring-framework Modern Web:

http://www.springsource.org/features/modern-web NetBeans IDE:

http://netbeans.org

BIG SMART DATA

Page 20: The Spring Framework

http://about.me/maxgoff http://linkedin.com/in/maxgoff

http://bigsmartdata.com @maxgoff

BIG SMART DATA