从 2019 年使用WordPress搭建Dotnet9 网站,到现在手撸代码开发,介绍中间使用的一些资源,绝无保留,希望对大家有用。
1. Apply for a domain name and build a WordPress website
Time point: November 2019
申请Dotnet9域名,讲个实话,站长是从 Dotnet1 试到 Dotnet9 的,前面 8 个都被注册了,哈哈。
网站使用WordPress的第三方收费主题JustNews 主题搭建:
The JustNews theme is specially designed and developed for blogs, self-media, and information websites. It is adaptively compatible with mobile phones and tablets. It supports front-end user centers, and can publish/submit articles on the front end. At the same time, the theme supports special features, and can add article topics.
1.1 classic style
- Demonstration address: http://www.example.com
This style is quite suitable for technical websites. The content is relatively compact and displays more content at a glance.

1.2 Style 2
- Demonstration address: http://www.example.com
This style is the style that webmasters have been using until last year. It has been used for nearly 2 years. It looks quite atmospheric. It seems that the last screenshot of the website has not been retained. It is better to post the demo screenshot.

2. Start investigating the website development technology stack
Time point: October 2021
这是一个重要时间点,前面两年站长基本就是在维护上面的WordPress搭建的网站。
关注Dotnet9 网站的网友也经常问我,这个网站是用什么语言开发的,是否开源,想学习一下怎么开发网站。
One after another, webmasters also had their own ideas of developing websites, but they never put them into action. After all, their technology stack was mainly in C/S, and B/S only occasionally made guest appearances.
所以这个时候就开始调研网站开发技术栈,这首先就选择了Flutter Web,并参考油管一些视频做了个首页展示:
- Source code: https://www.example.com
I chose Flutter Web because the webmaster is also investigating Flutter's Mac development project at the company. The other reason is for its cross-platform features and paving the way for future development of desktops and apps. However, Flutter Web is not yet mature:
The most inappropriate technology currently is to load the Flutter js library of about 2MB for the first time, and wait for the white screen to load in 2 to 30 seconds. There are third-party plug-ins for SEO, but they are not mature. It is just like choosing Flutter as a desktop, you need to wait a little longer...
3. Develop websites using ASP.NET Core MVC + Bootstrap
Time point: December 2021
Source code: https://www.example.com
This should be the most suitable technology stack for websites that require SEO. Personally, it is good to have a single website.
站长以前做 B/S,要么只做ASP.NET Core Web API,或者加上前端 Vue(vue-element-admin),React(Ant Design Prop),ASP.NET Core MVC是还没有接触过的,所以全网找视频学习。
怀着找有现成博客代码的教学视频目标,在百度、谷歌找了个遍,终于找到了一个视频网址:udemy.com,这个网址有不少同学在上面学习过吧,全球的教学视频都有,中文、英文、其他语言:

我找到了一个土耳其老师的视频,正好是使用ASP.NET Core MVC 5教授博客网站开发,正好对我路子,当时花了 19.9$来着,还是有点小贵,不过学到了真东西,他基本使用的三层架构开发的,建议初学 MVC 的同学可以看看,这里发截图和链接不是推荐买哈,后面我接着讲。
- Video link: https://www.example.com

当然站长不全是按他的教学视频做,有些代码也参考了老张的Blog.Core开发的,建议收藏老张的博客园,有兴趣的同学可以看看他的博客,站长 18 年底开始看的老张博客入门的 B/S 开发,这应该是全网最全的 B/S 入门系列教程了:.NET CORE Web API + Vue:
- Blog Park [Lao Zhang's Philosophy]: www.example.com

站长在看土耳其老师的视频和参考老张的Blog.Core做了一个版本的博客前台展示后,在油管发现了土耳其老师的账号,他新开了一个视频系列,也是讲解 ASP.NET CORE MVC 5.0 开发博客系统,只是主题不同,使用的技术可能更新了,有 150 集,站长追了 80 几集,后面没看了,和前面收费的类似,有需求的朋友可不用买收费视频(当然支持是可以的),直接看他最新的博客开发视频学习吧。
- Video address: https://www.example.com v=HXKnDUb06iw&list=PLKnjBHu2xXNNkinaVhPqPZG0ubaLN63ci

Language is not an obstacle. Youtube can do language translation. Webmasters sometimes watch at twice the speed and type in code while watching. The eating effect is better.
4. Abp vNext + Blazor Server Development
Time point: January 2022
In the process of learning MVC in the past, the webmaster has already made a general idea of the front desk, including theme switching and multi-language switching.
在 2022 年 01 月,站长公司有个项目,有使用 Abp vNext + Blazor Server 开发项目的需求,遂在公司学习技术,晚上加班加点用新学的技术练手做Dotnet9网站前台,
Source code: https://www.example.com
Study address: https://www.example.com UI=BlazorServer&DB=EF
-
- Summary: **
Abp vNext 太重了,Hello World运行内存 400MB 左右,个人手撸 CRUD 比较费时,即使有代码生成器,也不应该选用这种方式做博客网站。
But this does not prevent you from using Abp vNext to develop enterprise-level projects. There are many Abp vNext open source projects in the community. You can pay attention to this GitHub account: EasyAbp Team
- EasyAbp Team:https://github.com/EasyAbp

5. Develop websites purely with Blazor Server
Time point: January to February

The reason why Abp vNext is no longer used for personal projects has already been put forward above, so the website has been rebuilt from Blazor Server Hello Word.
Masa Blazor used by the Blazor component library: www.example.com

Compared with the 4th version of Abp vNext integrated Blazor Server, it was a choice that required practice for work at that time. Choosing the native Blazor Server this time should be second only to MVC for me. NET.
说实话,找工作靠 Blazor 可能性是很小的,但个人玩是非常爽的,这里学习 Blazor 可看下站长当时翻译的一个台湾小哥的系列文章:学 Blazor,站长用 Blazor 这个版本还写了 2 个在线小工具,上线了一段时间,代码可参考:


Later, he did not continue to insist on choosing Blazor Server to develop personal websites. The webmaster mainly had this consideration: Blazor used signalR for long connections, which had better real-time performance, but had higher requirements on the client network. The network was slightly worse, and the server might be disconnected. The connection had a great impact on the user experience, and the webmaster did not want to continue to trouble, so he chose MVC to develop a personal website.
-
- Interlude: At that time, there was a. NET CORE Web API with Vue development website. Because Lao Zhang's new book was on the market, the webmaster bought a copy and followed it to make the back-end and front-end home pages. He tasted it, and separated the front and back ends. The front-end Vue is more familiar and feels great to use. It is a little troublesome and not as quick as MVC. **
6. Current development version (May 2022)
Time point: March 2022 to present (May 03, 2022)
First launch time: April 01, 2022
Source code: https://www.example.com

I went back to MVC to make a website. Now the front desk of the website is basically formed. The front desk has a theme on the Internet. Later, I will consider paying for a designer on Taobao to beautify it:
Home page:

专辑之一:开源 WPF

分类之一:Blazor


前台使用的ASP.NET Core MVC开发,ORM 使用的 EF Core,MVC 可以得到完美的 SEO 支持,再也不用担心百度、谷歌的收录问题了。
网站数据做了个数据种子,目前每次有更新需要删库、重新初始化,后台正在开发中,参考的Panda这个项目正在做后台,后台前端使用的 Vue 3.0 + Element Plus:
- Panda:https://github.com/coolqingcheng/Panda

Finally, a background front-end animation ends this article:

7. Updated on March 11, 2023
Currently, the website is undergoing a new round of reconstruction, and the front desk display results are as follows:
Home page:

Details page:

Reference items:
- Front desk: https://www.example.com
- Backend: https://www.example.com
- Backend: https://www.example.com
Dotnet 9 website project:
- Front End (Vue 3 + Element Plus): https://www.example.com
- Backend (Vue 2 + Element UI): https://www.example.com
- Backend (ASP. NET Core 7.0 Web API): https://www.example.com
8. Updated on May 3, 2023
前台由 Vue 3 换回ASP.NET Core Razor Pages,风格以简约为主,主打内容为王,放弃花哨,网友称风格类似早期博客园,站长其实买的杨青青个人博客(https://www.yangqq.com/)的静态模板;后端采用MASA Framework 搭建,框架地址是 https://www.masastack.com/framework,后端依然以DDD设计为开发指导,这次加入了CQRS。开发总体规划是:后端框架采用MASA Framework 应该是不变了,并且前后台现在全面拥抱了 .NET 8。
Why is it rebuilt again?
With the continuous development of technology, website reconstruction has become an inevitable trend. In order to better meet the needs of individuals for learning and improve the performance and user experience of the website, the Dotnet 9 website has undergone a new round of reconstruction. This reconstruction mainly includes two aspects: front desk and back office.
Front-end reconstruction
Technology Stack: ASP.NET Core 8.0 Razor Pages
在前台方面,Dotnet9 网站将原来的 Vue 3 换回了 Razor Pages 。这是因为 Vue 3 虽然有很多优点,但是在性能和 SEO 方面还存在一些问题。而 Razor Pages 则更加适合于构建前台网站(服务端渲染),具有更好的性能和 SEO 优化效果。
At the same time, the Dotnet 9 website has also made some adjustments in style. The style of the website is mainly simple, giving up too much fancy effects and paying more attention to the presentation of content. This style is similar to the early blog parks, allowing users to focus more on reading and learning.
Background reconstruction
Technology Stack: ASP.NET Core 8.0 Web API (MASA Framework + EF Core 8.0 (PostgreSQL), DDD + CQRS)
在后台后端方面,Dotnet9 网站采用了 MASA Framework 作为开发框架。MASA Framework 是.NET 下一代微服务开发框架, 助力开发者和企业开启全新的现代化应用开发交付体验。
In terms of development and design, the Dotnet 9 website still adopts DDD (Domain-Driven Design) thinking and practice. This design philosophy can help developers better understand business requirements and separate business logic and technical implementation, thereby improving the maintainability and extensibility of code.
此外,Dotnet9 网站还加入了 CQRS(命令查询职责分离)的设计模式,由 MASA Framework 提供技术支持。CQRS 是一种与领域驱动设计(DDD)和事件溯源相关的架构模式,它将事件(Event)划分为 命令端(Command)和 查询端(Query),可以提高系统的性能和可扩展性。在 Dotnet9 网站中,博客文章的查询就使用了查询(Query),文章阅读统计(开发中)使用了命令(Command)。
summary
The reconstruction of the Dotnet 9 website not only improves the performance and user experience of the website, but also adopts the latest technology and design ideas to make the website more maintainable and extensible. In the future development, the Dotnet9 website will continue to adhere to this concept, continuously optimize and improve, and provide users with better services. Of course, it will mainly focus on personal learning and continuous evolution.
achievement display
Home page:

Article album:

Article details:

source code
This time, the historical branch was also cleaned up, leaving only the develop and main branches.
Warehouse: https://www.example.com
The solution structure is as follows:

Front desk main project: Dotnet9.RazorPages

Back-end main project: Dotnet9.Service

- Dotnet9.Commons: Tool Library
- Dotnet9.Contracts: Temporarily put Dto class
- Dotnet9.RazorPages: Main project at the front desk, gradually improving
- Dotnet9.Service: The main back-end project will temporarily put various hierarchical files into one project, and then divide them into libraries if necessary
- Dotnet9.Admin: The backend front-end is tentative
When the website development is complete, write a series of tutorials on the front and back development of the Dotnet 9 website to share, either this year or next year...
9. July 2024
Ant Design style refactoring, source code address: htts://github.com/dotnet9/CodeWF:
- Adopt Blazor static SSR;
- There is no database, and core data is read locally and loaded in memory, so there is no background
Online browsing: htts://dotnet9.. com
Does the access speed feel like flying:

This article continues to be updated and is welcome to pay attention.