spring3 overview

Upload: gautam-popli

Post on 14-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Spring3 Overview

    1/25

    1

    Spring FrameworkSpring Framework

    Overview & ToolsOverview & Tools

    Sang ShinSang Shinwww.javapassion.comwww.javapassion.com

    Learning is fun!Learning is fun!

    1

  • 7/27/2019 Spring3 Overview

    2/25

    2

    Topics

    What is Spring framework?

    Why Spring framework?

    Spring framework architecture Usage scenario

    Tools (we are going to use in this course)

  • 7/27/2019 Spring3 Overview

    3/25

    3

    What is SpringWhat is SpringFramework?Framework?

  • 7/27/2019 Spring3 Overview

    4/254

    What is Spring Framework?

    Light-weight yet comprehensive framework forbuilding Java applications Web applications

    Enterprise applications

    Desktop applications

    Batch application

    Integration/SOA application

  • 7/27/2019 Spring3 Overview

    5/255

    Key Features - DI

    JavaBeans-based configuration management,applying Inversion-of-Control principles,specifically using the Dependency Injection (DI)

    technique This aims to eliminate manual wiring of components

    A core bean factory, which is usable globally

    Spring MVC uses it internally

  • 7/27/2019 Spring3 Overview

    6/256

    Key Features - Persistence

    Generic abstraction layer for databasetransaction management

    Higher abstraction over JDBC

    Integration with persistence frameworks such asHibernate, JPA

  • 7/27/2019 Spring3 Overview

    7/25

    7

    Key Features - Web-Tier

    Spring MVC web application framework, built oncore Spring functionality, supporting manytechnologies for generating views, including

    JSP, Facelets, FreeMarker, Velocity, Tiles,iText, and POI(Java API to Access MicrosoftFormat files).

    Spring Web Flow - fine-grained navigation

  • 7/27/2019 Spring3 Overview

    8/25

    8

    Key Features - AOP

    Extensive aspect-oriented programming (AOP)framework for providing services such astransaction management, security support

    As with the Inversion-of-Control parts of the system,this aims to improve the modularity of systemscreated using the framework.

  • 7/27/2019 Spring3 Overview

    9/25

    9

    Why UseWhy UseSpring Framework?Spring Framework?

  • 7/27/2019 Spring3 Overview

    10/25

    10

    Why Use Spring?

    Wiring components (JavaBeans) throughDependency Injection

    Promotes de-coupling among the parts that make upan application

    Design to interfaces

    Insulates a user of a functionality from implementationdetails

    Test-Driven Development (TDD)

    POJO classes can be tested without being tied up withthe framework

  • 7/27/2019 Spring3 Overview

    11/25

    11

    Why Use Spring? (Continued) Declarative programming through AOP

    Easily configured aspects, esp. transaction support

    Simplify use of popular technologies Abstractions insulate application from specifics,

    eliminate redundant code

    Underlying technology specifics still accessible

    Handle common error conditions

  • 7/27/2019 Spring3 Overview

    12/25

    12

    Why Use Spring? (Continued) Conversion of checked exceptions to

    unchecked

    (Or is this a reason not to use it?) Not an all-or-nothing solution

    Extremely modular and flexible

    Well designed Easy to extend Many reusable classes

  • 7/27/2019 Spring3 Overview

    13/25

    13

    Why Use Spring? (Continued) Integration with other technologies

    EJB (for Java EE applications)

    JPA, Hibernate, iBates, JDBC (for data access) Velocity, etc. (for presentation)

    JSF, Wicket, Struts, etc (For web)

  • 7/27/2019 Spring3 Overview

    14/25

    14

    Spring FrameworkSpring FrameworkArchitectureArchitecture

  • 7/27/2019 Spring3 Overview

    15/25

    15

    Spring Framework Architecture

  • 7/27/2019 Spring3 Overview

    16/25

    16

    Usage ScenariosUsage Scenarios

  • 7/27/2019 Spring3 Overview

    17/25

    17

    Usage Scenarios

    You can use Spring in all sorts of scenarios,from applets up to fully-fledged enterpriseapplications using Spring's transaction

    management functionality and web frameworkintegration

  • 7/27/2019 Spring3 Overview

    18/25

    18

    Typical Full-fledged Spring WebApplication

  • 7/27/2019 Spring3 Overview

    19/25

    19

    Spring Middle-tier Using 3rd partyWeb Framework

  • 7/27/2019 Spring3 Overview

    20/25

    20

    Remoting Usage Scenario

  • 7/27/2019 Spring3 Overview

    21/25

    21

    ToolsTools

  • 7/27/2019 Spring3 Overview

    22/25

    22

    SpringSource Tool Suite (STS)

    Eclipse-powered development environment forbuilding Spring-powered enterprise applications

    Supports Java, Spring, Groovy and Grails

    Comes with developer edition of vFabric tcServer

    vFabric tc Server is Tomcat that is optimized forSpring

  • 7/27/2019 Spring3 Overview

    23/25

    23

    Eclipse and Tomcat

    You can use Eclipse and Tomcat for buildingand deploying Spring application

    You have to install m2eclipse Maven plug-in's

    to Eclipse IDE yourself Core and WTP m2eclipse plug-in's

    You have to install and configure Tomcat toEclipse IDE yourself

  • 7/27/2019 Spring3 Overview

    24/25

    24

    JRebel

    JVM plug-in that detects any change in Springapplication Java, annotations, configurationfiles and make the changes instantly visible

    Commercial product You can get 3-month free license from

    http://www.javapassion.com/getjrebel

    Usage of JRebel is optional for this course but isrecommended

  • 7/27/2019 Spring3 Overview

    25/25

    25

    Thank you!Thank you!

    Check JavaPassion.com Codecamps!Check JavaPassion.com Codecamps!http://www.javapassion.com/codecampshttp://www.javapassion.com/codecamps

    Learn with Passion!Learn with Passion!

    31

    http://www.javapassion.com/codecampshttp://www.javapassion.com/codecampshttp://www.javapassion.com/codecamps