Anda di halaman 1dari 18

Introduction to Core Spring

A 4-day bootcamp that teaches you how to use the Spring Framework to create well-designed, testable business applications

Copyright 2005-2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

How You will Benefit


Learn to use Spring for web and other applications Gain hands-on experience 50/50 presentation and labs

Goals of Spring Framework


Provide comprehensive infrastructural support for developing enterprise Java applications
Spring deals with the plumbing So you can focus on solving the domain problem

Springs Support (1)


Core support
Application Configuration Enterprise Integration Testing Data Access

Application Configuration
A typical application system consists of several parts working together to carry out a use case

Component A

Component B

Component C

Example: A Money Transfer System

TransferService transfer( 300.00, 1, 2)

AccountRepository

loadAccount(1);
a1

new new

Account 1 Account 2

loadAccount(2);
a2

debit(300.00) credit(300.00) updateAccount(a1); confirmation

updateAccount(a2);

Springs Configuration Support


Spring provides support for assembling such an application system from its parts
Parts do not worry about finding each other Any part can easily be swapped out

Parts are Just Plain Old Java Objects


public class JdbcAccountRepository implements AccountRepository { } Implements a service interface public class TransferServiceImpl implements TransferService { private AccountRepository accountRepository; public void setAccountRepository(AccountRepository ar) { Part 2 accountRepository = ar; } Depends on service interface; } conceals complexity of implementation; allows for swapping out implementation
8

Part 1

Swapping Out Part Implementations

Spring TransferServiceImpl

StubAccountRepository JdbcAccountRepository JpaAccountRepository

ForJdbc Jpa For Unit For Testing

(1)new newStubAccountRepository(); JdbcAccountRepository(); (1) JpaAccountRepository(); (2) (2)new newTransferServiceImpl(); TransferServiceImpl(); (3) (3)service.setAccountRepository(repository); service.setAccountRepository(repository);

Spring Enterprise Integration


Spring helps you integrate powerful enterprise services into your application
While keeping your application code simple and testable

Plugs into all Java EE application servers


While capable of standalone usage

10

Testing
Automated testing is essential Spring enables unit testability
Decouples objects from their environment Making it easier to test each piece of your application in isolation

Spring provides system testing support


Helps you test all the pieces together

11

Course Agenda: Day 1


Introduction to Spring Using Spring to configure an application Simplifying XML-based configuration Annotation-based dependency injection Java-based dependency injection

12

Course Agenda: Day 2


Understanding the bean life-cycle Testing a Spring-based application using multiple profiles Introducing data access with Spring Adding behavior to an application using aspects Simplifying JDBC-based data access

13

Course Agenda: Day 3


Driving database transactions in a Spring environment Introducing object-to-relational mapping (ORM) Working with JPA in a Spring environment Effective web application architecture Getting started with Spring MVC

14

Course Agenda: Day 4


Securing web applications with Spring Security Understanding Spring's remoting framework Simplifying message applications with Spring JMS Adding manageability to an application with Spring JMX

15

Become a SpringSource Certified Spring Professional In 4 Days

Attend the 4-Days Core Spring Workshop

View Complete Details

16

Who will benefit?

Developers and Architects, who wish to build a Spring-powered JEE application that demonstrates the Spring Framework and other Spring technologies

View Complete Details

17

Q&A
training@springpeople.com +91 80 65679700 www.springpeople.com

A SpringSource Certified Partner and

VMware Authorized Training Center

18

Anda mungkin juga menyukai