{"id":13414783,"url":"https://github.com/sang-hyeon/Plastic","last_synced_at":"2025-03-14T22:32:07.269Z","repository":{"id":48281374,"uuid":"389267704","full_name":"sang-hyeon/Plastic","owner":"sang-hyeon","description":"This project provides encapsulation of things like Domain, Application Rules, Business Rules or Business Logic in Application.","archived":false,"fork":false,"pushed_at":"2024-06-29T15:42:53.000Z","size":557,"stargazers_count":60,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-08T17:08:01.282Z","etag":null,"topics":["application","application-rules","business-logic","business-rules","clean-architecture","command-pattern","cqrs","csharp-sourcegenerator","ddd","domain-driven-design","domain-service","ebi-architecture","usecase"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sang-hyeon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-07-25T05:14:51.000Z","updated_at":"2025-02-27T20:12:17.000Z","dependencies_parsed_at":"2024-01-05T20:51:31.963Z","dependency_job_id":"a266f4ed-1efa-4832-9802-47fea10f96a1","html_url":"https://github.com/sang-hyeon/Plastic","commit_stats":{"total_commits":182,"total_committers":4,"mean_commits":45.5,"dds":"0.15934065934065933","last_synced_commit":"207ff59446135b1cd1bb90fbf5d81f1b15bc6b58"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sang-hyeon%2FPlastic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sang-hyeon%2FPlastic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sang-hyeon%2FPlastic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sang-hyeon%2FPlastic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sang-hyeon","download_url":"https://codeload.github.com/sang-hyeon/Plastic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658055,"owners_count":20326459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application","application-rules","business-logic","business-rules","clean-architecture","command-pattern","cqrs","csharp-sourcegenerator","ddd","domain-driven-design","domain-service","ebi-architecture","usecase"],"created_at":"2024-07-30T21:00:36.665Z","updated_at":"2025-03-14T22:32:06.879Z","avatar_url":"https://github.com/sang-hyeon.png","language":"C#","funding_links":[],"categories":["Application Frameworks","Source Generators","Do not want to test 112 ( old ISourceGenerator )"],"sub_categories":["Patterns","1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category"],"readme":"﻿\n[![Build Source Code](https://github.com/sang-hyeon/PlasticCommand/actions/workflows/continous-integration.yaml/badge.svg)](https://github.com/sang-hyeon/PlasticCommand/actions/workflows/continous-integration.yaml)\n[![Nuget](https://img.shields.io/nuget/v/PlasticCommand)](https://www.nuget.org/packages/PlasticCommand/)\n\n\u003cbr\u003e\n\n# Abstract\nThis project provides encapsulation of things like Domain, Application Rules, Business Rules or Business Logic in Application. For this, Command pattern is used.\n\nAll applications such as Web, CLI, GUI application can use this project.\nThis can be part of the Usecase Layer, Domain Service Layer or CQRS.\n\nThe source generator introduced in .Net 5 is used to implement this Idea. If metaprogramming such as Source generator is properly used, it's possible to provide flexible source code that has not been provided by traditional programming.\nGenerated source code has the same effect as the source code you wrote yourself because it will be injected at compile time.\n\nThe name of this project is Plastic Command.\n\n[Blog post](https://medium.com/@Thwj/heres-a-new-proposal-to-encapsulate-domain-layer-5940dc6c738) \u003cbr\u003e\n[Blog post(한국어)](https://medium.com/@Thwj/%EC%83%88%EB%A1%9C%EC%9A%B4-domain-layer%EC%9D%98-%EC%BA%A1%EC%8A%90%ED%99%94-5661a3240184)\n\n\u003cbr\u003e\n\n# Flow of the plastic command\n![Platstic의 명령 흐름](docs/resources/flow.jpg)\n\n\u003cbr\u003e\n\n# Plastic Command\n\n## Quick Start\n\nStep 1. Specify The Command\n```cs\n// [CommandName(\"AddCommand\")]\nclass AddCommandSpec : ICommandSpecification\u003cint, int\u003e\n{\n        public AddCommandSpec(IMyCalculator calculator)\n        { \n            ...\n        }\n\n        public Task\u003cint\u003e ExecuteAsync(int param, CancellationToken token = default)\n        {\n            ...\n        }\n}\n```\n\nStep 2. Add Plastic to IServiceCollection\n```cs\nvoid Configure(IServiceCollection services)\n{\n        var pipelineBuilder = new BuildPipeline(...);\n\n        services.UsePlastic(pipelineBuilder);\n}\n```\n\nStep 3. Use a Generated Command\n```cs\nclass AddController : ControllerBase\n{\n        public AddController(AddCommand addCommand)\n        {\n                ...\n                ...\n                int result = addCommand.ExecuteAsync( 1 );\n        }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsang-hyeon%2FPlastic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsang-hyeon%2FPlastic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsang-hyeon%2FPlastic/lists"}