Skip to content
ModuleM8 — Extend the engine from source (source strand)
After this session you canRender the field type on mobile or declare its fallback, and prove the no-code guarantee for the whole extension.
Time61 min with a facilitator · about 61 min on your own
Before you startM8-S3 done: the web control works on Assets. The mobile to-do file from M8-S2. Your source workbench running; an emulator or a phone with the mobile app built from your checkout. M3-S5 (parity) and the no-code guarantee checklist.
Go deeperMobile architecture · Mobile and web parity notes · Export, import and install apps

◆ Orientation (1 min) — Finish it, then prove it

Section titled “◆ Orientation (1 min) — Finish it, then prove it”

Maya Idris, a field technician, works from her phone. If the planners add a Meter reading field to work orders and her app shows nothing in its place, the extension has failed for the person it was built for, and nobody will notice until a pump is missed. In this session you settle the mobile half, then hand the extension to Omar Haddad, the maintenance planner, who must configure and use it without code on the web and the phone. You finish by packaging the configuration and writing down what the package cannot carry.

▤ Concept (5 min) — Three outcomes on the phone, and only two are acceptable

Section titled “▤ Concept (5 min) — Three outcomes on the phone, and only two are acceptable”

What the phone does with a type it does not know

Section titled “What the phone does with a type it does not know”

The mobile app’s domain package re-declares the platform’s enums, including the data types and the field components, so that it can read the API’s values without depending on the other code bases. For values it does not recognise, it degrades through unknown or “not supported” fallbacks rather than crashing, and a component the web designer can configure but the app does not implement simply renders nothing. That is good engineering for robustness and bad news for an extension: the default outcome of shipping a new field type without mobile work is a field that silently disappears on the phone.

So there are three possible outcomes, and only two are acceptable:

OutcomeWhat Maya seesAcceptable?
A mobile componentThe reading, displayed and editable, with the field’s rangeYes: full parity
A declared fallbackThe reading, displayed as text; editing done on the web; the limit written in the parity notesYes: a known, documented gap
The silent defaultNothing where the field should beNo: an undeclared parity gap

What to notice: the difference between the second and third rows is not effort but intention. A declared fallback is designed, visible and documented; the silent default is discovered by a technician in front of a pump.

The platform already ships declared gaps of this kind: the JSON field, for example, has a web editor and no mobile renderer, and the parity notes say so. M3-S5 showed you where parity gaps come from; here you decide one deliberately.

When you added MeterReading to the mobile mirror in M8-S2, the analyser stayed silent: the mirror’s one switch over the data type has a default branch, and a number it does not know is read as text. What the phone draws is chosen by the field’s component ids, which the domain package mirrors in two enums, one for edit components and one for view components. An id the app does not know becomes their UNKNOWN value, and the record screen draws nothing for it: that is the silent default, in code. The switches over these two enums have no default, so once you add MeterReadingInputComponent and MeterReadingViewComponent to them, the analyser lists every switch that must now handle them: the edit and view component factories, the column widths of lists, the filter-operator choice and whether the field can be filtered at all. Handling the new values in each of them is the work, whether the answer is a full component or a fallback. One place chooses with a default and is not listed: the value builder, which turns an API value into a display value by view component and shows “Un Resolved” for one it does not know; find it by search. Adding a default to silence the compiler would bring back the silent outcome: never do it.

For Larkspur, choose the declared fallback with display: on the phone, the reading is shown read-only as “4.2 mm/s” wherever the field appears, and the field’s edit position shows the value with a short note that it is edited on the web. Maya’s job is to read the latest vibration before she works on a pump; the planners record readings on the web or through the sensor feed. If technicians later need to enter readings on site, the full component is the follow-up, and the fallback has already settled where it plugs in.

An extension keeps the platform no-code only if a builder can configure it, and use it for something new, without code, on every surface the platform promises. The no-code guarantee checklist is the single test; M6-S4 explained why each item is there. The proof is not your opinion that it works: it is a builder persona doing a new task with it while you record evidence for each checklist item. Omar did not take part in building the type, which is the point.

The configuration that uses the field type travels as usual: a package of Asset Maintenance carries the field definitions, each naming data type 15 and the component id MeterReadingInputComponent. The engine change itself does not travel in any package: the data type, the caster, the controls and the mobile handling ship only with a platform build that includes them. So the package carries a precondition: it may be installed only on a platform build with the Meter reading type, and its notes must say so. In the capstone (M11-S5) a source-strand learner promotes “the packages and your build” together for this reason.

⛏ Lab (46 min) — Settle the phone, hand it to Omar, package it

Section titled “⛏ Lab (46 min) — Settle the phone, hand it to Omar, package it”

Goal. The mobile app displays Meter reading fields with a declared fallback for editing; Omar Haddad adds and uses a new Meter reading field on Work Orders, visible to Maya Idris on the phone; and the configuration is packaged with its precondition written down.

Before you start. Your workbench running; the web changes from M8-S3; the mobile workspace on feat/meter-reading with ~/meter-reading-mobile-todo.txt; an emulator or phone that can reach your workbench; Omar’s and Maya’s sign-in from your training provider.

The mobile half

  1. Add MeterReadingInputComponent to the domain package’s edit-component enum and MeterReadingViewComponent to its view-component enum, declared like their neighbours, and run melos run analyze >> ~/meter-reading-mobile-todo.txt. For each switch the analyser lists, decide what the new value does there: display, the edit-position fallback, or nothing because the switch is about something a reading is never used for (say which, in a short comment in the code).

  2. Add a small read-only widget that shows a reading as text, "${value} ${unit ?? ''}", and use it for every display position.

  3. In the edit position, show the same widget with a one-line note, “Edited on the web”, from the app’s localisation files in English and Arabic.

  4. Map the API’s value to the domain, in the value builder’s switch over the view component (it has a default, so the analyser does not list it): a reading arrives as an object with value and unit; treat anything else as missing, never as zero.

  5. Regenerate and analyse:

    Terminal window
    melos run gen && melos run analyze

    Expected: no errors. The to-do list is empty.

  6. Build and run the app against your workbench, and sign in as yourself. Open Pump P-104: the field shows 4.2 mm/s.

  7. Write the parity note, three lines: what the phone does with Meter reading, what it does not, and the follow-up.

Screenshot pending The mobile app's record screen for Pump P-104, showing Last vibration reading as 4.2 mm/s What to notice: the reading appears where the field is, as text, in the technician’s language; nothing is silently missing.

Omar’s no-code proof

  1. In a private browser window, sign in as Omar Haddad. Open Administration › Applications › Modules › Asset Maintenance, then Work Orders, and select Structure.
  2. As Omar, drag Meter reading onto the structure and name it Discharge pressure / «ضغط التصريف». Set Unit bar, Minimum 0, Maximum 16. Select Save, then Save Changes.
  3. As Omar, add Discharge pressure to the work orders view the planners use, so it shows as a column.
  4. As Omar, open work order WO-2041 in the portal, enter 9.6 in Discharge pressure, and save. Expected: the view shows 9.6 bar.
  5. As Omar, try 19. Expected: the form refuses it and names the range.

Screenshot pending The planners' work-order view with the new Discharge pressure column showing 9.6 bar on WO-2041 What to notice: Omar added the column and the value himself; the unit comes from the field he configured, not from code. 13. On the phone, sign in as Maya Idris and open WO-2041. Expected: Discharge pressure 9.6 bar, with the “Edited on the web” note in the edit form. 14. Record evidence for every item of the no-code checklist: for each, what Omar or Maya did and what you saw (a screenshot name or a one-line observation). 15. Note one thing Omar asked you during the proof. If the answer needed you, write down whether it reveals a gap in the extension or only in his training.

Package the configuration

  1. As yourself, open Administration › Packages › Build and select Create package. Name it Larkspur Asset Maintenance and choose the module Asset Maintenance.
  2. Write the README, starting with the precondition: Requires a platform build that includes the Meter reading data type (value 15) and its web control; install nowhere else.
  3. Select Create version, choose New features, and write the release notes: Adds Last vibration reading (Assets) and Discharge pressure (Work Orders), both Meter reading fields. Download the version.
  4. Commit the mobile changes on feat/meter-reading, and list, in your notes, everything a release of this extension needs: the three code bases’ builds, the package, the precondition, and the parity note.

Check.

  • The mobile analyser reports no errors and no default was added to any exhaustive switch.
  • The phone shows 4.2 mm/s on Pump P-104 and 9.6 bar on WO-2041.
  • The edit position on the phone shows the value and the “Edited on the web” note, in both languages.
  • Your parity note names what the phone does, what it does not, and the follow-up.
  • Omar added Discharge pressure, set its unit and range, added it to the view and saved a value, with no code.
  • Every item of the no-code checklist has a piece of evidence.
  • The package’s README starts with the platform precondition.
  • The mobile changes are committed.

Pass condition. A builder who did not build the extension configured a new Meter reading field and used it on the web, a technician saw it on the phone, every checklist item has evidence, and the package states its precondition.

If something goes wrong

What you seeWhat to do
The analyser still lists a switchA switch you handled is in generated code: edit the source the generator reads, then run melos run gen again.
The phone shows nothing where the field isA display switch was answered with “nothing”. Find the record screen’s path in the to-do list and use the display widget.
The phone shows “Un Resolved” where the field isThe value builder fell through its default: add the view component’s case there (step 4).
The phone shows 0 for an empty readingThe mapping treats missing as zero; return no value instead (step 4).
Omar cannot see Structure on Work OrdersHis Developer access is on another module in your seed. Check his grants as yourself; a missing grant is not a no-code failure.
Create version lists an external dependencyAsset Maintenance points at another module’s entity; note it in the README rather than moving it now.
Model answer

The mobile decisions (example):

Switch (from the to-do file)Decision
View component factory (records and lists)Display widget, “4.2 mm/s”
Edit component factoryDisplay widget plus “Edited on the web”
Filter-operator choice, and whether the field can be filteredNothing: the field is declared not filterable (M8-S3); comment says so
Column width in listsThe width of a short text; comment says so
Value builder (found by search, it has a default)A reading object with value and unit; anything else is missing

Parity note: On mobile, Meter reading fields are displayed as text (value and unit) everywhere they appear. They are not editable on the phone; technicians see “Edited on the web”. Follow-up: a mobile edit component with the field’s range, when technicians enter readings on site.

Omar’s proof (evidence, mapped to the checklist’s items): he configured a new field of the type on an entity that had none, with its own unit and range, in the designer, without code; he placed it in a view; he used it in the portal, and the range was enforced; Maya saw it on the phone, with the fallback declared in the parity note; nothing in the proof needed a developer or a deployment. His question, “can I filter work orders on pressure?”, reveals a known, declared limit (not filterable), which belongs in the builder guide, not a defect.

The release list: services build with the type and caster; web build with the control; mobile build with the display fallback; the Larkspur Asset Maintenance package (1.1.0) with the precondition; the parity note; and the decision record on where the range is enforced.

◇ Worked scenario (2 min) — The release that went out without its build

Section titled “◇ Worked scenario (2 min) — The release that went out without its build”

A colleague promotes Larkspur Asset Maintenance 1.1.0 to Larkspur Lab, which runs the shipped chart without your engine change. Before reading on, predict what happens at each point.

At import. The package’s field definitions name data type 15 and the component MeterReadingInputComponent. The lab’s platform has neither. Your best prediction from what you know: the import validates the package’s structure, and a data-type number it does not know may be refused, or may be accepted as a number it stores without understanding. Both are possible from the general rules you have learned; which one happens is a fact to check, not to guess.

If it is accepted. The definitions are stored. Records saved through the API keep whatever is sent, because no caster is registered for 15 and an unregistered type is stored unchanged. The designer cannot draw the field, because no control has that id. The phone reads the unknown number 15 as text, but it knows neither component id, so it draws nothing. Each layer fails quietly, in a different way.

What the master does. Not the import. The precondition in the README existed for this case: the package is installed only where the platform build carries the type, and the promotion plan installs the build first. You also add a check to the promotion runbook, confirm the target build includes Meter reading before installing the package, so that the next colleague is stopped by a step, not by a README nobody read.

The lesson. An engine extension and the configuration that uses it are released as a pair, in that order. A documented extension point (M7) would have travelled inside the package; an engine change never does. That is part of the price you accepted when M8-S1’s four tests said “change the engine”.

✓ Practice (6 min) — Parity, proof and release

Section titled “✓ Practice (6 min) — Parity, proof and release”
PracticeChoose one answer.

To make the mobile build pass quickly, a teammate adds a default branch to the switches the analyser listed. What is the effect?

  1. Explanation for A

    ✗ Incorrect

    Not this one: a default does whatever its body says for every unhandled value, usually nothing; it does not know about readings. See how the compiler helps.

  2. Explanation for B

    ✓ Correct

    Correct: the default restores the silent outcome; the exhaustive switches were the to-do list. See three outcomes.

  3. Explanation for C

    ✗ Incorrect

    Not this one: Dart allows a default; it simply turns the exhaustiveness help off. See M0-S1: the source check.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

Which of these is a declared fallback rather than an undeclared parity gap?

  1. Explanation for A

    ✓ Correct

    Correct: the behaviour is designed, visible to the user and documented, so nobody discovers it by accident. See three outcomes.

  2. Explanation for B

    ✗ Incorrect

    Not this one: a note elsewhere does not change what the technician sees, which is a missing field with no explanation. See three outcomes.

  3. Explanation for C

    ✗ Incorrect

    Not this one: that is an accident of a generic renderer, not a designed display; it is neither readable nor declared. See three outcomes.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

PracticeChoose one answer.

Why is the no-code proof done by Omar Haddad rather than by you, who built the extension?

  1. Explanation for A

    ✗ Incorrect

    Not this one: an administrator could add the field too; the reason is about who can judge no-code use. See the no-code proof.

  2. Explanation for B

    ✗ Incorrect

    Not this one: the point is not a formality but evidence from someone who does not know the code. See the no-code proof.

  3. Explanation for C

    ✓ Correct

    Correct: the proof must show a builder doing a new task unaided, and the builder of the code is the worst person to show that. See the no-code proof.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

What does the Larkspur Asset Maintenance 1.1.0 package carry of the Meter reading extension?

  1. Explanation for A

    ✗ Incorrect

    Not this one: packages carry configuration; engine code ships only with a platform build. See what the package can carry.

  2. Explanation for B

    ✓ Correct

    Correct: the definitions name data type 15 and the control’s id; the code behind them must already be in the target build. See what the package can carry.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the fields are part of the module’s design and travel with it; that is why the precondition matters. See what the package can carry.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

After the scenario’s failed promotion, which change prevents it from happening again most reliably?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the README already said it; a step in the procedure stops people, a note does not. See the scenario.

  2. Explanation for B

    ✓ Correct

    Correct: the check sits where the action happens, so the next promotion is stopped by a step rather than by memory. See the scenario.

  3. Explanation for C

    ✗ Incorrect

    Not this one: engine code cannot travel in a package; that is the price of an engine change. See what the package can carry.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

You can finish an engine extension on mobile with a deliberate answer, a component or a declared fallback, and never the silent default; prove the no-code guarantee with a builder who did not build it, with evidence for every checklist item; and release the extension as a pair, the platform build first and the package with its precondition after. After Module 8 you can add a capability inside the engine and expose it to builders on the web and on mobile, with no code for them.

Next. Both strands rejoin in M9-S1, where you diagnose performance across the engines your extension now lives among, and M9-S2 plans the upgrade of a platform that carries extensions like yours.