I wanted an actual CRUD app you wrote implementing what you say as a working base for our discussion and for testing scenarios.
Hah, foist by my own petard! I'm the one usually saying "show the work"
And in this case, I can't. Not because I don't have any, but due to issues with the law. I can't show you the medical sites because even just exposing the database structure violates HIPAA. I can't show you the federal agency stuff or I'd endanger my DOE certification and my clearance, I can't show you the public utility stuff because of the language of the contracts
(you want to talk an uptight and unreasonably litigious lot)... and I'd rather not share the third industry I've done stuff for as many would find it offensive.
And all my personal stuff is semi-static "poor mans" right now. I don't use it on my own stuff because I don't need it.
NOT that what people would call "CRUD" --
"Create, Read, Update, Delete" for those who don't know the term -- is anything special in and of itself, and whilst part of routing it's part of EVERY back end, so I fail to grasp the distinction.
CRUD seems to just mean "what a back end would/should be doing with user data anyways"... though some people restrict it to mean a specific bloated endless pointless object and overhead inducing train wreck. It's part of why to my mind the difference between CRUD and REST is absolutely bupkis apart from syntax and the gullibility of the masses for hot and trendy buzzwords.
It oft feels like just another of the many sick euphemisms and programmer double-talks that raises the hackles on my hackles. That's the problem with a lot of the lingo being used right now in programming. "Closure" when they mean enclosure, "Functional programming" when they mean the wasteful overhead of endless pointless separate functions for nothing, "side effects" on things that are not side effects if you're doing them INTENTIONALLY, "Agile" when they mean we have dozens of programmers and no plan, everyone just go do your own thing, "Big data" when they mean "I'm too stupid to work with this much information", etc, etc, etc...
Right back at you though, what would you hold up as an example of a good existing "routing" approach? I've never seen one that wasn't a over-sized, over-thought, over-engineered disaster where people try to take one single approach to data handling, and blanket apply it to everything where it just doesn't fit.
... and normally I like things that are over-engineered, but as Scotty would say the more they overwork the plumbing, the easier it is to stop up the drain.
If you want to start a separate thread
(we should stop threadjacking here) where you present/explain what you think good "routing" is I'd like that; if for no other reason than to see if you can convince me that I'm wrong. I often like to che-checkity-check myself ...
Big code in your site is bad for its health. That's the issue, most of what I see -- and have ripped apart -- for clients that uses "routing" is stuff I wouldn't even HAVE a "library of code" to show... as every data set is usually re-arranged to be simpler with far simpler handling methodologies on a case-by-case basis. I generally don't have a "off the shelf" -- even off my own shelf -- answer to problems of said nature because -- in my experience at least -- you sooner or later end up trying to shove a cow's size 20 hoof into a ladies size 4 pump.
It's the core concept behind the "flaw of averages"and the "complexity mismatch" trap. People end up jumping through flaming hoops of fire to make specific "programming paradigms" work in their "ecosystem of tools" that they waste time and dozens of k of code on things that should just be ten to twenty lines. Particularly if an update of one item involves updating other values in other places.
Hah, funny simile as it makes me ponder my choices and mindset. Is my distaste for off the shelf answers to problems stemming from how in the real world I've
NEVER once been able to buy anything fancier than t-shirts and sweat-pants off-the-rack without massive alterations? One size fits all usually fits nobody.
A bespoke suit always fits...
and remember: oxfords, not brogues!