3 ms·
> I wouldn’t expect two teams in different companies, one in California and the other in New York, to use similar notations unless someone was deliberately keep
by KronisLV 4y ago
> I wouldn’t expect two teams in different companies, one in California and the other in New York, to use similar notations unless someone was deliberately keeping them in sync.
I feel like you need a reference implementation for almost any spec out there for it to remain consistent, like a tool that everyone might use for working with UML or whatever. For example, have a look at BPMN, which has https://bpmn.io/ https://bpmn.io/ without which it would be another spec that many wouldn't care about.
Of course, the tools actually need to be good, because I've seen too many bad Eclipse based pieces of software, like for 4EM modeling or other approaches that never really took off in the real world, outside of niche contexts. It might be a case of model driven development feeling pretty useless, unless it actually helps you develop the solution with minimal friction.
A good example of this are ER diagrams in MySQL Workbench! For example, consider the following, what I've sometimes done:
- open MySQL Workbench
- reverse engineer an existing DB, get an ER model
- alter the model as necessary (add tables, change columns etc.)
- use the forward engineering/synchronization tools to get DDL that could be applied to DB
- execute or alter as necessary beforehand
Contrast this to the workflow that a colleague of mine had:
- open draw.io
- open a manually drawn ER diagram of the DB from local/shared disk
- compare against DB schema manually, possibly fix parts that have changed in the DB since last diagram update
- alter the model as necessary, using regular drawing elements and text (with lot of it being more like working in Paint)
- once happy with this "documentation" and it looks good, manually write all of the SQL that's needed for migrations
- execute the SQL
I think the best kind of documentation and models is the one that doesn't lie to you (can be updated automatically) and tools that integrate with what your infrastructure/application/schema actually is supposed to be, rather than some out of sync model. Otherwise you end up with documentation that is wrong or that nobody cares about.
If you want something like UML or any other modeling approach to be popular, I'd argue that you'd need something like the following:
java2uml --in-package src/java/main/dev.kronis/sales_app_2022/products --out-model products.uml
"MadeUpSoft UML Studio" > File > Open > products.uml
... do your changes
"MadeUpSoft UML Studio" > File > Save
uml2java --in-model products.uml --out-package src/java/main/dev.kronis/sales_app_2022/products
Until we have model driven development that goes both ways (forward and backward engineering), the use cases for it will be severely limited.
- ttfkam 4y agoWholeheartedly agree about the need for better and bidirectional tools. That said, while I appreciate MySQLWorkbench and its ERD generation skills, I have never seen anything sufficiently powerful to document the features in a more feature-rich database like Postgres. For example: • knowing where the partial indexes are and what their defined subset is • domain types, their base type, and their defined subset • row-level access policies • trigger order, dependencies, and dependents (I think auto-generated sequence diagrams would do wonders here) • table partitioning hierarchy • constraint info or at least an identifiable visible marker for CHECK and EXCLUSION constraints • marking computed columns and materialized views • association between functions/procedures and the relations they read/write from in addition to cataloging pure functions • notation when a view is updatable • users/groups/roles and a view into the resources each have access to the system That's off the top of my head. I'm sure others can think of more. I realize these aren't trivial asks, but great tools rarely are. The existing ERD generators I've seen like MySQLWorkbench are good for basic bootstrapping or strictly the database users. I want to see more for the DB admin/developer cohort. I want a Javadoc+PlantUML for databases.