Showing posts with label Spring. Show all posts
Showing posts with label Spring. Show all posts

Thursday, 3 March 2011

Get started with Spring JMS using ActiveMQ

Messaging is a mechanism to create and exchange data/information/objects within/between applications. An application that generates some useful data can send it's messages (objects) to an agent and these messages (objects) can then be read from another application. JMS is a Java API that enables applications to be able to communicate with each other using the mechanism described above.

You can read more about JMS here.

In this article, we will see how you can quickly start using JMS using the Spring JMS framework. Spring provides template based APIs which greatly simplify the use of JMS. A lot of work is done behind the scenes which saves the developer time to concentrate on the business requirement.

We will take a look at the important Spring JMS classes and apis as we go through an example. So let's get started!

Wednesday, 9 February 2011

RESTful webservices with Spring

REST (Representational State Transfer) is a stateless architectural style wherein resources are identified and manipulated. by their URIs and transferred over HTTP. A REST web service sends any parameters, data needed by the server within the HTTP headers and body.
In this article, we will build REST webservices with Spring and a client using the Spring RestTemplate to consume the webservice. I will not be going into the details of these technologies, the aim is to rapidly come up with a basic CRUD web-service.

I will be assuming, that you are familiar with the basics of Spring, DI and IoC, REST, and the basic web-application structure in java.

Without much ado, let's begin!

Tuesday, 1 February 2011

Spring Hibernate Integration

In this article, I will be demonstrating how you can integrate hibernate with your Spring application. We will not be discussing hibernate and Spring in any detail. The focus is to get you started with an Spring application that persists data into a database using the hibernate ORM layer.

I will safely assume that you are familiar with Spring, hibernate, SQL, maven. For the purpose of this demo, i will be using the MySQL database, STS (SpringSource Tool Suite) or Eclipse with Spring support plugins installed. If you are not using any IDE, you just need to create some folders and config files yourself. But i see no reason why you shouldn't since it will really speed your development process.
(find the source code of the sample application at the end of the page)


So Let's get started!


Get started with Spring MVC

Spring MVC, one of the modules of the core Spring framework,  is a web-application development framework. As the name suggests, Spring MVC is an implementation of the Model(M), View(V), Controller(C) design pattern, which is based on request delegation and separation-of-concerns.
I am assuming, that if you have reached this article and are about to use it, you would be familiar with the basics of web-application development and the Spring framework in general. And Java of course ;)

I will briefly introduce you to the basics of how Spring MVC works and then will build a simple web-application (find the sample application source code for download at the end of the page).