• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
 

Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin

on

  • 450 views

A Simple Open Source Java Cloud App Stack using Google Guice 3.0, Hibernate 4, Jersey 1.x and Vaadin 7

A Simple Open Source Java Cloud App Stack using Google Guice 3.0, Hibernate 4, Jersey 1.x and Vaadin 7

Statistics

Views

Total Views
450
Views on SlideShare
393
Embed Views
57

Actions

Likes
0
Downloads
0
Comments
0

12 Embeds 57

http://jianwu.blogspot.com 31
http://jianwu.blogspot.ru 5
http://jianwu.blogspot.de 5
http://jianwu.blogspot.in 5
http://jianwu.blogspot.com.es 3
http://jianwu.blogspot.nl 2
http://jianwu.blogspot.be 1
http://jianwu.blogspot.com.br 1
http://jianwu.blogspot.hk 1
http://jianwu.blogspot.it 1
http://prlog.ru 1
http://jianwu.blogspot.co.uk 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin Presentation Transcript

    • A Simple Open Source Java Cloud App Stack with Google Guice, Hibernate, Jersey and Vaadin Jian Wu 03/09/2014
    • History of Web Frameworks (Adopted from Matt Raible http://raibledesigins.com)
    • How do you choose a Cloud App Framework/Stack? ● Java is still the most mature and reliable language and platform when developing the Web Apps and Services running in the Cloud ● Two must-have features/functionalities for any Cloud Apps and Services: – Serving HTML5 Web UI to the Browsers – Serving data to the Mobile Devices through Restful Services/APIs ● MVC is still the design pattern to guide UI ● ACID is still important for Your Data Integrity (Note: A Java Framework or Tool will be considered first as it can simplify the development process including dev/debugging, testing, deployment and monitoring)
    • Layered Architecture for Java Cloud Apps & Services Using Guice, Hibernate, Jersey and Vaadin PostgreSQL Java Web Container JDBC Connection Google Guice Hibernate ORM App Business Logic … ... HTML5/CSS3/JavascriptHTTP XML/JSON
    • Vaadin: Java Web UI Framework Architecture ServerBrowser GWT SQL Container View Presenter Application Service Application Vaadin Platform Server-side Components Terminal Adapter Client-side Engine Data BindingCRUD
    • Vaadin: Java Web UI Framework Advanced Web UI with Rich UI Components (1)
    • Vaadin: Java Web UI Framework Advanced Web UI with Rich UI Components (2)
    • Building RESTful Web Services with Jersey (JAX-RS) (From: http://jersey.java.net)
    • Hibernate ORM with Back-end PostgreSQL DB Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions. “Open Session in View” is a well-known design pattern to integrate Java Web/Service Tier with Hibernate ORM for CRUD operations; and will be used in both Web UI Interaction and Service Request Processing.
    • Glue everything together with Google Guice To make Hibernate, Jersey, and Vaadin seamlessly working together in Java Middle-tier Container, we are using Google Guice to “glue” everything together. Google Guice is a light-weight Dependency Injection Framework, its runtime libraries are less than 1M. Guice organizes Java Object Graph through its Module and Binding, Guice's servlet extensions provide Dependency Injection in Web Application and Servlet Container, including configuration of your servlet and filter components. Through Guice Filter and Guice ServletModule, Jersey and Vaadin can be setup and configured in a Servlet Container, such as Tomcat, working nicely with Hibernate “Open Session in View” Pattern.
    • A Proof-of-Concept Demo Project at github.com As proof of concept, a sample guice-hibernate-jersey-vaadin-cloudapp project is created at github.com: https://github.com/jianwu-github/guice-hbn-jersey-vaadin-cloudapp This demo project has: 1. A simple PostgreSQL DB with “subscriber” table 2. Hibernate Mapping is used to map Subscriber Class to “subscriber” table 3. A simple “Subscriber Web UI” is built on top of Vaadin 7 utilizing HbnContainer Add-on, it can be accessed at “http://localhost:8080/[appName]/ui/” when running on a local Tomcat Server. 4. A simple “Subscriber” REST Service is built on top of Jersey 1.18, it can be accessed at “http://localhost:8080/[appName]/rest/subscriber/” when running on a local Tomcat Server. 5. All the components are wired together through Guice 3.0 with ServletModule. 6. The project is built with Maven