Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Building JBoss Projects with PatternFly and AngularJS

April 22, 2016
James Falkner
Related topics:
Java
Related products:
Developer Toolset

    Recently I've been looking into different UI tech in use for apps built onPatternFly Logo top of Red Hat middleware, and I've discovered that many of Red Hat's products use PatternFly (in differing capacities) for their administrative UIs. PatternFly is "A community of designers and developers collaborating to build a UI framework for enterprise web applications." (from the website). There are also components, directives, etc, for AngularJS projects (which I really like).

    This sounds awesome, particularly because I'm a terrible designer, so I thought I'd take a crack at converting an existing demo to use PatternFly, and along the way learn more about the framework and its best practices. These are concepts you can use in your own projects when building JS-heavy projects using Maven (which has about a billion ways to do things).

    You can find the demo on jbossdemocentral, along with instructions for building it. In this article, I will describe some of the highlights of what I learned.

    Existing Demo

    The demo I chose to start working with is the JBoss BRMS Cool Store demo, which is well maintained and updated, and uses JBoss BRMS to showcase the ability to change business rules on the fly. It does this in the context of a retail store demo.

    It has a Vaadin-based frontend, but for this demo I wanted to focus on the Angular/PatternFly bit, so while it's possible to integrate Vaadin and AngularJS, I chose to go pure AngularJS to avoid overloading the demo (I also know and like Vaadin already, so not a ton of learning potential for me there!).

    JavaScript dependencies

    The JavaScript for the app is in src/main/javascript (as suggested by Maven), and I've added some declarations in the POM to do the JS minification. Maven is also configured to place the resulting JS files where I need them to be within the final output .war file. The essentially static JavaScript libraries (including PatternFly) are pulled in via Bower, and are placed in src/main/webapp/vendor, and are excluded from the minification process via this declaration:

    PatternFly

    Because this is a shopping cart demo, not everything in PatternFly is needed (which also saves having to drag in every singlePatternFly dependency into the app!)

    The minimal set of dependencies are jQuery, Bootstrap, and AngularJS itself. I also added in one more dependency - Isotope - for doing fancy responsive layouts above and beyond what Bootstrap provides.

    PatternFly provides a nice basic layout that gives us a header and navigation, while the shopping cart itself uses PatternFly Cards. This feels pretty simple, and there's not much code either - I think the result looks rather nice.

    If you do too, then the expected result is confirmed: PatternFly solves most of your UX problems so you (as a developer) can concentrate on the rest of the app!

    Security & Account Management

    I also wanted to add the ability to have your own login, shopping cart and profile, and so this demo also uses Keycloak, a JBoss open source project (which is in the process of being productized by Red Hat, woo!) More on this in my next post.

    Future improvements

    • I used Patternfly CSS "off the shelf", instead of integrating with a CSS preprocessor like less. Again, for demo purposes. Using less would get your additional possibilities like mixins and easily change CSS values globally (colors, sizes, etc).
    • Right now, the entire app and REST interfaces are protected via Keycloak. In a real shopping cart, you would likely not want to protect the anonymous browsing of the store.
    • OpenShift anyone? Red Hat recently announced a $0 developer program, with the Red Hat CDK and Red Hat products, and the BRMS demo from which this Patternfly demo derives is already available there.
    Last updated: January 22, 2024

    Recent Posts

    • A guide to JIT checkpointing with Kubeflow Trainer on OpenShift AI

    • How to manage TLS certificates used by OpenShift GitOps operator

    • Configure a split disk on OpenShift Container Platform

    • Red Hat Enterprise Linux 10.2 and 9.8: Top features for developers

    • What GPU kernels mean for your distributed inference

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.