Skip to content

mrdowden/java-frameworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-frameworks

This project exists to compare service-layer implementations between Java frameworks. The platform for this comparison is a basic Bourbon shopping cart application written in AngularJS.

Read the Blog post that started this project: https://opensource.com/life/15/10/4-java-web-frameworks

See the presentation slideshow: http://www.slideshare.net/MichaelDowden/java-web-app-frameworks

Your input and contributions to this repository are very welcome! I would love to see improvements to each of these framework implementations (and to see more implementations added). Just submit a pull request.

Service Definition

List Items

  • GET /svc/items
  • 200: Success
  • Response Body:
[
  {
    id: 1,
    name: "Booker's Single Barrel Bourbon",
    description: "",
    price: 41.99,
    shortname: "bookers"
  }, {
    ...
  }
]

View Item

  • GET /svc/item/{shortname}
  • 200: Success
  • 404: No such item
  • Response Body:
{
  id: 1,
  name: "Booker's Single Barrel Bourbon",
  description: "",
  price: 41.99,
  shortname: "bookers"
}

Add Item to Cart

  • PUT /svc/cart/
  • 200: Success
  • Request Body: { itemId: 1, qty: 1 }

List Items in Cart

  • GET /svc/cart
  • 200: Success
  • Response Body:
[
  {
    id: 1,
    qty: 1,
    name: "Booker's Single Barrel Bourbon",
    price: 41.99,
    shortname: "bookers"
  }, {
    ...
  }
]

Update Qty in Cart

  • POST /svc/cart/{itemId}
  • 200: Success
  • 404: No such item in cart
  • Request Body: { qty: 2 }

Remove Item From Cart

  • DELETE /svc/cart/{itemId}
  • 200: Success
  • 404: No such item in cart

Save Shipping Info

  • PUT /svc/order/shipping
  • 200: Success
  • Request Body:
{
  name: "Michael Dowden",
  address: "123 Nowhere Ln",
  city: "Springfield",
  state: "TN",
  zip: "12345",
  phone: "123-456-7890",
  email: "[email protected]"
}

Fetch Shipping Info

  • GET /svc/order/shipping
  • 200: Success
  • Response Body:
{
  name: "Michael Dowden",
  address: "123 Nowhere Ln",
  city: "Springfield",
  state: "TN",
  zip: "12345",
  phone: "123-456-7890",
  email: "[email protected]"
}

Place Order

  • POST /svc/order/checkout
  • 200: Success
  • Response Header: Location: http://localhost:8080/svc/order/12345

Fetch Order Info

  • GET /svc/order/{orderNumber}
  • 200: Success
  • 404: No such order
  • Response Body:
{
  orderNumber: 123456789,
  total: 41.99,
  address: {
    name: "Michael Dowden",
    address: "123 Nowhere Ln",
    city: "Springfield",
    state: "TN",
    zip: "12345",
    phone: "123-456-7890",
    email: "[email protected]"
  },
  items: [
    {
      id: 1,
      qty: 2,
      name: "Booker's Single Barrel Bourbon",
      price: 41.99,
      shortname: "bookers"
    }, {
      ...
    }
  ]
}

About

Java Web Framework comparison project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors