0

I recall some criticizing structured analysis as something outdated, but it seems that it is still in use today at least with DFDs. A company who claims to be agile in its ways was using a tool called PyTM for threat modeling for example, and that tool was a tool that generated DFDs.

I suppose if one were to create the equivalent of a DFD diagram, it might be a UML activity diagram, but after trying so many tools for SysML and UML in the past, I began to wonder if just simple circles and arrows and boxes representing data stores are the way to go after all. And with the upcoming SysML v2, it seems that users are in for major changes which practically have no tooling support.

DFDs seem to align with how people draw things on white boards. It may be that something as old as DFDs just might be modern after all. Are agile organizations big on DFDs?

4
  • See How to model data flow between components in UML, and my answer to that question softwareengineering.stackexchange.com/a/400785. My opinion about that is still the same: it is IMHO a big mistake that DFDs are so much underrepresented in UML
    – Doc Brown
    Commented Dec 12 at 6:28
  • Eventmodeling is gaining traction. Doing that and you won’t need anything else.
    – Rik D
    Commented Dec 12 at 6:43
  • "A company who claims to be agile in its ways" that seems completely unrelated to the rest of the question. Agile doesn't mean "don't design, just code", so using design tools/systems/methodologies isn't contrary to being/doing "Agile". Commented Dec 12 at 14:03
  • @JoryGeerts You’re right on that; I expressed myself a bit vaguely with that comment. What I was trying to say was the company having agile practices, but using structured analysis notation such as DFDs. They definitely had design in their process, but it had surprised me that DFDs were being used by a startup. I guess the real message is, use the tool or notation to get the job done and communicate a design that is understandable, regardless of notation even if it came from pre-agile, OO days. After all, we still see boxes and line diagrams all the time.
    – Passeris
    Commented Dec 16 at 10:51

2 Answers 2

2

Data Flow Diagrams remain popular. So popular that when people look at class diagrams for the first time you have to explain to them that the arrows don’t point in the direction of data flow (those point to dependencies; showing what it knows about).

Data flow diagrams show what goes in where, where it comes out, and what it does along the way. It’s a good way to illustrate a system at a high level that makes it easy to show the major components and what they are for.

But it’s not strictly an alternative to UML. Data flow diagrams have become part of uml. UML formalizes many kinds of diagrams. But few people have patience for that formality and it usually just ends up being labeled boxes and labeled arrows. Which is fine if you explain them well. I'll take a good explanation over strict adherence to formalism any day.

2
  • 2
    "DFDs have become part of UML" - too late, too badly named, advertised far too poorly, which leads to bad tool support and people hesitating to use them.
    – Doc Brown
    Commented Dec 12 at 6:32
  • I could imagine doing something like an activity diagram with pins and object flows and decompose them into structured activity diagrams like in DFDs. Then I could allocate those activities to classes. This would be a variant of Hassan Gomaas “Ada based design method for real time systems (ADARTS)”. He starts with DFDs and then creates tasks diagrams followed by Ada packages and their allocations.
    – Passeris
    Commented Dec 12 at 9:09
0

Structured analysis

Structured analysis, pioneered by Tom DeMarco (Yourdon Inc.) & Larry Constantine, or Chris Gane & Trish Sarson, and a couple of other methodologists, dates back to the 1970s. Three core techniques of this method are:

  • Top down analysis, breaking down a system into smaller parts
  • Modeling the data flows between the system parts or with external "entities"
  • Maintaining in parallel to the data flow a comprehensive data dictionary. At the end of the analysis, you could just use it to implement your database, if you didn't already use ERD which was also a technique born in the 70s.

Structured analysis was state of the art and helped to make really complex systems methodically. I was myself a big fan, and my first project as an intern was to write a DFD modeling tool. However, it leads mechanically to a big upfront design.

Using DFD independently from SA

As many diagramming technique, you can use the DFD diagramming technique in your own way, as suits your needs. You can certainly use it to sketch easily some quick diagrams to support discussions in an agile team.

However, DFD is build on separating data (the arrows) from the processes (the boxes or circles). This is useful for designing databases. But nowadays we tend to use objects, which are data + behaviours, so the distinction becomes more fuzzy.

On top of that, DFDs are not standardised. There are at least 2 main notations, but many more variants. This can create confusion and ambiguity. Last but not least, the flows in these diagrams are always simple: you can for example not show that data may be dispatched between several processes, or that several processes run in parallel with the same data.

More modern alternatives

If your problem/design is simple enough for being modelled with a few circles and lines with DFDs, chances are that you can as easily model them with a few rounded rectangles and lines in activity diagrams.

Activity diagrams have a higher standardization than DFDs. there is only one notation and it allows a high degree of accuracy when needed. The key features are:

  • activities correspond to processes
  • flow between actions can be either control flow (without data) or object flows
  • datastores correspond To datastores/sources/sink
  • there are no "external entities" but these can easily be emulated with swimmlaneg, and sterotypes/symbol on some program activity
  • if needed, you can show filtering and conditional routing, timeouts, parallel flows, etc.

There is no top-down incentive. While DFDs often rely on decimal hierarchical numbering of the processes and the diagrams, in UML diagrams are not supposed to be a single complete truth. They are supposed to show only a selected set of elements useful for the discussion.

Another candidates for data flows is BPMN which as process modeling notation is very appropriate for showing flows, including of information. It has the advantage of being standardised as well. A study nevertheless found out that it is more complex to understand for laypersons than equivalent activity diagrams, due to the higher number of symbols required by BPMN.

What is more agile?

We must not confuse the tools with the way the tools are used. It is true that DFDs are closely linked to SA and UML is methodology neutral (just a notational language). Some agilists promoted activity diagrams on the whiteboard in an agile fashion.

But in the end, both tools can be used in an agile context, and in a light and easy way (You don't have to use all the bells and whistles of UML, just the ones that help you). I can only recommend the more standardised technique.

11
  • The comment on top down design I don’t quite get since usually we have very little information at the start. We just have external things and a big circle in the middle and we go about refining as we get more information. That seems agile to me, or is there another take on that?
    – Passeris
    Commented Dec 12 at 9:09
  • 1
    To be honest, I don't like the attempt to replace DFDs by activity diagrams. ADs have a different intention, a different semantics, and "conditional routing" is something I usually don't want to see in a DFD. And I don't buy the "DFD is an upfront-analysis tool" argument - DFDs can be scaled up and down to different levels of abstraction, it can be used in agile approaches as well as for upfront-analysis, and they are not better or worse suited for agility than every other kind of higher-level design diagram.
    – Doc Brown
    Commented Dec 12 at 11:53
  • @DocBrown I hear what you say, but DFD stands for Data Flow Diagram. Activity diagrams are meant to model flows, which can be Object Flows (object=not just flat data but data and behavior) and control flows. It provides all the semantics of dfd, with the exception of the external entities, which you could emulate through swim lanes or a stereotyped proforma action if absolutely needed. The leading books about DFDs are all from the 70s, at best the 80s. the circles (your don/de marco) or the rounded boxes (gane&sarson) represent "processe" so in theory activities although in practice often
    – Christophe
    Commented Dec 12 at 13:35
  • modules. But I understand that it can be comfortable to continue using them.
    – Christophe
    Commented Dec 12 at 13:37
  • 1
    Ok, I admit, after informing myself a lttle bit more about Activity diagrams for object flows, I think you are right, they can be used to express the semantics of DFDs (I guess this was introduced in UML 2,0, in UML 1.x activity diagrams were mostly state machines). Still, whereever you find an introduction to Activity diagrams, the primary focus is always on control flow (like here in Wikipedia, and it is poorly explained that an AD can be used differently.
    – Doc Brown
    Commented Dec 13 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.