A customer came to us, with a new design he had made for his 20 years old, Domino based, web-application. Someone else had advised him to add Node.js and a certain JavaScript framework to the setup, but the customer was not familiar with either. The web-app was tied to Microsoft Internet Explorer 11, and the customer needed that to change as well.
Our recommendation was to recreate the new design, using the native Domino design elements he is used to, while making the web-app usable in newer browsers.
We added a little more pass-thru HTML than he was used to, but that was all.
The task was simple: Update the design, without changing the applications behavior.
$$ViewTemplateDefault with computed subforms
One of the solutions, for this make over, was to use the $$ViewTemplateDefault for most of the views.
We added some computed subforms, which always resolve to the same subforms, just to avoid looking at all the HTML that makes up the page header, main menu and page footer. This lets the developer focus on the primary content.
The spot where you would normally put the $$ViewBody, we inserted another computed subform instead:
The subform selected, depends on the type of view. Thus we saved a lot of repetition.
The ViewAlias formula is just:
@Subset(@ViewTitle; -1)
Categorized views with auto-generated menus
One of the subforms creates a category menu, from the views first column. This subform is reusable for a number of similar categorized views.
The view is opened with a URL like: /path/database.nsf/Staff_by_location?OpenView&RestrictToCategory=Karlslunde
The result looks like this in the browser:
This single subform is responsible for presenting more than 15 categorized views, with different menus, and no additional code.
The Customer
The customer is Niels Høgfeldt from SuperSystems.dk. You can read more, and see more screenshots from the application, on the product page for HRMEasy.
21-09-2021 10:30
0 Comments