Download the source code from Patreon: / source-code-for-87754379
One of the common stumbling blocks developers encounter in writing code is the problem of nesting constructor calls within object composition. At first glance, this approach can seem efficient in that it allows for the Single Responsibility Principle and the development of many small, focused - perfect, why not say? - classes.
However, this can quickly lead to intricate and harder-to-decipher code through a very peculiar practice - nesting constructor calls. As the functionalities we implement grow, they often make nested constructor calls inevitable, as small objects in a complex domain model become deeply intertwined. This approach often results in a code structure that's densely packed with technicalities, obscuring the actual intent, and making it hard to decipher the code's primary purpose at a quick glance.
The heart of the challenge is the overshadowing of the 'what' by the 'how'. Technical details pouring out of complex constructor nesting structures can unintentionally mask the primary intention of the code.
We need a paradigm shift towards intention-revealing code. By leveraging design techniques such as extension methods, developers can encapsulate the complex constructor chains, giving them a meaningful and semantically-rich name that clearly reflects the purpose of the code segment, sidestepping its inner technical workings.
From this video, you will learn how to transform the code into a self-documenting entity. With clear, purpose-driven naming, a developer would swiftly grasp a segment's intent without getting bogged down by its construction intricacies. In the end, while the technical depth of code remains paramount, you will learn how to balance it with clarity and a semantic-driven narrative, enhancing efficiency and overall intuitiveness in the development process.
Thank you so much for watching! Please like, comment & share this video as it helps me a ton!! Don't forget to subscribe to my channel for more amazing videos and make sure to hit the bell icon to never miss any updates.🔥❤️
✅🔔 Become a patron ► / zoranhorvat
✅🔔 Subscribe ► / @zoran-horvat
⭐ Learn more from video courses:
Beginning Object-oriented Programming with C# ► codinghelmet.c...
⭐ Collections and Generics in C# ► codinghelmet.c...
⭐ Making Your C# Code More Object-oriented ► codinghelmet.c...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⭐ CONNECT WITH ME 📱👨
🌐Become a patron ► / zoranhorvat
🌐Buy me a Coffee ► ko-fi.com/zora...
🗳 Pluralsight Courses ► codinghelmet.c...
📸 Udemy Courses ► codinghelmet.c...
📸 Join me on Twitter ► / zoranh75
🌐 Read my Articles ► codinghelmet.c...
📸 Join me on LinkedIn ► / zoran-horvat
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
👨 About Me 👨
Hi, I’m Zoran, I have more than 20 years of experience as a software developer, architect, team lead, and more. I have been programming in C# since its inception in the early 2000s. Since 2017 I have started publishing professional video courses at Pluralsight and Udemy and by this point, there are over 100 hours of the highest-quality videos you can watch on those platforms. On my RU-vid channel, you can find shorter video forms focused on clarifying practical issues in coding, design, and architecture of .NET applications.❤️
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⚡️RIGHT NOTICE:
The Copyright Laws of the United States recognize a “fair use” of copyrighted content. Section 107 of the U.S. Copyright Act states: “Notwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright." This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorized to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above.
⭐For copyright or any inquiries, please contact us at zh@codinghelmet.com
#csharp #dotnet #objectorientedprogramming
11 сен 2024