惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 阿新

用 AI Vibe Coding - word-cards 自部署 TTS + Vercel 部署实践 用 GPT-5.2 Vibe Coding,做了一个可以“玩”的人脸相似度应用 用AI开发AI翻译助手:初学者也能轻松做出第一个应用 数字产品护照 (DPP) 解决方案:利用 Blazor 和区块链实现产品全生命周期追踪 使用Blazor WebAssembly整合PocketBase的基础项目模板 Blazor Server完美实现Cookie Authorization and Authentication Blazor技术开发了一个访客管理系统 分享刚出炉的基于Blazor技术的Web应用开发框架 基于PaddleOCR实现AI发票识别的Asp.net Core应用 Clean Architecture For RazorPage 实现多语言和本地化 Workflow Core + asp.net core 5.0 实现简单审批工作流 GitHub自动化部署(CD) asp.net core 5.0 项目(免费空间) CleanArchitecture Application代码生成插件-让程序员告别CURD Ctrl+C Ctrl+V 一个遵循CleanArchitecture原则的Asp.net core轻量级开源项目 asp.net core 实现 face recognition 使用 tensorflowjs(源代码) fastreport-使用JSON做为数据源报表 分享我的第一个RPA练习 完美解决asp.net core 3.1 两个AuthenticationScheme(cookie,jwt)共存在一个项目中 基于领域驱动设计(DDD)超轻量级快速开发架构(二)动态linq查询的实现方式
分享我的CleanArchitecture for Razor Page项目模板
阿新 · 2021-08-13 · via 博客园 - 阿新

 这个项目是参考和整合了jasontaylordev/CleanArchitecture 和 blazorhero/CleanArchitecture 代码基础上,重构出来的新的项目,这两个项目都是非常优秀和人气很旺的关于CleanArchitecture的项目模板,我也fork了他们的项目并添加了一些自己的功能模块,我个人非常喜欢blazorhero/CleanArchitecture这个项目,前端使用的是微软的Blazor(webassembly)技术,对于.net开发人员可以很快开始工作,几乎不需要额外的学习,但在项目的进行中发现了一个致命的问题就是在(WASM模式下)性能不行,加载数据一多就容易的卡顿,但相信后面会得到优化,jasontaylordev/CleanArchitecture 项目的前端用的Angular12 由于我对angular/vue/react的技术不是很熟练,学习起来实在是感觉力不从心,在实际开发过程中遇到了很多坑,都需要用google来解决,所以最后我还是选择了自己最熟悉的开发方式asp.net MVC来对我原来的框架进行重构来实现CleanArchitecture设计模式。

我为什么要不断的升级和重构我个人的开发框架

首先我追求的是开发效率,开发速度一定要快,当然我个人做的项目都是小项目1-2月内完成的页面不超过50个的那种,所以我必须再1-2周内完成所有的原型开发(能运行增删改查操作的原型),所以我不考虑用前后端分离的解决方案原因很简单前后端分离需要来回切换不同的代码风格同时需要封装2次代码,对于一个人的开发工作无疑是增加了很多工作量。

第二考虑的就是编码的效率和感受,主要是减少拷贝复制的操作,最求极简的代码风格(CleanArchitecture就符合这一点,ABP就觉得太复杂了)不需要太多的分层和定义太多的接口,我喜欢编写那种非常流畅容易理解的代码,写代码追求那种像海上钢琴师里那种弹钢琴的境界

第三就是前端UI必须漂亮符合主流的风格,但我本人对css和UI布局是真的不行,所以我只能找一个我觉得好看的UI还必须是一整套,所以我选择了SmartAdmin - Responsive WebApp 如果你们喜欢的话可以通过链接购买

下面我介绍一下我的项目

技术栈

  • [ASP.NET Core 5](https://devblogs.microsoft.com/aspnet/announcing-asp-net-core-in-net-5/)
  • [Entity Framework Core 5](https://docs.microsoft.com/en-us/ef/core/)
  • [SmartAdmin - Responsive WebApp](https://wrapbootstrap.com/theme/smartadmin-responsive-webapp-WB0573SK0/)
  • [Razor Pages](https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio)
  • [Jquery EasyUI](https://www.jeasyui.com/)
  • [MediatR](https://github.com/jbogard/MediatR)
  • [AutoMapper](https://automapper.org/)
  • [FluentValidation](https://fluentvalidation.net/)
  • [NUnit](https://nunit.org/), [FluentAssertions](https://fluentassertions.com/), [Moq](https://github.com/moq) & [Respawn](https://github.com/jbogard/Respawn)
  • [Docker](https://www.docker.com/)

项目结构

 项目结构完全参考jasontaylordev/CleanArchitecture

 Overview

 Domain

This will contain all entities, enums, exceptions, interfaces, types and logic specific to the domain layer.

Application

This layer contains all application logic. It is dependent on the domain layer, but has no dependencies on any other layer or project. This layer defines interfaces that are implemented by outside layers. For example, if the application need to access a notification service, a new interface would be added to application and an implementation would be created within infrastructure.

Infrastructure

This layer contains classes for accessing external resources such as file systems, web services, smtp, and so on. These classes should be based on interfaces defined within the application layer.

[SmartAdmin - Responsive WebApp](https://wrapbootstrap.com/theme/smartadmin-responsive-webapp-WB0573SK0)

– an advanced UI Bootstrap 4 Admin and Dashboard – is built for the next generation. Its’ exceptional design contains vast collection of assorted reusable UI components integrated with latest jQuery plugins optimized to suit every modern web application project worldwide.

如何开发

生成数据库

 运行项目

 初始账号密码

 模板标准功能

 新增/编辑/删除/查询/导入/导出

多语言支持

 添加新的功能模块

 新增一个实体对象

 添加Application CQRS 功能模块

 添加页面

To-Do List

这个项目还刚刚很多基础功能还没有开发完成,后面我会继续完善,如果喜欢请在Github上给个赞。👍

  • 账号管理
  • 授权管理
  • 日志查询
  • 审批工作流
  • 文档管理
  • 代码生成visual studio.net插件 !important
  • ....

keep coding, enjoy coding