Home Page Icon
Home Page
Table of Contents for
Types of web service
Close
Types of web service
by Tejaswini Mandar Jog
Learning Spring 5.0
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Spring at Glance
Introduction to the Spring Framework
Problems addressed by Spring
Scalability
Plumbing code
Boiler plate code
Unavoidable non-functional code
Unit testing of the application
POJO-based development
Loose coupling through the dependency injection
Declarative programming
Boilerplate code reduction using aspects and templates
Layered architecture
Spring architecture
Core modules
Core
Beans
Context
SpEL
Data access and integration modules
JDBC (DAO)
ORM
OXM
JMS
Transaction
Web MVC and remoting modules
Web
Servlet
Portlet
WebSocket
AOP modules
AOP
Aspects
Instrumentation modules
Instrumentation
Instrument Tomcat
Messaging
Test module
What more Spring supports underneath?
Security module
Batch module
Spring integration
Mobile module
LDAP module
The new module
Spring road map
1.0 March 2004
2.0 October 2006
2.5 November 2007
3.0 GA December 2009
3.1 GA December 2011
4.0 December 2013
5.0 RC1
Container - the heart of Spring
Inversion of Control
BeanFactory--the past
XMLBeanFactory
ApplicationContext--the present
ClassPathXmlApplicationContext
FileSystemXmlApplicationContext
WebXmlApplicationContext
How are beans made available from container?
Summary
Dependency Injection
The life of a bean
Loading the configuration
Object creation
Setting the bean name
Setting the bean factory
Bean post processing with postProcessBeforeInitialization
Property population
Initializing the bean
The afterPropertiesSet() method
The Custom init() method
Bean post processing with postProcessAfterInitialization
Use the bean
Destruct the bean
Dispose the bean with destroy()
Destruction with custom destroy()
Case 1: Using custom initialization and destruction methods
Case 2: Using InitializingBean to provide initialization
Case 3: Using DisposableBean to provide release of memory
Case 4: Making the bean aware of the container
Case 5: Using BeanPostProcessor
Using JSR-250 annotations for the bean life cycle
Instance creation
Using constructor
Using factory method
Using instance factory method
Using static factory method
Dependency injection
XML-based configuration
Setter injection
Constructor injection
Way 1: Without ambiguities
Way 2: With ambiguities
Namespace p for property
Namespace p for property of secondary types
Configuring the inner beans
Inheritance mapping
Configuring the null values
Configuring Collection
Bean scope
Annotation-based configuration
Spring-based annotations
Stereotype annotations
Wiring annotations
Case 1 - Using @Autowired
Case 2 - Using autowired=false
Case 3 - Using @Qualifier
Case 3 - Using @Required
Case 4 - Scope management annotations
JSR standard annotation
Annotations for life cycle
Spring Expression Language
Using literals
Using bean reference
Using mathematical, logical, and relational operators
Summary
Accelerate with Spring DAO
Handling databases
DataSource
Configuring DataSource
Case 1 - Using XML configuration of DriverManagerDataSource
Case 2 - Using annotations for DriverManagerDataSource
Using template classes to perform JDBC operations
JdbcTemplate
NamedParameterJdbcTemplate
Using JdbcTemplate
Using NamedParameterJdbctemplate
SimpleJdbcInsert
SimpleJdbcCall
Modeling JDBC operations
Handling exceptions
Object relation mapping
Hibernate
Hibernate architecture
Configuration interface
The SessionFactory interface
Session interface
Transaction interface
Query interface
Criteria interface
Case 1 - Using SessionFactory
Cache declaration
@Cacheable
@Caching
@CacheConfig
@CacheEvict
@CachePut
The cache configuration
Summary
Aspect-Oriented Programming
Core and cross-cutting concerns
Aspect-oriented programming
Join point
Pointcut
Advice
Before
After
After returning
After throwing
Around
Aspect
Introduction
Target object
AOP proxy
Weaving
AspectJ
AspectWertz
JBoss AOP
Dynaop
CAESAR
Spring AOP
XML-based aspect configuration
Using method signatures
Using type
Using Bean name
Using this
Using target
For annotation tracking
Part 1 - Creating applications for the core concern (JDBC)
Part 2 - Integration of Log4j
Part 3 - Writing logging aspects
Adding After advice
Adding After Returning advice
Adding Around advice
Adding After throwing advice
Annotation-based aspects
Introduction advice
Summary
Be Consistent - Transaction Management
Understanding transactions
Atomicity
Consistency
Isolation
Durability
Life cycle of transaction management
Local transaction
Global or distributed transactions
Spring and transaction management
Programmatic transaction management
Using PlatformTransactionManager
TransactionTemplate
Declarative transaction management
XML-based declarative transaction management
Annotation-based transaction management
Summary
Exploring Spring MVC
Features for faster development
The Spring MVC
The Front Controller DispatcherServlet
The controller
The ModelAndView interface
The ModelMap interface
The ViewResolver interface
First Spring MVC demo
A deep dive into Spring MVC
Case 1 - Reading request parameters
@RequestMapping variants
Case 2 - Handling form submission
Form submission
Displaying the form
Postprocessing the form
Form preprocessing
Defining the attribute with values to add in the view
Populating the values of the attribute in the form
Performing Form Validation in Spring MVC
Custom validator based on Spring Validator interface
Using @InitBinder and @Valid for validation
Externalizing the messages
Using ValidationUtils
JSR annotation-based validation
Part 1 - Creating a basic application
Part 2 - Applying validations
Using the message attribute
Using the properties file
Summary
Be Assured, Take a Test Drive
Testing - an important step
Unit testing
Integration testing
System testing
User acceptance testing
Testing tools
JTest
JMeter
Grinder
JWalk
PowerMock
TestNG
The Arquillian framework
The ShrinkWrap framework
Test runners
Java container
Integration of test cases into the Java container
JUnit
Phase 1 - Unit testing DAO Unit testing by JUnit
Creating a base application
Performing testing
Spring TestContext framework
@ContextConfiguration
@WebAppConfiguration
Mock testing
Mockito
Spring MVC controller testing using the Spring TestContext framework
Spring MockMvc
Phase 2 - Integration testing
Integration testing of service and DAO layers
Integration testing of controller and service layer
Phase 3 - System testing
Using Eclipse IDE for deployment
Manually deploying the application
Summary
Make It Safe - Security Management
Importance of security in an application
Authentication
Basic authentication
Form-based authentication
Authorization
The Spring Security framework
New features added in Spring Security 5.0
Core components of Spring Security
SecurityContextHolder
Authentication
UserDetailsService
GrantedAuthority
AuthenticationManager
Spring Security mechanism
Configuring security in Spring via namespace
Configuring filters
Configuring <http>
Configuring AuthenticationManager
Step 1 - Creating a basic Spring MVC application
Step 2 - Adding security
In-memory authentication
The JDBC authentication
The Remember-Me authentication
Logout
Demo logout
Managing the Session
Working of the Spring session
Demo of Session management to limit maximum session to handle per user
Method-level security
@Secured
@PreAuthorize and @PostAuthorize
Demo applying method-level security
Summary
Explore the Power of RESTful Web Services
Web services
Web services, the need
Usability
Reusing the developed application
Loosely-coupled modules
Ease in deployment
Types of web service
SOAP web service
RESTful web service
Spring and RESTful web services
RestTemplate
Presentation of the data
HTTP-based message converters
Negotiating view-based rendering of the view
Summary
Exchange Information - Use Messaging
Spring and messaging
Using WebSocket
Overview of the WebSocket API
Creating a WebSocketHandler
Registering WebSocketHandler
Java-based configuration
XML-based configuration
WebSocket engine configuration
Configuration of allowed origins
SockJS
STOMP
Spring STOMP support
Summary
Be Active - Reactive Programming
Introduction to Reactive Streams
Reactive Stream implementations
RxJava 1.x and RxJava2.x
Akka
Components of the Akka toolkit
ActorSystem
ActorRef
MessageDispatcher
MailBox
MessageQueue
Actor
Vert.x
Slick
Project Reactor
Operators
Reactive types
The Future interface
Understanding stream
Reactive streams in depth
Back pressure
Spring WebMVC and Spring web reactive programming
The reactive web application
WebClient
Summary
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Ease in deployment
Next
Next Chapter
SOAP web service
Types of web service
The following are the different types of web service.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset