Eric D. Schabell: Beginners guide - Building a retail web shop workshop update

Tuesday, July 21, 2020

Beginners guide - Building a retail web shop workshop update

For some years now I've maintained s free online hands-on beginners workshop for getting started with business logic tooling. Recently I've updated the entire workshop to the latest versions of the components and updated the front end.

The basics of this workshop is developing an understanding of how to use an external rules engine in your development project. It's about providing decision management capabilities so that you can dynamically change your business logic without having to change your application code. No code changes means you don't have to redeploy the application to change the behavior application.

The power of externalizing business logic can't be underestimated in these times of fast moving development and application life cycles where we want to be agile and release often. While this online workshop showcases a simple local installation and deployment for teaching purposes, one can easily see the implications for developers working on modern cloud-native container-based deployment models. 

This workshop has been split out into ten separate labs, each one focusing on a single aspect of the project as you build your business logic out using almost every type of rule offered by the engine. You'll explore the tooling, editors, and more, each a single step at a time. 

It's set up to be self-paced and you can stop anywhere along the way, spin down the application server, and return at a later time to continue down your learning path. The workshop is also hosted as a Git project that you can download and take with you for learning on the road. 

Let's explore the workshop and get you started on your first retail web shop.

The first half of the workshop contains five labs.
retail web shop workshop

These first five labs are as follows:
  • Lab 1 - Install Red Hat Decision Manager
  • Lab 2 - Create a new project
  • Lab 3 - Create a domain model
  • Lab 4 - Create a domain specific language (DSL)
  • Lab 5 - Create guided rules

Everything you need to run the entire workshop is available through downloads on Red Hat Developers website. Furthermore, installation and requirements checking has been automated in the first lab to guide you to a successful experience for most Unix operating systems and Windows operating systems.

Each lab starts with an overview image of the Red Hat Decision Manager architecture, with a highlighted component or tool shown to indicate that's what you are focusing on in that particular lab. 

The intention is guiding you on your journey and allowing you to understand your focus for each lab as you work through the tooling and components offered.

Each lab also ends in the same fashion, with a final view of what your environment should look like (screenshot), my contact details should you have any questions you can then reach out to me, and a list of references for you to pursue at your leisure. Finally, a link to the next lab is provided to take you on the way down the road to your next lab challenge. 

The second half of the workshop contains the remaining five labs.

retail web shop workshopThese last five labs are as follows:
  • Lab 6 - Create technical rules (DRL)
  • Lab 7 - Create guided decision table
  • Lab 8 - Create rule flow
  • Lab 9 - Create test scenarios
  • Lab 10 - Deploying your retail web shop
The last lab is worth mentioning as it's providing you with a prefabricated java project you can download, build, and deploy as your web shop front end application. It's a shopping cart for your customers to use in your web shop and based on the latest Vaadin framework (an open collaboration project with a PM contact at Vaadin).

After deploying the front end, you'll be guided through a shopping experience with automated pricing for shipping of the goods selected. The shipping prices are from a decision table you created in the workshop. 

To demonstrate the flexibility of externalizing your business logic in the form of shipping pricing rules, you'll revisit your decision table and change one of the pricing tiers. These changes are automatically picked up by the front end shopping cart application by the next customer to shop. You'll see the shipping prices for the same shopping experience has been changed.

I hope you enjoy this workshop and feel free to reach out on my contact form if you have any feedback or leave a comment.