{"id":349,"date":"2023-11-25T21:32:53","date_gmt":"2023-11-25T20:32:53","guid":{"rendered":"https:\/\/archicode.be\/index.php\/2023\/11\/25\/use-case-pattern\/"},"modified":"2023-11-25T21:32:53","modified_gmt":"2023-11-25T20:32:53","slug":"use-case-pattern","status":"publish","type":"post","link":"https:\/\/archicode.be\/index.php\/2023\/11\/25\/use-case-pattern\/","title":{"rendered":"Use Case Pattern"},"content":{"rendered":"\n<p>The Use Case Pattern is a way of organizing the business logic of an application into a set of use cases. Each use case represents a specific action that a user can perform within the system. For example, in an e-commerce application, a use case might be \u201cPlace an Order\u201d or \u201cView Order History\u201d.<br><br>The Use Case Pattern consists of three main components:<br><br>Entities: These are the objects that represent the data in the system. They are usually implemented as classes or structs in the code.<br><br>Use Cases: These are the actions that a user can perform within the system. They are implemented as methods or functions that take input from the user and manipulate the entities.<br><br>Controllers: These are the objects that coordinate the use cases and entities. They are responsible for handling the input from the user, invoking the appropriate use case, and updating the entities.<br><br>By organizing the business logic of an application into a set of use cases, developers can create software systems that are easy to understand, test, and maintain. The Use Case Pattern helps to decouple the business logic from the user interface and the data storage, which makes it easier to change any of these components without affecting the others.<br><br>In conclusion, the Use Case Pattern is a powerful design pattern that can help developers to create software systems that are easy to understand, test, and maintain. By organizing the business logic of an application into a set of use cases, developers can create software systems that are flexible and adaptable to changing requirements.<\/p>\n\n\n\n<p>Happy architecture. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Use Case Pattern is a way of organizing the business logic of an application into a set of use cases. Each use case represents a specific action that a user can perform within the system. For example, in an e-commerce application, a use case might be \u201cPlace an Order\u201d or \u201cView Order History\u201d. The&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[],"class_list":["post-349","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":340,"url":"https:\/\/archicode.be\/index.php\/2023\/11\/15\/single-responsibility-principle-clearn-architecture\/","url_meta":{"origin":349,"position":0},"title":"Single Responsibility Principle (Clean Architecture)","author":"Hakim","date":"November 15, 2023","format":false,"excerpt":"When talking about patterns, almost everyone can name the SOLID pattern (Single Responsability, Open\/Close, Liskov Substitution, Interface Segregation and Dependency Inversion). The Single Reponsibility is one of the most important principle for clean code but it's also very important for clean architecture. Let's explore this The SRP states that a\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/archicode.be\/wp-content\/uploads\/2023\/11\/8a4f15b6-f5a9-4579-a2aa-6b95d588c817.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":302,"url":"https:\/\/archicode.be\/index.php\/2023\/10\/31\/migrating-an-old-net-app-using-unsupported-tech-a-step-by-step-guide\/","url_meta":{"origin":349,"position":1},"title":"Migrating an Old .NET App Using Unsupported Tech: A Step-by-Step Guide","author":"Hakim","date":"October 31, 2023","format":false,"excerpt":"In today's rapidly evolving tech landscape, it's quite common to find yourself in a situation where you need to migrate an old .NET app that relies on unsupported technologies. While this can be a daunting task, with careful planning and implementation, it's possible to breathe new life into your application.\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/archicode.be\/wp-content\/uploads\/2023\/10\/7c746f75-2548-471c-891a-05bfaa537995.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/archicode.be\/wp-content\/uploads\/2023\/10\/7c746f75-2548-471c-891a-05bfaa537995.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/archicode.be\/wp-content\/uploads\/2023\/10\/7c746f75-2548-471c-891a-05bfaa537995.jpeg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/archicode.be\/wp-content\/uploads\/2023\/10\/7c746f75-2548-471c-891a-05bfaa537995.jpeg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":287,"url":"https:\/\/archicode.be\/index.php\/2023\/05\/28\/infrastructure-as-code-and-source-controle\/","url_meta":{"origin":349,"position":2},"title":"Infrastructure as Code and source controle","author":"Hakim","date":"May 28, 2023","format":false,"excerpt":"For those who don't what is this about, Infrastructure as Code is a set of files when executed with the right tool, will create resources such as storage account, databases, virtual network etc. It is mostly associated with the cloud. As I've been working lately with Terraform, I really enjoyed\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":164,"url":"https:\/\/archicode.be\/index.php\/2020\/07\/15\/working-with-legacy-databases\/","url_meta":{"origin":349,"position":3},"title":"Working with Legacy databases","author":"Hakim","date":"July 15, 2020","format":false,"excerpt":"It does not happen everyday that as a developer we start working on a greenfield project. On many occasions, we have maintenance work to do on existing projects or we are rewriting an old application into microservices. What happens during these brownfield projects is that we have to cope with\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/archicode.be\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":384,"url":"https:\/\/archicode.be\/index.php\/2025\/09\/01\/google-play-services-and-parental-control\/","url_meta":{"origin":349,"position":4},"title":"Google play services and parental control","author":"Hakim","date":"September 1, 2025","format":false,"excerpt":"I came across a very interesting problem this week. I have parental controls implemented on the android mobiles of the kids in order to responsibly teach them about the usage of the phone etc. but we ran into some problems when I installed a new galaxy smart watch. The system\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":368,"url":"https:\/\/archicode.be\/index.php\/2024\/05\/12\/error-netsdk1082-in-maui-blazor-hybrid-app\/","url_meta":{"origin":349,"position":5},"title":"Error NETSDK1082 in Maui Blazor Hybrid App","author":"Hakim","date":"May 12, 2024","format":false,"excerpt":"There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'android-x64' If you ever encountered this error in your Maui Blazor hybrid App, this is probably due to authentication.It took me a while to find it out (more than I care to admit) mainly because I had serial\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/archicode.be\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/comments?post=349"}],"version-history":[{"count":0,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/349\/revisions"}],"wp:attachment":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/media?parent=349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/categories?post=349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/tags?post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}