{"id":23062216,"url":"https://github.com/dotnet9/codewf","last_synced_at":"2025-08-15T08:33:27.390Z","repository":{"id":215464414,"uuid":"738759536","full_name":"dotnet9/CodeWF","owner":"dotnet9","description":"码界工坊,codewf.com, dotnet9.com, dotnetools.com, dotnet.chat","archived":false,"fork":false,"pushed_at":"2024-10-25T06:08:26.000Z","size":36999,"stargazers_count":20,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-25T12:54:00.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codewf.com","language":"CSS","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/dotnet9.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-04T01:29:04.000Z","updated_at":"2024-10-24T06:33:53.000Z","dependencies_parsed_at":"2024-03-18T09:57:35.147Z","dependency_job_id":"fc356ef5-32d3-4501-8622-3b7f18425424","html_url":"https://github.com/dotnet9/CodeWF","commit_stats":null,"previous_names":["dotnet9/codewf"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet9%2FCodeWF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet9%2FCodeWF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet9%2FCodeWF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet9%2FCodeWF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet9","download_url":"https://codeload.github.com/dotnet9/CodeWF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229903408,"owners_count":18142054,"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":[],"created_at":"2024-12-16T03:25:06.043Z","updated_at":"2025-08-15T08:33:27.363Z","avatar_url":"https://github.com/dotnet9.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Workshop\n\n**Code Workshop - Enlightening with Articles, Empowering with Tools**\n\n[简体中文](README.zh-CN.md) | English\n\n## Introduction\n\nThe Code Workshop is a website developed using .NET 10 Blazor. It features technical articles, introductions to open-source projects, and the use of online tools: Code Workshop - Enlightening with Articles, Empowering with Tools.\n\nDuring the development journey of this blog website, the website owner has overcome numerous obstacles. From the initial conception to the actual implementation, various development technologies have been explored, including [MVC]([ASP.NET Core MVC Overview | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/mvc/overview?view=aspnetcore-9.0)), [Razor Pages]([Introduction to Razor Pages in ASP.NET Core | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-9.0\u0026tabs=visual-studio)), [Vue]([Vue.js - The Progressive JavaScript Framework | Vue.js (vuejs.org)](https://vuejs.org/)), [Go]([The Go Programming Language (google.com)](https://golang.google.com/)), [Blazor]([ASP.NET Core Blazor | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-9.0)) and so on. Throughout this long process, the website has undergone nearly 10 version upgrades, with each version embodying the owner's painstaking efforts and exploration. The details of this challenging journey are thoroughly documented in [Sharing Some Materials I Accumulated When Developing the Dotnet9 Blog Website - Code Workshop](https://dotnet9.com/bbs/post/2022/3/Share-some-learning-materials-I-accumulated-when-I-was-a-blog-website).\n\nNow, after careful consideration and practical testing, the blog website has returned to using Blazor once again, adopting static SSR technology and incorporating the stylish and practical Ant Design design style. These series of improvements have led to a qualitative leap in the website's access speed, injecting new vitality into the website. Currently, the website has been successfully launched.\n\n- Website URL: https://dotnet9.com\n\n![](https://img1.dotnet9.com/2024/11/0207.gif)\n\n## The Power of Open Source\n\nHere, we would like to express our gratitude to the following open-source projects:\n\n- Known: https://known.org.cn/\n\n\u003e This is an open-source enterprise-level development framework meticulously crafted based on Blazor technology. With its outstanding features of low-code, cross-platform, and out-of-the-box usability, it breaks the limitations of traditional development and truly realizes the efficient mode of \"write once, run anywhere\". Its core value lies in its high efficiency and flexibility, bringing about a brand-new transformation to the software development model. It is like a magic key that helps developers effortlessly open the door to digital transformation, calmly handle various challenges, and fuel business growth, opening a new chapter.\n\nThe source code of this website is also open-source:\n\n- Repository: https://github.com/dotnet9/CodeWF\n\n\u003e The Code Workshop is a website developed using.NET 10 Blazor. It features technical articles, introductions to open-source projects, and the use of online tools: Code Workshop - Enlightening with Articles, Empowering with Tools.\n\n## Website Technology\n\nThe website is built on the open-source project [KnownCMS](https://gitee.com/known/known-cms) of [Known](https://known.org.cn/):\n\n\u003e KnownCMS is a content management system developed based on Blazor. The front end uses Blazor static components, and the back end uses the Known framework.\n\nSince the website owner's website is mainly for displaying blog articles and using online tools, and usually, Typora and VS Code are used in combination for article editing. The core data files of the website are stored in the [Assets.Dotnet9](https://github.com/dotnet9/Assets.Dotnet9) repository. Therefore, the website owner has removed the back-end management-related functions that are not currently in use. There are only three projects in the project source code:\n\n![](https://img1.dotnet9.com/2024/11/0209.png)\n\n- AntBlazor: The website owner has hardly made any changes to this project. It is basically the encapsulation of Ant Design style Blazor static components provided by Known, such as basic components like forms, labels, buttons, etc.\n- CodeWF: A Razor library that mainly encapsulates website documents and blog post pages. Currently, some tools are not yet online. Later, another library will be created according to the architecture of this library to write online tools.\n- WebSite: The entry project of the website, integrating the CodeWF and AntBlazor projects. Of course, it also includes the encapsulation of some pages (home page, about page, timeline, etc.), Web API controllers, etc.\n\n| AntBlazor | CodeWF | WebSite |\n|---|---|---|\n| \u003cimg src=\"https://img1.dotnet9.com/2024/11/0210.png\" alt=\"AntBlazor\" style=\"max-height: 350px;\"\u003e | \u003cimg src=\"https://img1.dotnet9.com/2024/11/0211.png\" alt=\"CodeWF\" style=\"max-height: 350px;\"\u003e | \u003cimg src=\"https://img1.dotnet9.com/2024/11/0212.png\" alt=\"WebSite\" style=\"max-height: 350px;\"\u003e |\n\n**Mini Knowledge: What is Static SSR?**\n\nStatic SSR is significantly different from Blazor Server or Blazor Client (WASM). As described in the [Microsoft documentation](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/class-libraries-and-static-server-side-rendering?view=aspnetcore-9.0):\n\n\u003e Static SSR is a unique running mode. When the server processes incoming HTTP requests, components run on the server side. During this process, Blazor will skillfully render the components into HTML and include it in the response content. Once the response is sent, the server-side components and the corresponding renderer state will be automatically discarded, leaving only pure HTML on the browser side.\n\n\u003e This mode has multiple advantages. Firstly, it greatly reduces hosting costs, alleviating the financial burden on website operators. Secondly, it has excellent scalability, being able to handle both small-scale user visits and large-scale traffic surges with ease. This is because it does not require continuous server resources to maintain component states, thus saving a large amount of server resources. Moreover, it breaks free from the constraint of continuous connections between the browser and the server, and there is no need to load WebAssembly in the browser, further optimizing performance.\n\nFrom a more straightforward perspective, static SSR and Blazor Server both fall into the category of server-side rendering, but they differ in interactive capabilities. In the static SSR mode, the front-end HTML controls cannot use C# event method mappings as in Blazor Server. However, it can still achieve interaction with the help of JS functions. For example, the click event of a button can be mapped to a JS function for processing. Fortunately, important functions such as C# entity binding and service injection can still be used normally in static SSR. This characteristic makes static SSR an ideal choice for front-end websites that require SEO (Search Engine Optimization, which means improving the ranking of a website in search engines through a series of technical means to increase website traffic. The core lies in ensuring that website content can be effectively crawled by search engines to obtain more traffic). The following is a definition of a static SSR component (the basic information component of article details, UPostCount.raozr):\n\n```html\n@inject IOptions\u003cSiteOption\u003e SiteOption\n\u003cdiv class=\"counts\"\u003e\n    @if (Post?.Lastmod!= null)\n    {\n        \u003cspan\u003eUpdated on @(Post?.Lastmod?.ToString(\"yyyy-MM-dd HH:mm:ss\"))\u003c/span\u003e\n    }\n    else\n    {\n        \u003cspan\u003eCreated on @(Post?.Date?.ToString(\"yyyy-MM-dd HH:mm:ss\"))\u003c/span\u003e\n    }\n    \u003cspan style=\"margin:0 5px;\"\u003e|\u003c/span\u003e\n    \u003cspan class=\"author\"\u003e@(string.IsNullOrWhiteSpace(Post?.Author)? SiteOption.Value.Owner : Post!.Author)\u003c/span\u003e\n    @if (ShowEdit)\n    {\n        \u003cspan style=\"margin:0 5px;\"\u003e|\u003c/span\u003e\n        \u003ca href=\"@ConstantUtil.GetPostGithubPath(SiteOption.Value.RemoteAssetsRepository, Post)\" target=\"_blank\"\u003eI want to edit, leave a comment\u003c/a\u003e\n    }\n\u003c/div\u003e\n\n@code {\n    [Parameter] public BlogPost Post { get; set; }\n    [Parameter] public bool ShowEdit { get; set; } = true;\n}\n```\n\nThe effect is as follows:\n\n![](https://img1.dotnet9.com/2024/11/0208.png)\n\n## Website Function Explanation\n\n### Home Page\n\n- Website URL: https://dotnet9.com\n\nLike most websites, it first displays the website slogan **\"Code Workshop: Developed using.NET 10 Web API + Blazor. Features technical articles, introductions to open-source projects, and online tools to facilitate efficient programming.\"**, then showcases featured article blocks, and later (currently under development) will add featured tool blocks, followed by friendly links, footer, etc.:\n\n![](https://img1.dotnet9.com/2024/11/0202.gif)\n\n### Documentation\n\nHere, some of the website owner's open-source projects are introduced:\n\n- Website URL: https://dotnet9.com/doc\n\n![](https://img1.dotnet9.com/2024/11/0203.gif)\n\nThe following are brief introductions to some of the projects:\n\n1. CodeWF\n\nThis is the source code repository of this website. You can click [the link](https://github.com/dotnet9/CodeWF) to view it.\n\n2. CodeWF.EventBus\n\nIt is applicable for in-process event passing (without other external dependencies), and its function is similar to that of MediatR. You can click [the link](https://github.com/dotnet9/CodeWF.EventBus) to view it.\n\n3. CodeWF.EventBus.Socket\n\nCodeWF.EventBus.Socket is a lightweight, Socket-based distributed event bus system designed to simplify event communication in distributed architectures. It allows processes to communicate through the publish/subscribe pattern without relying on external message queue services. You can click [the link](https://github.com/dotnet9/CodeWF.EventBus.Socket) to view it.\n\n4. CodeWF.NetWeaver\n\nCodeWF.NetWeaver is a concise and powerful C# library that supports AOT and is used for packet assembly and disassembly operations of TCP and UDP data packets. You can click [the link](https://github.com/dotnet9/CodeWF.NetWeaver) to view it.\n\n5. CodeWF.Toolbox\n\nCodeWF.Toolbox is a cross-platform toolbox developed using Avalonia, using Prism as the modular development framework and supporting AOT publication. It can be used for learning Avalonia projects. You can click [the link](https://github.com/dotnet9/CodeWF.Toolbox) to view it.\n\n6. CodeWF.Tools\n\nHere, commonly used tool classes are collected and shared. You can click [the link](https://github.com/dotnet9/CodeWF.Tools) to view it.\n\n7. Assets.Dotnet9\n\nThis is the core data repository of this website. You can click [the link](https://github.com/dotnet9/Assets.Dotnet9) to view it.\n\n### Blog\n\n- Website URL: https://dotnet9.com/bbs/\n\nThe blog page is in the standard technical blog style, divided into left, middle, and right columns. The left column is the article classification list. Clicking on it allows you to browse the article list in pages in the middle column. The right column contains website statistics, website owner's recommendations, etc.:\n\n![](https://img1.dotnet9.com/2024/11/0204.png)\n\nClicking on an article in the list allows you to browse the detailed content of the article. Here, we would like to thank [VleaStwo]([VleaStwo (Lee)](https://github.com/VleaStwo)) for providing the TOC function: This function enables users to quickly locate the key content of the article, improving reading efficiency.\n\n![](https://img1.dotnet9.com/2024/11/0205.gif)\n\n**You can modify all articles**\n\nIf there are typos, grammar errors, misleading content, or if you have anything to add to an article, you can click on \"I want to edit, leave a comment\" in the upper right corner of the page header to submit a PR. Thank you very much!\n\n![](https://img1.dotnet9.com/2024/11/0208.png)\n\nThe latest [PR#4](https://github.com/dotnet9/Assets.Dotnet9/pull/4) for the article [. NET Cross-Platform Client Framework - Avalonia UI](https://dotnet9.com/bbs/post/2022/11/one-of-the-best-choices-for-dotnet-cross-platform-frameworks-avalonia-ui):\n\n![](https://img1.dotnet9.com/2024/11/0213.png)\n\nThanks to the netizen [hjkl950217 (Chang Kong X)](https://github.com/hjkl950217)\n\n## Summary\n\nDuring the development process of the website, the website owner has been constantly exploring and trying, learning a large number of tutorials and open-source projects, which have been very helpful. We are very grateful to the friends and teachers who have provided assistance.\n\nIn addition, [VleaStwo](https://github.com/VleaStwo) has opened a [Masa Blazor branch](https://github.com/VleaStwo/CodeWF). Friends who are interested are welcome to submit PRs or communicate:\n\n![](https://img1.dotnet9.com/2024/11/0206.png)\n\nFinally, relevant links are attached for everyone to understand and communicate:\n\n- Source code of this website (Ant Design style): https://github.com/dotnet9/codewf\n- [VleaStwo](https://github.com/VleaStwo) branch (Masa Blazor style): https://github.com/VleaStwo/CodeWF\n- Known: https://known.org.cn\n- Ant Design Blazor: https://antblazor.com/\n- Masa Blazor: https://masastack.com/blazor\n\n## OpenAPI\n\nhttps://localhost:5002//scalar/v1\n\n## Sponsorship\n\n\u003e If you think this project is helpful to you, you can buy the author a cup of coffee to show your encouragement ☕️\n\n| WeChat Pay | Alipay | QQ Pay |\n|---|---|---|\n|![](https://img1.dotnet9.com/site/pays/WeChatPay.jpg) |![](https://img1.dotnet9.com/site/pays/AliPay.jpg) |![](https://img1.dotnet9.com/site/pays/QQPay.jpg) |\n\n## Thanks\n\n- [KnownCMS](https://gitee.com/known/known-cms)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet9%2Fcodewf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet9%2Fcodewf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet9%2Fcodewf/lists"}