Published Feb 5, 2018

Clean Architecture - The Art of Drawing Lines

Delve into the intricacies of software architecture with Michael and Joe as they unravel the art of defining system boundaries, discuss the evolution of architecture decisions, and share insights on effective interface design and advanced database management techniques.
Episode Highlights
Coding Blocks logo

Popular Clips

Episode Highlights

  • Efficient Updates

    Efficiently updating databases, especially with large datasets, is a complex task. Joe Zack explains that while SQL queries can quickly update attributes, they often fail to enforce business rules, leading to potential inconsistencies 1. He emphasizes the importance of ensuring data consistency and correctness, even if it means spinning up thousands of objects in memory to validate changes 2.

    You spun up 10,000 objects in memory in your application to ensure that you can update it properly just to send it back to the database. And that feels inefficient and it probably is from an operation standpoint, but from a data consistency and a data, um, what do they call it?

    --- Joe Zack

    This approach, though seemingly inefficient, guarantees that updates adhere to business logic and maintain data integrity.

       

    Business Logic

    Joe discusses the debate over where business logic should reside, arguing that databases should primarily serve as storage. He notes that mixing storage with business rules can hinder scalability and performance 3.

    Your business rules should be something else. And if you think about that, especially in a lot of today's architectures and applications and whatnot, where the whole idea is cloud and the ability to scale horizontally in order to get the performance and the expectations that you need for your users, then that makes sense.

    --- Joe Zack

    He warns against the temptation to place business logic in the database for efficiency, as it can lead to unintended consequences and complicate maintenance 4.

       

    SQL Tricks

    Joe shares advanced SQL tricks that can enhance database management. He highlights the use of stored procedures and meta objects to uncover hidden functionalities in SQL Server 5. One useful trick involves searching the entire database for specific procedures or functions using the output window in SQL Server Management Studio 6.

    One of the tips that I do or one of the tricks that I do a lot is also like star from, from Sys objects where object definition like, and then I'll put whatever I want in there and I can search the entire database for procs functions, whatever that have something.

    --- Joe Zack

    These techniques can significantly streamline database operations and improve efficiency.

Related Episodes