mastodon.me.uk is one of the many independent Mastodon servers you can use to participate in the fediverse.
Open, user-supported, corporation-free social media for the UK.

Administered by:

Server stats:

511
active users

Kevin Rutherford

Question for the (old) Extreme Programming crowd:

Does System Metaphor work best when you're building using OO? (I'm thinking of the translation to "4 key objects", for example)

Also: do you think of System Metaphor as relating to internals or externals? For example, modelling the C3 payroll system as a manufacturing production line always seemed to me to be an _internal_ view...

In _XP Explained_ Kent Beck says 'The metaphor in XP replaces much of what other people call "architecture."'

But what if it doesn't? For example, what if you have separate read-models and write-models? What if your software architecture in no way maps to your Customers' mental model? Does System metaphor only properly work for (small) OO applications...?

@kevinrutherford my biggest XP project had a lot of internal usage even though some parts were external facing. Although we didn’t have a single XP style metaphor it was certainly useful describing many parts of the system in terms people understood, like a “book keeping system to finance” or “an auction” to sales, although I tend to find for many things, the language is not really a metaphor it’s just a digital version of a system that existed before we had computers and we use the same words.

@kevinrutherford I don’t see metaphor as _necessarily_ a map from user’s domain to system’s.

I’m also ok to use it as a system-level description or lower down. There are metaphors everywhere in software.

I think Kent was right that a metaphor can drive a lot of understanding, and also right in (elsewhere) saying it was the least well understood idea in XP - certainly the least explained:)

I consciously look for metaphors to help explain/understand things. Sometimes it works:)

@billwake ...but if the metaphor _is_ internal, and is not "canonical" or "natural" or "direct", it could contradict any Ubiquitous Language (which I view as requiring the code to use the user's language)

@kevinrutherford I think there’s tension there but not contradiction- there are usually solution parts that aren’t directly domain concepts. (But maybe some folks bear down on metaphor to where you can’t see the domain.)

I sat down one time to write every metaphor I could see in software: window, scroll, tree, factory, garbage collection, etc. it didn’t take long to get 100 examples:)

@kevinrutherford it would seem worrying if a customers mental model “in no way maps to the architecture” unless the architecture is bad or originally designed with different needs in mind and perhaps is no longer likely to meet the ongoing/changing needs of the system. Surely their mental model at a high level has to be relatively good just to use the system?

@kevinrutherford it makes me think of “All models are wrong, but some are useful”. If customers frequently had one model of how a system works but the actual way it works is different, perhaps it would be better to change the way it works or find ways to make it more obvious how it actually works. I think the best approach depends on the situation. The read model/write model thing is an implementation detail, does a customer need a model for how things work that much under the hood? Perhaps for agile collaboration but then I think you can’t encapsulate all possible levels of detail with a single metaphor or conceptual model right down to the silicon - you’d need quite a few conceptual models!

@kevinrutherford but the fact that multiple models or metaphors might be useful for parts of a system or at differently levels of implementation detail or for different customers doesn’t mean a high level system metaphor isn’t useful. I suppose a system metaphor feels a little like a thing used to explain a new thing in terms people already understand and it might be more useful if that is the situation you face. Eg…

@kevinrutherford “The Assembly Line Metaphor for a Workflow System” or “The Library Metaphor for a Content Management System”. We evebtually reach a crossover point more people understand a workflow system or CMS system than an assembly line or library!

@MatthewPCooke I think I'd expect the opposite. As a user of Amazon, I'm thinking in terms of products, postage charges, reviews, sellers etc -- I'm definitely not thinking about lambdas, message queues, VMs, BFFs etc.

I can see the value in having a Ubiquitous Language, so that my architectural components have names drawn from the user's mental model. But architecture seems to me to be orthogonal to that?

@kevinrutherford ah when you say architecture, I was thinking more of the systems concepts, the relationships between them and the operations/events/states they can be in. The things that cross the customer/engineer boundary and need to be modeled in some way regardless of the implementation. You were thinking a little lower about the underlying system design 😀

@kevinrutherford i guess when I think about the level of a system metaphor I’m thinking it’s useful for understanding the concept that both customer and engineers need to be aware are being modeled that are likely to map “in some way” to the underlying architecture, as a new engineer to better understand the underlying system you’d ideally need a knowledge of both the type of architecture(s)/frameworks being used (n tier, event sourced, whatever) AND the high level system metaphor.

@kevinrutherford i suppose it might be that if you knew the system metaphor it might immediately make you think some type of underlying technical architecture might be better suited for the system, but other than that, I reckon the system metaphor isn’t going to give away much of the underlying architecture choices by itself. Like it might suggest what concepts might exist in the write model or what useful views could exist in the read model, if someone also told you the system uses separate read/write models, but it isn’t going to indicate that separate read/write models are being used in the actual metaphor. Or I reckon that would be unusual anyway.

@kevinrutherford (he says authoritatively, having never really used the XP system metaphor concept 😂)

@kevinrutherford I’ve always thought “internal”, a “theory of operation” that the whole team relates to, but not typically part of the users’ model.

Some teams use a “naive” metaphor (I prefer to call it “direct”): “here’s an account, here’s a line item, etc”.

Domain-driven design emphasizes the latter with Ubiquitous Language. Even there, I see a lot of metaphor. Eric Evans describes a breakthrough of seeing loans as dividing or growing a pie. Metaphoric insight:)

@billwake Yes, I've always thought "internal" too. And that gels nicely with SystemOfNames. But Kent's reference to architecture feels like a misstep to me, possibly making assumptions about OO and monoliths.

@kevinrutherford if you have a good metaphor then I guess you get more benefit if the key concepts coming out of the metaphor map to key objects in an OO system. That’s because devs are then more likely to guess the data and functionality that is likely to exist on each key object and how they might interact. Of course this does assume the metaphor is good and the OO design matches up to how most developers would typically implement the kind of system described by the metaphor.