Archyno
PracticePrax modelovania

Konvencie pomenovania v modeloch

Jediný test, ktorý ukončí spor o názvy: nájde niekto, kto pri tom nebol, tento prvok o pol roka tým, že napíše, ako by ho sám nazval?

5 min čítaniaModelling practice2 z 3

01The searchability test

Naming arguments are unwinnable because both sides are arguing about taste. There is one criterion that is not taste: in six months, will somebody who was not part of this conversation find this element by typing the word they would use for it?

That question decides almost every case people actually argue about, and it decides them in the direction the conventional advice already points - which is a good sign that the convention was never arbitrary. It also has the advantage of being checkable: open the model's search box, type the word a colleague from another team would use, and see whether the element comes back.

02The conventions the test implies

ElementNotationWhat it means
ClassifiersSingular nounOrder, not Orders or OrderEntity. The multiplicity says there are many; the suffix says nothing.
OperationsVerb, then objectcancel(reason), not orderCancellation(). The class it lives on already supplies the noun.
Business processesVerb phraseHandle claim, not Claim handling. A process is something being done.
ServicesNoun phraseClaim assessment, not Assess claim. A service is something offered, and the difference from a process is the whole point.
Association endsRole, from the far sidemanager and reports, which is the only way an association between one class and itself reads.
ViewsAudience and questionPayments - what calls the ledger beats Payments overview, which describes every view ever drawn.

The service-versus-process row is the one that repays attention in ArchiMate specifically. The language distinguishes what an organisation does from what it offers, and naming both with the same grammar throws that distinction away at exactly the point a reader needs it.

03Acronyms, prefixes, and the things teams argue about

Acronyms: spell them out on first definition, then use them. If the business genuinely says "SLA" and never says "service level agreement", the element is called SLA and its description contains the expansion - so the search for either word finds it. The failure is an element called SvcLvlAgmt, which matches no query anybody would type.

Type prefixes: no. C_Order, IPayment, tblCustomer - the model already knows what kind of element each is and draws it differently. A prefix adds characters to every name and information to none, and it puts every class in the model under one letter alphabetically.

Language: pick one and write it down. A model with German element names and English operation names is the state teams drift into rather than choose, and it doubles every search. If the business vocabulary is not English, the model is not English - that is a coherent choice, and much better than half of one.

In one line each

  1. 01The test is whether a stranger finds the element by typing the word they would use.
  2. 02Singular nouns for classifiers; verb-then-object for operations.
  3. 03Verb phrase for a process, noun phrase for a service - the distinction is load-bearing.
  4. 04Spell acronyms out in the description; never abbreviate into something unsearchable.
  5. 05No type prefixes, and one language per model, written down.

04Časté otázky

Aká je najlepšia konvencia pomenovania prvkov UML?

Podstatné mená v jednotnom čísle pre klasifikátory, slovesné frázy pre správanie a slová, ktoré už používa biznis, namiesto slov z kódu. Na tom, ktorú konvenciu si vyberiete, záleží oveľa menej než na tom, či cudzí človek nájde prvok tým, že napíše, ako by ho prirodzene nazval.

Majú byť názvy tried v jednotnom alebo množnom čísle?

V jednotnom. Trieda opisuje jednu inštanciu, teda Order a nie Orders - to, že ich je veľa, hovorí násobnosť na vzťahu. Množné číslo patrí databázovej tabuľke, čo je iná vec, a práve preto sa tie dve často nezhodujú.

Mám použiť biznisový alebo technický termín?

V modeli biznisový. Ak biznis hovorí poistná udalosť a kód hovorí case, model hovorí poistná udalosť a mapovanie si poznamená. Model v slovníku kódu prečítajú len tí, čo kód už poznajú, a to je práve publikum, ktoré ho potrebovalo najmenej.

ZdieľaťXLinkedIn
Všetky články: Practice
Všetky články