30Oct
By: Michelle Skamene On: October 30, 2021 In: APEX Developer Solutions, Oracle APEX Comments: 0

A couple of weeks ago, apex.oracle.com got its upgrade to the pre-production release of Oracle APEX 21.2.

And with the new release of our favorite low-code platform comes a completely overhauled Universal Theme Reference app, as well as a great series of individual videos highlighting the new features.

Not only is the software getting better, but the team is leveling up the documentation and resources that are made available so we, as developers, can be more successful.

Here at Insum, a few of us have been playing and testing out some of the new features, and in this post, we’re talking about a few of them. This release is pretty significant, and so to spare you (and me!) the pain of a REALLY long post, we’re covering the following features:

1. Smart Filters

Users of Faceted Search, which first came out with Oracle APEX 19.2, will no doubt find Smart Filters familiar. In fact, it uses much of the same underlying code base, and basically provides a more compact and modern way of displaying ‘Filters’, ‘Facets’, or ‘Chips’ (Yum!).

Smart Filters enable users to find information using filter suggestions. These filter suggestions, also known as chips, appear below the search field and are based on your data. They provide immediate context, showing the most relevant (popular) values. As you click and interact with the chips, the filters are immediately applied, revealing more granular or detailed chips. As the result set reduces, sometimes suggestion chips will disappear altogether as they add no additional value.

The experience is smooth and slick and provides almost endless search capabilities end-users will no doubt love.

So do Smart Filters mean the end of Faceted Search?

No, absolutely not.

Developers should definitely avoid the ‘newer is better’ trap, as I think both components meet different needs.

What I love about Faceted Search is that I immediately see a lot of information about my data. In the example below, I immediately see the lists of cities, neighborhoods, and their counts. Smart Filters, at a glance, will show me the top city. I can get the same information, but I have to click into the chip.

The search field in Smart Filters is powerful. As I start typing free text, it automatically responds and shows me any data points relevant to my search. This does not happen with Faceted Search.

So when would I choose Smart Filters over Faceted Search? To me, I have to say that I still prefer the overview of my data set that Faceted Search provides. But this comes at the cost of some prime real estate on my page. On the other hand, if I am designing a page with a mobile-first approach for use primarily on smaller screens, I would choose Smart Filters as they give users a great experience, that closely resembles Faceted Search, in a much more compact view.

Smart Filters with Airbnb Data

APEX 21.2 Smart Filters

Faceted Search with Airbnb Data

APEX 21.2 Faceted Search

Some comments from Insum consultants

This is a new and intuitive approach to the search experience. It puts APEX at the forefront of modern application design.

Probably one of my favourite new features. Very intuitive and great end-user experience

2. Progressive Web Apps

Progressive Web Apps are applications that combine some of the best features of both web applications as well as platform-specific applications, such as those you might find in the Apple or Google Play stores.

Web applications, such as those we traditionally build with Oracle APEX, are browser-based applications that can reach anyone, anywhere, on any device with a single codebase.

Platform-specific (or ‘native’) applications, on the other hand, are known for being incredibly rich and reliable. They’re accessible on home screens, docks, and taskbars, and you can search for them on your devices. They launch in their own standalone experience and often work even without an Internet connection. Platform-specific applications feel like part of the device they run on, because they can generally leverage hardware (such as a camera), features such as push notifications, and other applications such as contact, calendars, and others.

So what do we get with Oracle APEX PWAs?

The Oracle APEX team has made it super easy for developers to turn applications into Progressive Web Apps. In Shared Components, Application Definition Attributes, you will see a new option for Progressive Web Apps. Once you toggle it to <on>, users of your app will see a new navigation menu entry allowing them to install the application.

Once installed on their desktop or other devices, running the app is a much more streamlined experience for the user. The application gets an icon in the taskbar and is searchable (findable) by the OS.

While we still don’t have things like ‘declarative’ push notifications, or interaction with other device applications, users of the new PWA will enjoy a slicker app experience, better performance because of static file caching, and developers can create a page for use when the device is offline.

Oracle APEX Progressive Web Apps are enhanced with modern APIs to deliver enhanced capabilities, reliability, and installability while reaching anyone, anywhere, on any device with a single codebase. Oracle APEX 21.2 and its new PWA functionality, although still incomplete, is definitely a step in the right direction towards bridging the gap with native, platform-specific apps.

Oracle APEX PWA

We enabled the PWA features of an existing app by navigating to Shared Components –> Application Definition Properties –> Progressive Web Apps

For now, this checks a critical box that APEX was missing. Although the current PWA features are limited, they provide a valuable starting point and presage additional future capabilities.

3. UI and Universal Theme Enhancements

Oracle APEX 21.2, with its Page Designer revamp, its biggest in years, has given developers a ton of new options for item, region and button positioning. Want a search field in your nav bar? After your logo? Need an item among the different regions? How about a button in your nav bar?

Now you can.

This video from the Oracle APEX teams describes enhancements to Page Designer and Component positioning

Oracle APEX 21.2 New Item Positions

Check out the new options for buttons and items when adding elements to the new ‘Components’ section of Page Designer (bye-bye, Regions)

Oracle APEX 21.2 New Region Positions

As for regions, we get a lot of new options too. Notice how the ‘Inline Dialogs’ is replaced by ‘Dialogs, Drawers and Popups’, and we have a new Full-Width Content position, too.

Oracle APEX 21.2 Item positions

Oracle APEX 21.2 Item positions

Oracle APEX 21.2 New Region Positions

Oracle APEX 21.2 New Region Positions

Declarative Modal Drawers

Adding to the enhanced UX of Oracle APEX 21.2 are new, declarative Modal Drawers.

A drawer is a type of region that slides in from the side, and is normally used for secondary content which only needs to appear when specifically requested by users. Although Modals and Drawers have lots in common, they do generally have their specific use cases.

So when should I use the new drawer versus a modal? Don’t start using drawers everywhere you’ve used modals in the past just because they are new. Both of these types of regions have pretty distinct use cases, as outlined below.

Oracle APEX 21.2 Page Drawers
Oracle APEX 21.2 Page Drawers

Modals:

  • Are for simple messages or actions
  • Should not be scrollable
  • Have a single Primary Action Button
  • Always have an overlay, with the page in the background fully disabled

Drawers:

  • Are for displaying more complex content or workspaces
  • Can be vertically scrollable (and therefore allow more vertical space)
  • Might have multiple Primary Actions
  • Can be displayed in parallel with page content, with or without an overlay
Oracle APEX Workspace with DEV Banner
Oracle APEX Workspace with PROD Banner

4. Environment Banners

Thanks to Insum Consultant and Oracle ACE Hayden Hudson for his review of Oracle APEX Environment Banners

No more excuses for confusing PROD with DEV with “Environment Banners”

The nightmare of accidentally committing a change in PROD when you think you’re in DEV is pretty universal. If ever this disaster scenario occurs, many things may have gone wrong to bring you to that point, but let it not be because the workspaces look identical! Since 2014, I’ve done my best by following Jorge Rimblas’ solution described here: Recognize your APEX dev, qa and prod environments.

Enter APEX 21.2 to the rescue! With the introduction of “Environment Banners”, we can now configure visual reminders for when we are DEV/TEST/PROD/etc. The color you choose for your banner will become the color of the “developer toolbar” for your applications as well.

Additionally, it is possible to use these banners to write more readable queries. For example, I can use the following query as an “Exists (SQL query returns at least one row)” condition type to make sure that something only gets deployed to my test environment:

select1
from apex_workspaces
where workspace_banner_label = ‘TEST’

5. Updated Alert and Confirm Dialogs

Love the new, updated look, customizable style, title, icon, and even button labels, as well as support for template directives.

To the right, you will see a side-by-side comparison and notice the updated look and flexibility.

But probably my favorite update for Alert and Confirm Dialogs is the ability to declaratively require confirmation for any button with a new button setting: Require Confirmation.

Here it is in action on a Save/Apply Changes button.

Side by side comparison of Confirmation Dialogs
Confirmation dialog for any button

6. New PL/SQL APIs

Thanks to Insum Consultant Plamen Mushkov for his write-up of the additions to APEX_DEBUG and the new APIs.

There’s now apex_debug.get_page_view_id and apex_debug.get_last_message_id to link messages written by LOGGER (or other code instrumentation utilities) to an APEX debug session and show LOGGER messages in the right order.

The APEX team read our minds by adding a function to return the message_id of the last logged message/error through the APEX_DEBUG package.

This enables us to generate custom messages, including the message/error id, and return it to the end-user. Such a message could mask the actual error and be something like “An error occured. Please contact Customer Support Team and provide this code: 123456789”.

This will enable support to quickly navigate to the correct record in the logs, using the message_id.

See a demo of this feature, both with a debug message and error logged.

7. New JavaScript APIs

New APIs for mapRegion, facetsRegion, apex.date, apex.items, apex.regions and apex.env

apex.env now gives you the same values, as you would get using PL/SQL to access some APEX application bind variables, such as APP_ID, APP_USER, APP_SESSION, etc.

There is a good consistency here, as the naming is the same (the JS library uses the same names as the backend variables). An easy way to test it is by opening your browser Dev Tools, go to the Javascript console and type apex.env.APP_SESSION for example. Watch the screencast for all the options available.

By the way, some of the application variables have new names. For example APP_IMAGES has a new name – APP_FILES. For the moment both are supported, but it is a good idea to start using the new ones, as they will eventually be the only one in some future release and you might need to replace the legacy ones in your code.

Read more about the new JS API enhancements in the blog post from Stefan Dobre here and the one from John Snyders here.

Oracle APEX 21.2 JS enhancements
Oracle APEX 21.2 JS enhancements

8. New Event Triggers for Dynamic Actions

Our favorite? Definitely the new “Dialog Closed or Canceled” event that fires when a user presses the Escape key or the X button in a dialog window.

Sounds like something you would expect by default, right? That the ‘Close’ and ‘Cancel’ buttons of your modal dialogs trigger the same event.

Unfortunately, until now there was only ‘Dialog Closed’ that was supported in the ‘DA Events’ section. Oracle APEX 21.2 makes developers’ lives significantly easier with this addition!

Besides this new event, the list of available events for your Dynamic Actions has grown a lot, particularly in the ‘Component Events’ section. Here is a comparison between APEX 21.1 and APEX 21.2:

Oracle APEX 21.1 Event Triggers
Oracle APEX 21.2 Events: Much bigger list!

9. Data Packager

Moving data between applications has long been a challenge. Whether it’s bringing along lookup data, or moving data between environments to get good test data, this is something most developers have to deal with.

The Data Packager feature in your application’s Supporting Objects as of 21.2 will help developers bridge that gap in a simple way. Select which tables you want to bring data long for, down the column specification and even column masking, there is a lot of great flexibility and power in this feature.

Insum Consultant and Oracle ACE Anton Nielsen says: “I’m a huge fan of supporting objects. This feature fills a hole in deploying applications, but also adds a great feature in itself. I predict having single-page applications that are really only used for migrating data.”

Check out our APEX Instant Tips episode that covered this feature in detail, albeit in 5 minutes.

New Multi-Value setting for faceted search and smart filters
Multi value facet
Oracle APEX Facet based on comma delimited field

10. Multi-value support

Some data modeling purists I know might cringe slightly at the new, declarative support for multi-value columns.

But there is no doubt that data in this format is frequent, and as developers, we need to be able to work with it. And, full disclosure, I have been known to favor delimited data when an entirely new 1 :many relationship seemed a bit like overkill.

The AirBNB dataset I showed earlier? I’ve used this in the past to build a nice APEX showcase application, and the amenities field is a perfect candidate for the new multi-value support. The image below shows you some sample data that I had to creatively parse in the past in order to allow users to find properties based on the various amenities.

And there’s loads more, including new REST Catalogs, improved editors (static file editor, HELLO, we’re happy to see you), new Geocoding and Map Items and improved report downloads, subscriptions, and printing.

If you’d like to learn more about these features, you’ll definitely want to check out the Oracle APEX team’s APEX 21.2 playlist on YouTube; they’ve done a great job of highlighting the top new features of this release.

APEXionately yours,

Michelle

Share this:
Share

Leave reply:

Your email address will not be published. Required fields are marked *