750 likes | 3.73k Views
This Edureka Spring Framework Tutorial will help you in understanding the fundamentals of Spring Framework and help you in building a strong foundation in Spring with examples. Below are the topics covered in this tutorial: <br><br>1. Java Frameworks <br>2. Spring Framework <br>3. Why Spring Framework? <br>4. Spring Architecture <br>5. Spring Modules <br>6. IoC Container <br>7. Dependency Injection
E N D
` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING What is Hadoop? https://www.edureka.co/spring-framework
Agenda For Today Why Java Frameworks ? Java Frameworks Spring Framework Why Spring Framework? ` Spring Modules IoC Container Bean Dependency Injection EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Why Java Frameworks ? ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Why Java Frameworks ? Problems with J2EE Standards Heavy weighted components Too complex 'look-up' problem ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
What Are Java Frameworks? Frameworks are large bodies (usually many classes) of predefined code to which we can add to our own code to solve a problem in a specific domain. ` Added to our own code Solves a problem in a specific domain Large bodies of predefined code EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Advantages of Java Framework E FFI CI E N C Y SE CUR I T Y ` E X PE N S E SUPPO R T EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Disadvantages of Java Framework R E STR I C T I O N ` CO DE I S PUB L I C CUSTO M B UI LT FE ATUR E S EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Different Java Frameworks ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Different Java Frameworks ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring Scott Max Riya Web Development Team of XYZ company with a group of six members, headed by Harry. ` Harry got a call from the management team for one urgent requirement. Alice Henry Harry EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring Team...We got one request from the client to develop an application but the challenge is that we have got very little time frame to complete this Project ` Harry EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring If we go by the general way it’ll take a lot of time as well as unnecessary coding ` Harry EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring We need something that’s fast, flexible and efficient. ` Harry EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring ` In that case we can use any Framework ! Riya Or we can use Hibernate We can go for Struts Alice Max EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring We can use Spring framework. It provides more flexibility as Spring MVC is entirely based on interfaces unlike Struts or hibernate so we can easily make required changes in implementation without affecting the client side. Riya, can you tell us more about Spring Framework. How will it solve our problem?? Scott ` Riya EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring It will increase the efficiency of the application and will reduce the overall application development time. So we can easily finish our project within the given time frame. ` Riya EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring Oh! That’s really nice. Lets proceed with Spring then. Scott ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
What is Spring Framework? Reduces the overall complexity Comprehensive tool Lightweight application framework Framework of frameworks ` Avails an array of resources Powerful open source EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring Origin Spring has been hosted on SourceForge since January 2003. ` First version of Spring was first released on February 2003, By Rod Johnson. EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring Framework Ecosystem ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Uses Of Spring Over Other Frameworks ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Why Spring is so popular? Distinct division between JavaBean Models, Controllers and Views Spring’s MVC is very flexible as it makes use of interfaces Spring’s MVC web tiers are typically easier to test ` Well defined interface to business layer Spring Controllers are configured via IoC Offers better integration with view technologies other than JSP EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Difference between Spring, Struts2and Hibernate Spring Struts2 Hibernate Application Framework Light Weighted Layered Architecture ` Loose Coupling Tag Library Easy integration with ORM technologies Easy integration with client-side technologies EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Spring Architecture ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Core Module Core Core Provides the fundamental parts of the framework. Container Bean Data Access Provides BeanFactory. ` It is a medium to access any objects defined and configured. Context Web Provides a powerful expression language. SpEL Misc. EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Data Access/Integration JDBC Provides a JDBC-abstraction layer. Core Container Provides integration layers for popular object-relational mapping APIs. ORM Data Access ` OXM Provides an abstraction layer Web Contains features for producing and consuming messages. JMS Misc. Transaction Supports programmatic and declarative transaction management EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Web(MVC/Remoting) Module Core Provides support for WebSocket based a two-way communication between the client and the server. WebSocket Container Data Access Servlet Contains Spring's MVC implementation for web applications. ` Web Provides basic web-oriented integration features. Web Provides the MVC implementation and also mirrors the functionality of Web-Servlet module. Portlet Misc. EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Miscellaneous Provides an aspect-oriented programming implementation. AOP Core Container Aspects Provides integration with AspectJ. Data Access Provides class instrumentation support and class loader implementations. ` Instrumentation Web Provides support for STOMP as the WebSocket sub-protocol to use in apps. Messaging Misc Supports the testing of Spring components. Test EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Eclipse IDE Installation Go to www.eclipse.org 1 Download Eclipse Neon installer and install on your Windows system 2 ` EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Installing Spring IDE plugin ` 3 Select this EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Installing Spring IDE plugin Search for Spring 4 ` 5 Select Install EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Installing Spring IDE plugin Confirm And Proceed 6 ` Let the installation to get complete and then restart the eclipse. 7 EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Start Coding in 5 Simple Steps Bean Class Xml file ` Demo class Load jar files Run EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Creating the Bean class Bean Class Xml file getter() method ` Demo Class setter() method Load jar files Run EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Creating the xml File Bean Class Xml file ` Demo Class Load jar files Run Providing a bean To IoC container EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Creating the Demo class Bean Class Xml file ` Demo Class Load jar files Run Injecting a bean file EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Loading Spring jar Files Bean Class Xml file ` Demo Class Load jar files Run EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Testing The Code Bean Class Xml file Once you are done with creating the source and beans configuration files, you are ready for this step, which is compiling program. ` Demo Class and running your Load jar files Run EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
IoC Container Features Wiring them together Creating the objects PR ING S ` IOC F R K R A M EWO Managing their complete life cycle Configuring them EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
IoC Container Features Java POJO Classes MetaData The Spring IoC container by using Java POJO classes and configuration produces a fully configured and executable system or application. metadata Spring Container ` Final Result Ready To Use Application EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Types Of IoC Container Bean Factory org.springframework.beans.factory.BeanFactory is the simplest container providing the basic support for Dependency Injection IoC ` ApplicationContext org.springframework.context.ApplicationContext built on top of the BeanFactory interface. This container adds more enterprise-specific functionality EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework
Bean Object Beans are the objects that form the backbone of our application and are managed by the Spring IoC container. 1 MetaData IoC Container ` 2 Spring IoC container instantiates, assembles, and manages the bean object The configuration metadata that are supplied to the container are used create Beans object 3 Bean EDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING https://www.edureka.co/spring-framework