Orchard Core 中文文档

Orchard Core 是基于 Orchard CMS 使用 ASP.NET Core 重新构建的。 Orchard Core 由两个不同的目标组成: Orchard Core Framework: 一个应用程序框架,用于构建模块化、多租户 的ASP.NET Core应用程序。 Orchard Core CMS: 一个建立在Orchard Core Framework之上的网络内容管理系统(CMS)。 需要注意框架和 CMS 之间的差异非常重要。一些想要开发 SaaS 应用程序的开发人员只会对模块化框架感兴趣。其他想要构建可管理网站的用户将专注于 CMS 并构建模块来增强其网站或整个生态系统。 Building Software as a Service (SaaS) solutions with the Orchard Core Framework 了解Orchard Core Framework是独立于nuget.org上的CMS分发的,这一点非常重要。我们在 https://github.com/OrchardCMS/OrchardCore.Samples 提供了一些示例程序,它将指导您如何仅使用Orchard Core Framework来构建模块化 和 多租户 的应用程序,而无需任何 CMS 特定功能。 我们的目标之一是启用托管应用程序的基于社区的生态系统,这些生态系统可以通过模块(如电子商务系统、博客引擎等)进行扩展。Orchard Core Framework支持模块化环境,允许不同的团队处理应用程序的不同部分,并使组件跨项目可重用。 B站演示视频:https://www.bilibili.com/video/BV17T4y177fW/ 使用Orchard Core CMS 构建网站 Orchard Core CMS 是基于Orchard CMS 使用ASP.NET Core 重写的。它不仅仅是一个端口,因为我们希望大幅提高性能,并尽可能与的ASP.NET Core 的开发模型一致。 ...

May 10, 2024

苍鹭与少年,宫崎骏的坚持

看完了《你想活出怎样的人生》,从内容上来看,这部电影的核心仍然是人文主义关怀、关于战后创伤与现代新国家的重建,当然也带有上世纪知识分子对过去挥之不去的烙印。吉卜力的动画片其实更多是拍给大人们看的,宫崎骏一直没有放弃自己坚持的理念:和平主义(反思战争和反对一切战争)、女性主义(主角大都是独立勇敢自由的女孩)和人与自然平等共存。 这次宫崎骏老爷爷因为身体原因不能去奥斯卡领奖,看来这部动画大概率真的会是他的封笔之作。老爷爷从始至终都坚持完全手绘制作动画的模式,这种方式成本极高,但是制作出来的动画相当逼真。这种创作动画的手法,民国时期的万氏兄弟曾经引领亚洲,其实日本的动画最开始是受中国影响,日本动画大师手冢治虫曾说他正是看了万氏兄弟的《铁扇公主》动画片后放弃学医,决定从事动画创作,手冢治虫算是宫崎骏的上一辈。只是后来中国突降人祸,形成了几十年的文化断层,日本一直沿着这条路坚持走到了今天,获得了巨大成功和全世界的尊重。 大约在二十年前,我们一起第一次看吉卜力的动画片《千与千寻》,这是他们工作室第一部获得奥斯卡最佳动画的作品,后来我们看完了吉卜力出品的大部分动画,并收藏了喜欢的蓝光,家里还有一本收集每部动画手绘底稿复印件的大部头书。前段时间我们两次东渡扶桑,特地去了一趟他们的美术馆,除了沉浸于吉卜力的梦幻世界,还看到了龙猫巴士爬行的电线杆原型、千寻神隐的神社痕迹和动画片背景里的各种现实场景。 日本是一个传统又时尚,保守又先进的多元化现代文明国家,只有你亲自去一趟才能深刻体会这种感觉,我在那里看到了本地朴质的文化与奢华的现代物质文化并肩存在,也看到了基督教、佛教和神道教各自蓬勃发展,更看到了古代中国的文化与现代文明交织成一个五彩斑斓的世界,太多的不想说,我真的认为:现在的日本(也许还有印度)是真正的神奇的东方文明古国。

April 18, 2024

《架构整洁之道》:Chap11. DIP: THE DEPENDENCY INVERSION PRINCIPLE DIP:依赖反转原则

The Dependency Inversion Principle (DIP) tells us that the most flexible systems are those in which source code dependencies refer only to abstractions, not to concretions. 依赖反转原则(DIP)主要想告诉我们的是,如果想要设计一个灵活的系统,在源代码层次的依赖关系中就应该多引用抽象类型,而用具体实现。 In a statically typed language, like Java, this means that the use, import, and include statements should refer only to source modules containing interfaces, abstract classes, or some other kind of abstract declaration. Nothing concrete should be depended on. 也就是说,在 Java 这类静态类型的编程语言中,在使用 use、import、include 这些语句时应该只引用那些包含接口、抽象类或者其他抽象类型声明的源文件,不应该引用任何具体实现。 ...

March 14, 2024

《架构整洁之道》:Chap10. ISP: THE INTERFACE SEGREGATION PRINCIPLE ISP:接口隔离原则

The Interface Segregation Principle (ISP) derives its name from the diagram shown in Figure 10.1. “接口隔离原则(ISP)”这个名字来自图 10.1 所示的这种软件结构。 The Interface Segregation Principle In the situation illustrated in Figure 10.1, there are several users who use the operations of the OPS class. Let’s assume that User1 uses only op1, User2 uses only op2, and User3 uses only op3. 在图 10.1 所描绘的应用中,有多个用户需要操作 OPS 类。现在,我们假设这里的 User1 只需要使用 op1,User2 只需要使用 op2,User3 只需要使用 op3。 Now imagine that OPS is a class written in a language like Java. Clearly, in that case, the source code of User1 will inadvertently depend on op2 and op3, even though it doesn’t call them. This dependence means that a change to the source code of op2 in OPS will force User1 to be recompiled and redeployed, even though nothing that it cared about has actually changed. ...

March 13, 2024

《架构整洁之道》:Chap9. LSP: THE LISKOV SUBSTITUTION PRINCIPLE LSP:里氏替换原则

In 1988, Barbara Liskov wrote the following as a way of defining subtypes. 1988 年,Barbara Liskov 在描述如何定义子类型时写下了这样一段话: What is wanted here is something like the following substitution property: If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T.1 ...

March 12, 2024

《架构整洁之道》:Chap8. OCP: THE OPEN-CLOSED PRINCIPLE OCP:开闭原则

The Open-Closed Principle (OCP) was coined in 1988 by Bertrand Meyer.1 It says: 开闭原则(OCP)是 Bertrand Meyer 在 1988 年提出的,该设计原则认为: A software artifact should be open for extension but closed for modification. 设计良好的计算机软件应该易于扩展,同时抗拒修改。 In other words, the behavior of a software artifact ought to be extendible, without having to modify that artifact. 换句话说,一个设计良好的计算机系统应该在不需要修改的前提下就可以轻易被扩展。 This, of course, is the most fundamental reason that we study software architecture. Clearly, if simple extensions to the requirements force massive changes to the software, then the architects of that software system have engaged in a spectacular failure. ...

March 11, 2024

《架构整洁之道》:Chap7. SRP: THE SINGLE RESPONSIBILITY PRINCIPLE SRP:单一职责原则

Of all the SOLID principles, the Single Responsibility Principle (SRP) might be the least well understood. That’s likely because it has a particularly inappropriate name. It is too easy for programmers to hear the name and then assume that it means that every module should do just one thing. SRP 是 SOLID 五大设计原则中最容易被误解的一个。也许是名字的原因,很多程序员根据 SRP 这个名字想当然地认为这个原则就是指:每个模块都应该只做一件事。 Make no mistake, there is a principle like that. A function should do one, and only one, thing. We use that principle when we are refactoring large functions into smaller functions; we use it at the lowest levels. But it is not one of the SOLID principles—it is not the SRP. ...

March 10, 2024

《架构整洁之道》:Part3. DESIGN PRINCIPLES 设计原则

Good software systems begin with clean code. On the one hand, if the bricks aren’t well made, the architecture of the building doesn’t matter much. On the other hand, you can make a substantial mess with well-made bricks. This is where the SOLID principles come in. 通常来说,要想构建一个好的软件系统,应该从写整洁的代码开始做起。毕竟,如果建筑所使用的砖头质量不佳,那么架构所能起到的作用也会很有限。反之亦然,如果建筑的架构设计不佳,那么其所用的砖头质量再好也没有用。这就是 SOLID 设计原则所要解决的问题。 The SOLID principles tell us how to arrange our functions and data structures into classes, and how those classes should be interconnected. The use of the word “class” does not imply that these principles are applicable only to object-oriented software. A class is simply a coupled grouping of functions and data. Every software system has such groupings, whether they are called classes or not. The SOLID principles apply to those groupings. ...

March 9, 2024

《架构整洁之道》:Chap6. FUNCTIONAL PROGRAMMING 函数式编程

In many ways, the concepts of functional programming predate programming itself. This paradigm is strongly based on the l-calculus invented by Alonzo Church in the 1930s. 函数式编程所依赖的原理,在很多方而其实是早于编程本身出现的。因为函数式编程这种范式强烈依赖于 Alonzo Church 在 20 世纪 30 年代发明的 λ 演算。 SQUARES OF INTEGERS 整数平方 To explain what functional programming is, it’s best to examine some examples. Let’s investigate a simple problem: printing the squares of the first 25 integers. 我们最好还是用一个例子来解释什么是函数式编程。请看下面的这个例子:这段代码想要输出前 25 个整数的平方值。 In a language like Java, we might write the following: ...

March 8, 2024

《架构整洁之道》:Chap5. OBJECT-ORIENTED PROGRAMMING 面向对象编程

As we will see, the basis of a good architecture is the understanding and application of the principles of object-oriented design (OO). But just what is OO? 稍后我们会讲到,设计一个优秀的软件架构要基于对面向对象设计(Object-Oriented Design)的深入理解及应用。但我们首先得弄明白一个问题:究竟什么是面向对象? One answer to this question is “The combination of data and function.” Although often cited, this is a very unsatisfying answer because it implies that o.f() is somehow different from f(o). This is absurd. Programmers were passing data structures into functions long before 1966, when Dahl and Nygaard moved the function call stack frame to the heap and invented OO. ...

March 7, 2024