Spencer Pratt eliminated from LA mayoral as woke rival surges into Karen Bass showdown
Kanye West's wife Bianca Censori almost pops out of her nude suit on his 49th birthday after she calls him her '4ever'
The world's cheapest five-star destinations revealed - and how to bag the best deal on your hotel
Billions in UK foreign aid and Covid loans 'handed to terrorists': Britain handed more than £28bn in taxpayer cash to its enemies over six years, leaked dossier reveals
Dessert parlour Kaspa's to open next to A12 'very soon'
Donut Lab's 'Solid-State' Battery Exposed As Regular Li-Ion
Read more of this story at Slashdot.
Denise Van Outen, 52, says she's reclaimed her 'freedom' after 'challenging' times raising daughter Betsy, 16, led to years of 'mum guilt'
Brit buys £500 caravans, spends another £500 renovating them - and now sells them for THREE times the price: The tricks anyone can use and the costly mistakes to avoid
Police urge potential victims to come forward after allegations about West Ham co-owner David Sullivan are published
RICHARD EDEN: Quietly, one by one, ITV stars including Ant and Dec are rallying around disgraced Phillip Schofield. So, what do they know that we don't? Darren Day has the answer...
Irene is a grandmother! Home and Away star Lynne McGranger shares her joy as daughter welcomes TWINS: 'We kept it off socials for so long!'
Labour leadership battle and high taxes put firms off hiring, says CBI
Police update after man charged with attempted murder over Chelmsford incident
Work From Beach: Hundreds of civil servants clocking in remotely from holiday resorts, survey finds
CodeSOD: Driven Development
We should always be wary of "(.+)-driven development". Things like test-driven development, or domain-driven development are fine, but they're also frequently approached from a perspective of dogma, which creates its own terrible outcomes.
But let's talk about domain-driven development. Without getting too bogged down into the details of the approach, the idea is pretty straightforward: describe you domain model without reference to any lower-level concerns, so you can effectively write your domain logic in an abstract language tuned to your specific needs. In other words, it's just a pretty good practice. DDD offers tools and techniques for doing it, and as stated, can be adopted as a point of dogma instead of technique.
Julien joined a team which bragged about their use of DDD. Everything they did followed DDD best practices, they said. The fact that they piled up all sorts of related buzzwords when talking about it should have been a red flag.
Here's one of their "domain" classes:
namespace Acme\Documents\Domain; interface CakeSessionRepositoryInterface { public function isLoggedIn(string $cookieId); }In "domain" patterns, a "repository" interacts with domain objects in your data store. Things it shouldn't do:
- perform an authentication check
- interact with cookies
- care about session information
- be tightly coupled with your underlying web framework (CakePHP, in this case)
Excluding the curly-brackets, every line in this short snippet is wrong, which is impressive.
It looks like their domain shouldn't drink and drive.