55 热度

.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)

依赖倒置(Dependency Inversion Principle,缩写DIP)是面向对象六大基本原则之一。他是指一种特定的的解耦形式,使得高层次的模块不依赖低层次的模块的实现细节,依赖关系被颠倒(反转),从而使得低层次模块依赖于高层次模块的需求抽象.

收录时间: 2020-05-12
分类: 架构设计
贡献者: Rector
81 热度

带你走进神一样的Elasticsearch索引机制

相比于大多数人熟悉的MySQL数据库的索引,Elasticsearch的索引机制是完全不同于MySQL的B+Tree结构。索引会被压缩放入内存用于加速搜索过程,这一点在效率上是完爆MySQL数据库的。但是Elasticsearch会对全部text字段进行索引,必然会消耗巨大的内存,为此Elasticsearch针对索引进行了深度的优化。在保证执行效率的同时,尽量缩减内存空间的占用。这篇文章就深度解析了Elasticsearch索引原理,揭开搜索的神秘面纱。更多精彩内容请看我的个人博客前言相比于大多数人熟悉的MySQL数据库的索引,Elasticsearch的索引机制是完全不同于MySQL的B+...

收录时间: 2020-04-21
分类: 架构设计
贡献者: Rector
83 热度

ElasticSearch专栏讲解(一)

ElasticSearch是一个用Java语言开发的分布式文档检索引擎。也支持文档存储功能,且不会将信息类似SQL存储为列数据,而是存储已序列化的JSON文档的复杂数据结构。而且ElasticSearch支持集群部署,当集群中有多个ElasticSearch节点时,存储的文档会分布在整个集群中,并且可以从任何节点立即访问。ElasticSearch是基于 Lucene 的搜索服务器,并且提供了标准的 RESTful web接口,作为 Apache 许可条款下的开放源码发布。

收录时间: 2020-04-20
分类: 架构设计
贡献者: Rector
113 热度

A Fast and Lightweight Solution for CQRS and Event Sourcing

The purpose of this article is to present a fast and lightweight implementation of the CQRS+ES pattern using the C# programming language and the .NET Framework. This implementation is relatively full-featured, including support for SQL Server serialization of commands and events, scheduled commands, snapshots, sagas (i.e., process managers), and plug-and-play overrides for multitenant customization. I will describe how the code is structured, and illustrate how it works with a sample application.

收录时间: 2020-04-10
分类: 架构设计
贡献者: Rector
116 热度

Domain-Driven Design and Entity Framework Core

This article is about my experiences of applying a Domain-Driven Design (DDD) approach when working with Entity Framework Core (EF Core). I have now used DDD and my supporting libraries for two years on my own projects and client projects. Here are the bigger client projects where I used an DDD approach...

收录时间: 2020-04-07
分类: 架构设计
贡献者: Rector
169 热度

How to create better code using Domain-Driven Design

How to create better code using Domain-Driven DesignHomepage>Blog>How to create better code using Domain-Driven Design 16/03/2020Business requirements The anemic enterprise cake Project structure Where is the business logic? Issues with the anemic domain model Anemic model Primitive obsession Reada...

收录时间: 2020-03-25
分类: 架构设计
贡献者: Rector
AD 友情赞助
86 热度

CQRS

CQRS is a simple pattern that strictly segregates the responsibility of handling command input into an autonomous system from the responsibility of handling side-effect-free query/read access on the same system. If you are familiar with Domain-Driven Design, you’ve most likely heard about, Command-Query Responsibility Segregation (CQRS). Though the CQRS pattern is well-known, there are still a lot of misconceptions around this pattern, especially when it comes to applying it in real-world software projects. In this article, you will learn exactly what CQRS is, the principles behind it, and the benefits it can provide for your project.

收录时间: 2020-03-25
分类: 架构设计
贡献者: Rector
114 热度

Building microservices through Event Driven Architecture part11: Run Unit tests inside a docker container

This tutorial is the 11th part of a series : Building microservices through Event Driven Architecture. The previous step is about building microservices through Event Driven Architecture part10: Handling updates : https://logcorner.com/building-microservices-through-event-driven-architecture-part10-handling-updates-and-deletes/. In this tutorial, I will show how to run unit tests inside a docker container.

收录时间: 2020-03-10
分类: 架构设计
贡献者: Rector
148 热度

如何运用领域驱动设计 - 领域事件

在实践领域驱动设计(DDD)的过程中,我们往往会遇到多个领域对象相互交互的情况。比如聚合根A在执行某操作之前需要得到聚合根B的某个信号(或某些数据)。如果在单体应用程序中,我们有条件和机会使得两者进行强引用来完成操作,但是这将直接打破领域驱动设计的规范,从而使得项目不可控,再次回到大泥球的开发。

收录时间: 2020-03-06
分类: 架构设计
贡献者: Rector
159 热度

CQRS: Refactoring Queries without Repositories

This question posted on Twitter (and the subsequent thread) caught my attention. I had to pipe in with my own opinion on having queries without repositories. To summarize, the question is about using Aggregate Roots with an ORM like Entity Framework. Should you eager load all navigation properties or alternatively I guess, use lazy loading? My answer is if you’re only using an aggregate root for commands (to change state) and you generally have a higher read to write ratio, then eager load the navigation properties. As a general rule of thumb.

收录时间: 2020-03-06
分类: 架构设计
贡献者: Rector
146 热度

TDD & Agile

I never bought into the ‘agile will save us all’ philosophy that permeates the True Believers. It’s not because I don’t believe them — I do. Operating according to the agile manifesto is a step up. It’s a big step up. Scrum provides a framework for operating with agility, and I’ve been a part of organizations that were successful and had adopted Scrum.

收录时间: 2020-02-28
分类: 架构设计
贡献者: Rector
177 热度

A Brief Intro to Clean Architecture, Clean DDD, and CQRS

In this blog entry I give a primer on Clean Architecture, which is a modern, scalable formal software architecture which is appropriate for modern web applications. Next, I discuss how Domain-Driven Design fits into this picture, and how DDD concepts dovetail nicely into Clean Architecture, producing a methodology called Clean DDD. Finally, I introduce Command Query Responsibility Segregation (CQRS), and describe how it complements and enhances Clean DDD solutions to create software systems that are elegant, robust, scalable, and testable.

收录时间: 2020-02-22
分类: 架构设计
贡献者: Rector
194 热度

CQRS + Event Sourcing – Step by Step

A common issue I see is understanding the flow of commands, events and queries within a typical CQRS ES based system. The following post is designed to clear up what happens at each step. Hopefully this will help you to reason about your code and what each part does.

收录时间: 2020-02-22
分类: 架构设计
贡献者: Rector
158 热度

The Power of EventSourcing

We just had a nice experience while maintaining one of the applications we created for our customer and we wanted to share this with you! We are building a small ‘on-the-side’ project for a customer that supports the planing of a huge event with more than 1.500 guests. It's not in their major line of work and they use the application for about 1.5 months to organise the seating plan for their annual Company party. Together we decided that it’s OK to take some shortcuts during the implementation to reduce the overall effort.

收录时间: 2020-02-22
分类: 架构设计
贡献者: Rector
121 热度

Loosely Coupled Show: Software Architecture and Design

I’m excited to announce the Loosely Coupled Show, a new project I’m working on with James Hickey. Check out the YouTube Channeland subscribe!The premise is simple. To have discussions about software architecture and design. The target audience is intermediate to senior software developers.Episode...

收录时间: 2020-02-22
分类: 架构设计
贡献者: Rector
AD 友情赞助
199 热度

Encapsulation Boundaries Large and Small

Writing any significantly complex software application involves the use of encapsulation boundaries and abstractions. Think about the smallest bit of executable code in your program: an expression or perhaps a statement. This typically maps roughly to a line of code. You can build entire applications using only this structure. If you do, they look something like this...

收录时间: 2020-01-30
分类: 架构设计
贡献者: Rector
208 热度

如何运用领域驱动设计 - 工作单元

在上一篇 《如何运用领域驱动设计 - 存储库》 的文章中,我们讲述了有关仓储的概念和使用规范。仓储为聚合提供了持久化到本地的功能,但是在持久化的过程中,有时一个聚合根中的各个领域对象会分散到不同的数据库表里面;又或者是一个用例操作需要操作多个仓储;而这些操作都应该要么同时成功,要么同时失败,因此就需要为这一系列操作提供事务的支持,而事务管理就是由工作单元来提供的。在上一篇中,可能已经提到了工作单元,但是仅仅是一笔带过,现在我们就来详细的探究该如何更好的来实现工作单元。(文章的代码片段都使用的是C#,案例项目也是基于 DotN...

收录时间: 2020-01-02
分类: 架构设计
贡献者: Rector
203 热度

驱动领域DDD的微服务设计和开发实战

你是否还在为微服务应该拆多小而争论不休?到底如何才能设计出收放自如的微服务?怎样才能保证业务领域模型与代码模型的一致性?或许本文能帮你找到答案。 本文是基于 DDD 的微服务设计和开发实战篇,通过借鉴领域驱动设计思想,指导微服务项目团队进行设计和开发(理论篇详见《当中台遇上 DDD,我们该如何设计微服务?》)。本文包括三部分内容:第一部分讲述领域驱动设计基本知识,包括:分层架构、服务视图、数据视图和领域事件发布和订阅等;第二部分讲述微服务设计方法、过程、模板、代码目录、设计原则等内容;最后部分以一个项目为例讲述基于 DDD 的微服务设计过程。

收录时间: 2019-12-30
分类: 架构设计
贡献者: Rector
167 热度

高并发、高性能 Web 架构

文章介绍了典型的,三层架构的高性能 Web 应用架构,并对反向代理服务,应用层节点工作模型,Memcached 服务等做了详细的解释,希望能对您有所帮助。

收录时间: 2019-12-09
分类: 架构设计
贡献者: Rector
257 热度

大话设计,没有模式—通用权限设计与实现

当代码写多了,总有些是经验,但经验是什么呢?if…else用的次数比别人多?显然不是。有些超棒的设计可以谓之经验!功能权限网络上流行的经典的权限设计是【主体】- 【领域】 - 【权限】( who、what、how问题原型 ) 的设计思想,其中:【主体】可以是用户,可以是角色,也可以是一个部门【领域】可以是一个模块,可以是一个页面,也可以是页面上的按钮【权限】可以是“可见”,可以是“只读”,也可以是“可用”(如按钮可以点击)为了简化程序开发,在OpenAuth.Core中去掉了权限的控制,简化为【主体】- 【领域】的模式,且【主体】限定为角色。即只能给角色分配模块和按钮,不能直接分配给用户账号或...

收录时间: 2019-11-27
分类: 架构设计
贡献者: Rector
AD 友情赞助