Category: .NET

  • What I have learned by building .NET Stars -part 5 – always available data for a display website

    What I have learned by building .NET Stars -part 5 – always available data for a display website Dotnet Stars being a site just for displaying data,it does not require an API per se. Yes,for development purposes it needs a database and an API to display – but later – the data could be retrieved…

  • RSCG-Composite Provider – part 2 -execution

    Imagine this: For every interface IA you create: Your composite provider implements IA seamlessly In the constructor,pass an array of IA providers Each method returns the first successful value from your array of providers For even better performance,use a boolean flag to optimize by reusing previous successes The RSCG_CompositeProvider package doesnΓÇÖt just solve the obvious…

  • RSCG-Composite Provider – part 1 -idea

    API Outage solved with local data The problem that I try to solve is : How an UI can have data to show,even if the API from where it gathers data does not work ? Imagine having a robust system that adaptively switches between retrieving data from multiple sources – including internal APIs,memory-based storage,or even…

  • RSCG – RSCG_CompositeProvider

    RSCG – RSCG_CompositeProvider     name RSCG_CompositeProvider nuget https://www.nuget.org/packages/RSCG_CompositeProvider/ https://www.nuget.org/packages/RSCG_CompositeProvider_common/ link https://github.com/ignatandrei/RSCG_CompositeProvider author Ignat Andrei Generate composite class from interface,using multiple sources   This is how you can use RSCG_CompositeProvider . The code that you start with is The code that you will use is   The code that is generated is Code and pdf…

  • RSCG – DependencyModules.SourceGenerator

    RSCG – DependencyModules.SourceGenerator     name DependencyModules.SourceGenerator nuget https://www.nuget.org/packages/DependencyModules.SourceGenerator/ https://www.nuget.org/packages/DependencyModules.Runtime/ link https://github.com/ipjohnson/DependencyModules author Ian Johnson Generating service dependencies from attributes. Also,by the author,a more advanced example you will find in the DemoWithTest.zip inside the zip file   This is how you can use DependencyModules.SourceGenerator . The code that you start with is The code that…

  • RSCG – MockMe

    RSCG – MockMe     name MockMe nuget https://www.nuget.org/packages/MockMe/ link https://github.com/connorivy/MockMe/ author connorivy Creating mocks for testing classes   This is how you can use MockMe . The code that you start with is The code that you will use is   The code that is generated is Code and pdf at https://ignatandrei.github.io/RSCG_Examples/v2/docs/MockMe

  • Pattern: CompositeProvider

    Description Composite Provider pattern is a structural design pattern that lets you compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. Example in .NET : CompositeProvider And his usage Learn More Source Code for Microsoft implementation of CompositeProvider SourceCode Composite Provider Learn More File…

  • What I have learned by building .NET Stars -part 4- Keyed Dependency Injection – constructor by keys

    As I said before,I have constructed first the interfaces. Then I have a null object pattern for each interface,constructed automatically with a Roslyn Code Generator,https://www.nuget.org/packages/rscg_Interface_to_null_object . And now,what I want is to have keyed DI for each new implementation -with a twist: It’s like a game of matching keys when another class is injected,the first…

  • What I have learned by building .NET Stars -part 3- Aspire

    I have that same idea to build a project : is what is called today a Modular Monolith – and it is very old in .NET world as can be implemented as a .sln solution. For those unfamiliar,a Modular Monolith allows you to break down your application into independent modules (think database access,data flow logic,a…

  • What I have learned by building .NET Stars -part 2- interfaces

    In my latest project,building a robust system using interfaces has been both a fascinating challenge and an enlightening experience. As I embarked on this journey,it quickly became evident how immensely powerful and transformative thinking in terms of interfaces can be. From the outset,interfacing brought clarity to several core aspects of the application: Data Management: Interfaces…