|Vaadin powered front end solution for the|
Red Hat Cool Store demo project.
It has gone through many evolutions on the JBoss middleware product side over the years, but I thought it would be a good time to look back at what the project is and how we got here with Vaadin powering the front end of the solution.
Ruling retail with JBoss BRMSJBoss Business Rules Management System (BRMS) is an industry leading Open Source rules, events and planning solution. I have a lot of material around the introduction to JBoss BRMS and even online workshops where you can build the Cool Store application from scratch in a self paced tutorial.
The background of what the Cool Store demo project is showcasing is based on a need to showcase the JBoss BRMS features in action for our customers, partners and interested parties. This project showcases the use of business logic externalized from an application, so that updates to the business logic do not require a new build & deployment cycle for your application.
|Added item highlights checkout button.|
The business logic is created within JBoss BRMS in the following artifacts:
- domain model in the form of data objects
- business rules in various forms:
- guided rules
- technical rules
- decision table
- domain specific language (DSL)
- ruleflow (process)
This is all fronted by an online web shopping cart application that leverages a RestAPI interfacing with the JBoss BRMS rules engine. The online web shopping cart application has been implemented using the Vaadin framework, but more on that in a minute.
|Clear the shopping cart pop-up.|
The workflow to be demonstrated is that you can design, build and deploy an application. After this you have JBoss BRMS with runtime access to your business logic, allowing your business owners to change that logic and having that logic picked up by the next user of your application.
Let's look at an example to review how this works.
The CoolStore application leverages the JBoss BRMS rules to calculate the shipping costs based on your rules in the projects decision table. When you add items to the shopping cart as shown in the screenshots in this article, the various shipping tiers in the decision table will determine the price to be paid for shipping.
|New checkout displays an order receipt.|
- the price from Tier 2 based on value totaling between $26 - $50 is $4.99
- you can fill your cart with over $25 of materials to validate
- edit decision table and adjust it to $6.99
- save changes
- build & deploy your cool store project
- clear the shopping cart application
- re-order the same materials and validate the charge to shipping is now $6.99
Vaadin powered front end solutionThe Vaadin web application was put together using one of the original Vaadin releases and never updated over the ensuing years. That all changed on November 2015 when Matti Tahvonen, Vaadin's Marketing Manager, reached out and offered to collaborate on updating the online shopping cart application to showcase the newest versions of Vaadin.
|Add item to new shopping cart.|
We met online, chatted about the changes that they could help me with and I met AMahdy AbdElAziz, who forked the project to bring it up to the current version of Vaadin 7.
This includes a few new UI features that we did not spend time on and a newer look and feel to the web application.
It is amazing to see the changes between Vaadin 1.0 and the current versions. Here is an overview of what was done by AMahdy AbdElAziz (first in a five part series), but the best way to find out the differences is to try it for yourself.
Get started with Red Hat Cool StoreGetting started is pretty easy as the project is in the same template you are used to getting from my JBoss Demo Central projects, providing you with the 3-step setup you expect from us:
- clone the project.
- download the products (JBoss EAP + BRMS)
- run the init script for automated setup.
Keep your eyes on the project as it continues to evolve as a JBoss BRMS cornerstone in highlighting what you are able to achieve with rules, events, planning and an easy to use web framework like Vaadin.
(This post was cross post to Vaadin's blog here.)