NoSQL Zone is brought to you in partnership with:

I have more than 10years of development experience. My expertise is in Java EE technology, object-oriented application development, and use of open source frameworks. In recent years, I mainly worked in development projects of Java EE applications in Weblogic platform with Oracle database. I primarily involved in framework development and architectural design in these projects. Boris is a DZone MVB and is not an employee of DZone and has posted 13 posts at DZone. You can read more from them at their website. View Full User Profile

Sample Apps: Spring Data MongoDB and JSF Integration Tutorial (PART 1)

02.13.2013
| 3990 views |
  • submit to reddit

This year, I will start a new series of “Sample application Tutorials”. In this series of tutorials, a sample case study application will be built with different technologies. In this tutorial, sample JSF application with Spring Data MongoDB will be covered.


Table of Contents:

1. Introduction to sample application (MongoShop Product Catalog)

2. MongoDB schema design and data preparation

3. JSF (PrimeFaces) and Spring data MongoDB Integration

4. Enquriy data with spring data repository and mongotemplate

5. Create, Edit and delete data



Introduction to sample application
(MongoShop Product Catalog)

After this tutorial, a sample application (MongoShop Product Catalog) with the following functional requirement will be built:
1. Searching product with different criteria (e.g. sku, product type, title, stc)




2. Create a new product with different category.


3. Edit selected product details


4. Delete selected product from the enquiry screen.



Presentation Layer:
JSF is used as presentation layer technology in this sample application. PrimeFaces is a one of lightweight component for enhancing the JSF UI. Frontend interaction is controlled by JSF backing bean in this layer.

Service Layer:
Spring managed singleton service object is used. Business service and application logic are written in this layer

Data Layer:
Spring data MongoDB component is used. It provides integration with the MongoDB document-oriented database. It provides MongoTemplate so that MongoDB operation could be performed easily. Moreover, Spring repository style data access layer could be easily written with spring data MongoDB.

Published at DZone with permission of Boris Lam, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)