Evgeniy Krivosheev Andrey Stukalenko Vyacheslav Yakovenko Last update: Nov, 2013 Spring Framework Module 1 - Introduction
2 Spring Framework :: Introduction Spring is a lightweight, but at the same time flexible and universal framework used for creating Java SE and Java EE applications; Spring is a framework with an open source code; Spring is an application framework, not a layer framework; Spring includes several separate frameworks;
3 Spring Framework :: Introduction Rod Johnson created Spring in 2003; Spring took its rise from books Expert One-on-One Java J2EE Design and Development and J2EE Development Without EJB; The basic idea behind Spring is to simplify traditional approach to designing J2EE applications;
4
5 Spring Framework :: Introduction Main Spring site: –spring.io
6
7
8 Spring Framework site:
9 Spring Framework :: Framework Structure Spring works in managed and non-managed environment Spring in Managed environment: –Declarative security management; –Declarative transactions; –Database connection management; –Examples: JBoss, BEA WebLogic, IBM WebSphere; Spring in Non-managed environment: –Application has to track all resources on its own –Examples: Jetty, Tomcat, JSE application; Spring allows to work in non-managed environment like in managed, without implementing heavyweight solutions;
10 Spring Framework :: Introduction Spring helps to: Create logical architecture; Simplify designing JEE applications; Combine frameworks of different levels; Effectively organize middle-tier objects with or without EJB; Reduce number of singletons and property-files; Simplify testing; Spring may use various application servers / Servlet containers (WebLogic, Tomcat, Resin, JBoss, Jetty, Geronimo, WebSphere);
11 Spring Framework :: Introduction Problems with the Traditional JEE Approach : EJB is overused; –Distribution should not be built into the basic component model; Many J2EE design patterns are workarounds; J2EE applications are difficult to test; Advantages of Traditional JEE Approach : EJB is a standard; Supported by many large vendors; Wide spreading among programmers; Great number of development aids;
12 Spring Framework :: Framework Structure SpringSource releases the whole range of products: –Spring Framework is the main framework providing core functionality; –Spring MVC is a framework to build web applications on the base of Spring –Spring Security is a powerful customizable framework that facilitates authorization implementation and access control, and allows for declarative security; –Spring WebServices (Spring WS) is a framework that facilitates creating document-driven web services using SOAP; –Spring Mobile is an extension to Spring MVC (Core part) used in development of mobile web-applications; –Spring Data supports data access technologies; –Spring Batch is a framework facilitating batch processing; –Spring WebFlow is a framework aimed to enable the development of rich, process-aware web applications; –etc.
13 Spring Framework :: Framework Structure
14 Exercises 1: Installing and adjusting run-time environment: –15 min, if using virtual machine; –45 min, if adjusting environment without assistance; 2: Installing and adjusting auxiliaries: –30 min
15 Any questions!?