by bob1029 · 4y ago · 0 comments
If the product is like most, I'd then convert those excel workbooks to SQL schemas and start building some vertical slice demos.
None of this has anything to do with micro services, source control, etc. The schema (domain) is the most important part of the product. If your manager can understand it and you have a common language for communicating about it, you might actually have a viable business.
If you have several unrelated teams accessing and modifying the same tables, you’re guaranteed to have some headaches the moment one needs to make changes without affecting the others.
So interfaces isolating those access points to data become a must, and having clear owners of those access points that can maintain the interface contract or break it in a safe and coordinated manner is a godsend.
From that point on, the separation of code ownership kinda follows organically from data ownership.
Microservices are absolutely not a necessity, but in non disciplined organisations they tend to help enforce code and data ownership. It’s easier to keep a team from taking shortcuts and importing a piece of code or directly accessing data they shouldn’t when it is not technically possible to do so. Does that warrant the extra complexity? Debatable.
So making schema discussions as concrete as possible with Excel together with business stakeholders sounds like a smart thing to do.
But doesn't this "skew" your domain model in code by affecting your thoughts by technical details?
I'd prefer start with some event storming session? visualization of system and connections
then design proper domain model, correct abstractions, events between those modules inside system
then just implement persistence layer with mapper from domain model to database model which in the case of SQL contains those technical details like cache fields, FKs, etc.
There is two ways of thinking:
1) The database schema is the fundamental model of the business, and all application logic is built on top of that.
2) The application logic is the core and the database is just a utility for persistence of data.
I'm firmly in the first camp and assume the GP is also. I believe data is more crucial and will last longer than any specific application. Thinking of the database as mere "persistence" for application logic is putting the cart before the horse.
I also believe in Fred Brooks:
> Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious.
Also, data definitions are entirely language based, so if you doing DDD, most of what you need to discuss with other teams gets formalized on the data model, not on the logic.
I'd tend towards one as well, but a lot of real world constraints can throw that out the window.
Though I think I agree with you anyway, it is a chicken and egg problem. You can't know all things you will need schema for until you understand the businss logic requirements well, but it's hard to talk about those requirements without a common language for the entities in the business.
As someone else said, it's probably better to start with what events drive your org. What are the communication channels and triggers for those events.
> I'd prefer start with some event storming session?
Right - We don't literally start with a blank xlsx file on day 1 of a new product or big feature.
The first conversations are about abstract outcomes, market expectations, and eventually more concrete user stories. Once we are talking about what a user experiences, we can begin to accumulate types/properties/relations.
I never thought about prototyping it in excel and it sounds weird.
I'm intrigued
Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious." -- Fred Brooks, The Mythical Man Month (1975)
And I found not a excel aternative for this job.