Transcript Spring
Training
[email protected]
What’s Spring?
The leading full-stack Java/JEE
application framework
Why Spring?
•
•
•
•
•
•
•
Hibernate
JPA
iBatis
JDO
TopLink
OJB
JDBC Encapsulation…
What’s IoC?
Inversion of Control
public class Girl {
void kiss(){
Boy boy = new Boy();
}
}
public class Girl {
void kiss(){
Boy boy =
BoyFactory.createBoy();
}
}
public class Girl {
void kiss(Boy boy){
boy.kiss();
}
}
Do not call us, we will call you.
Why IoC?
Loose Couple
• Data Source
• DAO/Manager
• Singleton…
What’s AOP?
Aspect Oriented Programming
Aspects in JavaEE
•
•
•
•
•
•
Authentication
Transactions
Validations
Logging
Caching
Error handling…
Why AOP?
Separation of concerns
Book addBook(params) {
if (!isLogin()) {
// bad smell
redirec_to home_path
} else {
doAddBook()
}
}
ORM / DAO
•
•
•
•
•
•
•
Hibernate
JPA
iBatis
JDO
TopLink
OJB
JDBC Encapsulation…
Web
•
•
•
•
•
•
SpringMVC
Struts
WebWork
Tapestry
JSF
FreeMarker / Velocity / JSP…
JavaEE Integration
•
•
•
•
•
•
•
Remoting
EJB
JMS
JMX
JCA
Email
Scheduling…
So, What’s
?
Assembly plant
=> IoC
Polyhedron
=> AOP
Smelter
=> glue
PoJo Enhancement
Let’s see the code.
What’s new in Spring 2.0
Annotation
• Java Config
• Google Guice
• Kenent
How to learn Spring
• Spring Document Center
• Spring Modules
•