MAS 9.2 series case study
We looked at both apps on our test system, on the MAS 9.2 series. The numbers belong to that release and change with every new version of an app, so read them as a size. Which App for Which Use Case? lists all fifteen apps, and this case study takes two of them apart.
One file, or one file per page#
An app has a main file, app.xml. A page can stand inside it, or the main file can name another file that holds the page. We counted, for each app, how much of its markup stands in the main file:
| App | Lines in app.xml | Lines of markup in all files | Share of app.xml |
|---|---|---|---|
| Timesheet | 40 | 369 | 11 % |
| Crew Manager | 106 | 739 | 14 % |
| Material Request | 195 | 894 | 22 % |
| Technician | 6,133 | 9,932 | 62 % |
| Visual Inspections | 856 | 1,374 | 62 % |
| Service Requests | 1,419 | 1,990 | 71 % |
| Assets | 2,465 | 3,185 | 77 % |
| Locations | 1,698 | 2,135 | 80 % |
| Incident Reporter | 1,043 | 1,180 | 88 % |
| Inspections | 1,660 | 1,852 | 90 % |
| Inventory Counting | 1,396 | 1,470 | 95 % |
| Issues and Transfers | 3,005 | 3,087 | 97 % |
| Permit to Work | 2,622 | 2,647 | 99 % |
| Inventory Receiving | 8,624 | 8,624 | 100 % |
| Dashboard | 216 | 216 | 100 % |
The fifteen business apps as shipped with our system of the MAS 9.2 series. The lines are counted with wc -l over the XML files of each source folder.
The table falls into two groups. Twelve apps keep 62 to 100 percent of their markup in the main file. Three apps keep 11 to 22 percent there, and every one of their pages has a file of its own. Technician is at the lower end of the first group and stands between the styles: 10 of its 28 pages have a file of their own, and the rest are in the main file.
What the main file still holds#
In Timesheet the main file is a table of contents. Its forty lines hold six things:
In app.xml of Timesheet | What it is |
|---|---|
| the application element | the id, the title, the controller of the app |
| a few states | among them the ids of three other apps that Timesheet opens |
| two datasources | lookups that every page may use |
| a menu with one entry | the entry of the app in the navigation |
| two page entries | each one a single line with an id, a path and the name of a file |
| one small JSON datasource | by its name, for tests |
A page entry of this kind is short. Our own Components Explorer is built the same way, and one of its entries reads:
<page id="fs_d_load" file="fs:pages/data-load.xml"/>The file it names starts with the <page> element and holds everything that belongs to the page: its states, its datasources and its layout. In Timesheet the two page files have 111 and 218 lines.
The JavaScript follows the same order. Both apps sort their controllers into folders by kind: one folder for the page controllers, one for the datasource controllers.
Why the layout matters to you#
A page can be read alone. A file of a hundred or two hundred lines fits in one sitting. To understand the list page of Timesheet, you open one XML file and two controllers.
A change stays in its file. When two developers work on two pages, they change two files. In an app with one main file, both change the same file and meet in every merge.
An update is easier to compare. When IBM ships a new version, a comparison file by file shows which pages changed. With one large file, every difference lands in the same place.
The second and third point are our reading of the layout. The first one rests on a number: the largest page file of the two apps has 260 lines, where the main file of a large app has several thousand.
Timesheet: the smallest app#

Timesheet shows a person the hours they reported. The selector of its list has three entries: “Today”, “Yesterday” and “Search all records”. A tap on a card opens the work period with its details. The three related records at the bottom lead out of the app: the work order, the asset and the location each have an arrow.
Our demo technician had reported hours only long ago, so the list was empty at first. We added a work period for today, and it appeared.
| Part | Timesheet | Crew Manager |
|---|---|---|
| Pages | 2 | 3 |
| Datasources | 7 | 20 |
| Object structures | 3 | 8 |
| Dialogs | 0 | 7 |
| Sliding drawers | 0 | 6 |
| States | 5 | 9 |
| Controller classes | 5 | 8 |
| Methods in these classes | 22 | 73 |
| XML files | 3 | 14 |
| Lines of markup | 369 | 739 |
| JavaScript files, without tests and mock data | 7 | 13 |
| Lines in these JavaScript files | 547 | 2,765 |
Both apps as shipped with our system of the MAS 9.2 series, where Timesheet is app version 9.2.90 and Crew Manager is app version 9.2.91. Pages, datasources, dialogs, drawers, states and classes are counted by the structure view of our MAF editor, the lines with wc -l.
With five controller classes and 22 methods, Timesheet is an app you can hold in your head. It reads through three object structures, and the one for labor transactions delivers its records.
Crew Manager: the same layout, one size up#

Crew Manager is for the person who leads a crew. The list shows the crews of the signed-in user, and “Manage crew” opens one. The page of a crew has a part for its labor and a part for its tools. Seven dialogs and six drawers belong to the app, most of them for adding a person or a tool and for the lookups behind them.
Its layout is the one of Timesheet with more files: three page files, seven files for dialogs and lookups, each dialog in its own file, and three shared files. The largest controller class, for the page of one crew, has 35 methods.
Two things happened on our system that are worth telling.
The list was empty. Our demo data has no crew at all. We made a crew type and a crew, and the list stayed empty. The list “My crews” shows a crew to its supervisor and to the people who are labor of the crew. We named the demo technician as supervisor, and the crew appeared.
The page of the crew raised an error. When we opened the crew, the app showed a system message: the relationship ITEM does not exist for the business object AMCREW. The page stayed in use, with its two empty parts. A datasource of the app asks for a relationship that our Manage does not have. We did not look for the reason on the server side.
The second point is a lesson that returned in several case studies of this series, in a new form. An app is as good as the system behind it. An app can be published and listed on the start screen while one of its pages asks Maximo for something that is missing.
What to take from the two apps#
- For your own app, start modular. A main file with one line per page costs nothing on the first day, and it keeps two developers out of each other’s way.
- Read Timesheet first. It is the smallest complete example of the layout: two pages, seven datasources, 22 methods.
- Then read Crew Manager for the next steps: dialogs in their own files, lookups, and writes.
- Test every page on the system it will run on. The list of crews worked, and the page behind it raised an error.
What to read next#
Which App for Which Use Case? places both apps in the family. Understanding app.xml explains the main file, and ICMOBILE - Inventory Count shows a small app of the other style, with almost all its markup in one file.
IBM describes the Crew Manager and Timesheet apps in the documentation of Maximo Mobile. Crews and crew types are maintained in the Crews and Crew Types applications of Maximo Manage.
