Getting Started with Spring Framework

17
Getting Started with Spring Framework

Transcript of Getting Started with Spring Framework

Page 1: Getting Started with Spring Framework

Getting Started with Spring Framework

Page 2: Getting Started with Spring Framework

What will you learn today?

Introduction to Spring Framework

Dependency Injection

Spring MVC Architecture

Spring with Big Data

Build a Web Application using Spring (Demo)

www.edureka.co/spring-framework

Page 3: Getting Started with Spring Framework

Java Frameworks

In Java technology there are frameworks that helps the programmers to build distributed applications easily.

Example:

» Hibernate Object Relationship Mapping Framework

» Struts Web UI Framework

» Enterprise Java Beans Oracle’s specification for server side components for persistence & messaging

» Log4J Apache’s Framework for logging

www.edureka.co/spring-framework

Page 4: Getting Started with Spring Framework

Java Frameworks

www.edureka.co/spring-framework

Problem:

» Applications that use the varied frameworks and services face scalability issues

» A lot of plumbing code needs to be written

Need:

» Applications that use a number of frameworks and services have to remain maintainable

» Code should be loosely coupled with the frameworks so that testing and reusability becomes easy

Page 5: Getting Started with Spring Framework

Spring time...

Open source (http://projects.spring.io/spring-framework/)

Rod Johnson started SpringSource company and developed Spring framework for Apache 2.0 in June 2003.

www.edureka.co/spring-framework

Page 6: Getting Started with Spring Framework

Spring Framework

www.edureka.co/spring-framework

Spring Framework provides a light-weight solution to develop maintainable and reusable enterprise applications

It provides simple and rich facilities to integrate various frameworks, technologies and services in the application

Page 7: Getting Started with Spring Framework

Spring Architecture

www.edureka.co/spring-framework

AOP Aspects Instrumentation

Test

JDBC ORM

OXM JMS

Transactions

Web Servlet

Portlet Struts

Beans Core ContextExpression Language

Core Container

WEB (MVC/Remoting)Data Access/Integration

Spring Framework Runtime

Page 8: Getting Started with Spring Framework

Dependency Injection

www.edureka.co/spring-framework

Central to the Spring Framework is Inversion of Control (IoC)

Provides consistent means of configuring and managing business objects

Objects created by the container are also called managed objects or beans

The container can be configured by XML or Java Annotations

Page 9: Getting Started with Spring Framework

Model-View-Controller (MVC) Architecture

www.edureka.co/spring-framework

Page 10: Getting Started with Spring Framework

Model-View-Controller (MVC) Architecture

Model-View-Controller architecture is used for interactive web-applications. This model minimizes the coupling between business logic and data presentation to web user. This model divides the web based application into three layers:

» Model: Model domain contains the business logics and functions that manipulate the business data. It provides updated information to view domain and also gives response to a query. And the controller can access the functionality which is encapsulated in the model

» View: View is responsible for presentation aspect of application according to the model data and also responsible to forward query response to the controller

» Controller: Controller accepts and intercepts user requests and controls the business objects to fulfil these requests. An application has one controller for related functionality. Controller can also be depends on the type of clients

www.edureka.co/spring-framework

Page 11: Getting Started with Spring Framework

Aspect Oriented Programming Support

www.edureka.co/spring-framework

AOP address cross cutting concerns

A typical use cases of AOP is generating logs

Page 12: Getting Started with Spring Framework

Big Data Extensions

Spring XD (Xtreme Data) (http://projects.spring.io/spring-xd/) is a unified platform for

» Data ingestion,

» Real time analytics,

» Batch processing, and

» Data export.

www.edureka.co/spring-framework

Courtesy: http://projects.spring.io/spring-xd/

Page 13: Getting Started with Spring Framework

Big Data Extensions

Spring Data projects (http://projects.spring.io/spring-data/) provides consistent approach to access big data stores.

www.edureka.co/spring-framework

Commons JPA MongoDB Redis

Solr KeyValue Hadoop

Cassandra Elasticsearch Neo4j

Main Modules

Community Modules

REST

Page 14: Getting Started with Spring Framework

Spring - Job Trends

www.edureka.co/spring-framework

Page 15: Getting Started with Spring Framework

Demo: Spring based Web Application

www.edureka.co/spring-framework

Page 16: Getting Started with Spring Framework

Course Details

Become an Expert in Spring Framework by Edureka

Go to www.edureka.co/spring-framework

Edureka's Spring Framework course:

• This course covers all the concepts that made Spring probably the most popular Java application framework. Starting from Dependency Injection to how to create first spring application, integrating maven, Aspect Oriented Programming (AOP), integrating Hibernate with Spring, Building application using Spring MVC, Using Apache tiles and JSF for making user view, Making your spring application secure, Using Log4j as logger and writing test cases with Junit.

• At the end of the course, we will also create a web application using Spring Framework.• Online Live Courses: 24 hours• Assignments: 25 hours• Project: 20 hours• Lifetime Access + 24 X 7 Support

www.edureka.co/spring-framework

Page 17: Getting Started with Spring Framework

Thank You

Questions/Queries/Feedback

Recording and presentation will be made available to you within 24 hours