Focusing on the Use Case Appeals to Me
I really liked your recent post about use-case-centric architectures. It’s not the first time I’ve witnessed you rant about your frustration with database-centric architectures, but for lots of reasons this time it resonated with me more than in the past. In my view, this was the best explanation of your viewpoint yet and I appreciated the lack of theatrics and irrelevancies that are common in rants. It was a well-reasoned rant. Or is that an oxymoron?
Also, like the previous times I’ve been exposed to your mantra, I found myself wanting to try it. I want to build an application that is focused on the use case. I want to go to a source code folder, pop it open, and know immediately what the app is all about. Really. I think that would be AWESOME.
My Use Cases have My Process Wrapped Around Their Finger*
Use cases drive my development process. They are where we start and they are the core bits of our workflow. We don’t start development by defining a data model – we start off by asking “What do you want to do?”. Over and over and over. It’s the most fun you can possibly have on an untethered ferris wheel, like rolling down a hill inside a tractor tire.
This is perhaps THE reason why the idea of architecture and code revolving around a use case is very intriguing to me. It seems to work pretty well on the process side, wouldn’t it be cool if it also worked on the coding side?
Heck yes it would.
*As long as you are willing to include user stories as a form of use case this is true anyway.
This is Where the Party Ends
I won’t lie. As much a I want my architecture to revolve around my use case, I really can’t imagine up how to do it, and I’m no dummy. When you complain about the way rails apps are structured in a way that communicates only that they are a rails app, that the architecture doesn’t say anything about what the software REALLY is, I can’t help but wonder what it SHOULD look like. And I have no answers.
Seeing is Believing
Clean Code showed me how code can be. It’s an epic work, in large part because it SHOWS you how to write clean code. Seeing code go from crap to clean helps readers understand the principles behind clean code. It’s the best way to teach, and frankly, based on my limited exposure to the things you’ve written, it’s your best work.
You’ve been harping on about data-centric architectures sucking and how use-case-centric architectures are the hypothetical shizzle for a while now. I started paying attention to it about a year ago, but I’m pretty sure your lost-architecture thesis predates even that. I don’t have a problem with the idea, I just have a problem figuring out how to use the idea.
So, how about you show me? Show everyone, for that matter. Build a use-case-centric application so that next time SCNA rolls around you can follow up your picture of a rails app and its root directory structure with an example that doesn’t suck. Make it work on the web, and throw in an api for mobile for good measure. As you’ve mentioned in the past, these are trivial issues anyway and shouldn’t dictate architectures. But we still need apps that use these mediums, and we don’t have solutions that make the use case king.
So, there. That’s the gauntlet. I’m throwing it down. Please, please, please, put up.