spring framework 101

12
Spring 101 A 30 Minute Review by Matthew McCullough

Upload: matthew-mccullough

Post on 13-Jul-2015

3.446 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Spring Framework 101

Spring 101A 30 Minute Review by Matthew McCullough

Page 2: Spring Framework 101

❶ What Is Spring?Don’t call me, I’ll call you

Page 3: Spring Framework 101

• Java Application Framework (Not JEE)

• Targets Web, Enterprise Applications

• POJO Centric

• Inversion of Control (IOC)

• Now called Dependency Injection (DI)

Page 4: Spring Framework 101

❷ Modularized

Alphabet Soup

Page 5: Spring Framework 101

• JDBC Wrapper

• JDO, iBatis, Hibernate, JPA helper

• Supplement to Struts, Tapestry

• Batch Processing Framework

• Timed Events

• JMS, JNDI, LDAP

Page 6: Spring Framework 101

❸ IOC/DIDon’t call me, I’ll call you

Page 7: Spring Framework 101

• Core Spring capabilities

• Configure components from outside-in

• Counter to the usual constructor calling out to everything it needs

Page 8: Spring Framework 101

• DI/IOC can be used in three ways

• POJO Setters

• Constructors

• Service lookup (JNDI)

Split Personalities

Page 9: Spring Framework 101

❹ Factory

But not the kind that Al Gore worries about

Page 10: Spring Framework 101

• POJO Centric

• BeanFactory creates beans

• Gives toggle choice between singleton and instances

• Creates PROPER singletons

• Auto-wiring by name

Page 11: Spring Framework 101

❺ Aspects

Page 12: Spring Framework 101

• Supplement existing methods on the fly

• Terminology: Proxies, Weaving, AspectJ

• Weaving:

• Byte time

• Load time