分类: 方法论体系

用户研究:需求挖掘/用户画像/场景分析 产品设计:原型设计/交互逻辑/UI规范 敏捷开发:Scrum实践/Jira管理/看板优化 版本规划:Roadmap制定/MVP策略/优先级矩阵

  • 国内外免费 AI 平台盘点:零成本调用千亿参数大模型API

    自ChatGPT 3横空出世,掀起一股AI大模型热潮,国内外各类AI平台如雨后春笋般涌现。想要体验这些强大的AI能力?不必担心高昂的费用!许多平台都提供了免费API或免费额度,让你可以零成本体验人工智能的魅力。

    国内平台

    1. 月之暗面 Kimi

    网址 www.moonshot.cn/
    api控制台 platform.moonshot.cn/console
    模态: 文字模态、聊天、翻译等
    免费额度

    一分钟内最多发起的请求数:3 一分钟内最多交互的token数:32000 一天内最多交互的token数:不限

    API 接口地址: api.moonshot.cn/v1

    是否兼容OpenAI:是

    可用模型列表

    moonshot-v1-8k: 它是一个长度为 8k 的模型,适用于生成短文本。

    moonshot-v1-32k: 它是一个长度为 32k 的模型,适用于生成长文本。

    moonshot-v1-128k: 它是一个长度为 128k 的模型,适用于生成超长文本。

    1. DeepSeek深度探索

    网址 www.deepseek.com/
    api控制台 platform.deepseek.com/
    模态: 文字模态、聊天、翻译等
    免费额度 无
    API接口地址 api.deepseek.com/v1
    是否兼容OpenAI 是
    可用模型 deepseek-chat
    **3. 清华智谱AI **

    网址 bigmodel.cn/
    api控制台 bigmodel.cn/console
    模态: 多模态、文字、视觉、语音等
    免费额度 每个模型均有免费额度,
    API接口地址 open.bigmodel.cn/api/paas/v4…
    是否兼容OpenAI 是
    模型系列 GLM-4 GLM-4V CogVideoX CogView-3-Plus GLM-4-AllTools

    1. 百川智能

    网址 www.baichuan-ai.com/
    api控制台 platform.baichuan-ai.com/console
    模态: 文字模态、聊天、翻译等
    免费额度 赠送¥80
    api接口地址 api.baichuan-ai.com/v1
    是否兼容OpenAI 是
    模型系列 Baichuan4 Baichuan3

    1. 讯飞星火

    网址 xinghuo.xfyun.cn/
    api控制台 xinghuo.xfyun.cn/sparkapi
    模态:多模态、文字、图片、语音
    免费额度 Spark Lite 模型完全免费,其他模型有赠送额度
    api接口地址 无统一
    是否兼容OpenAI 不兼容
    模型系列 较多

    国外平台

    1. DeepGram

    网址 deepgram.com/
    应用场景:语音识别、语音合成
    免费额度:注册赠送 $200
    是否兼容OpenAI:不兼容
    是否需vpn:不需要

    1. ElevenLabs

    网址 elevenlabs.io/
    应用场景:语音合成、语音克隆
    免费额度:每月10分钟音频合成
    是否兼容OpenAI:不兼容
    是否需VPN:不需要

    1. GroqCloud

    网址 groq.com/
    应用场景:文字聊天、翻译、语音识别
    免费额度:较多
    是否需VPN:必须
    是否兼容OpenAI:兼容
    API接口地址:api.groq.com/openai/v1

    1. X.ai

    网址 console.x.ai/
    应用场景:文字聊天、翻译
    免费额度:$20
    是否需VPN:必须
    是否兼容OpenAI:兼容
    API接口地址:api.x.ai/v1

  • 领域驱动设计DDD——从入门到代码实践

    DDD是什么?

    领域驱动设计(Domain Driven Design,DDD)在应用架构设计中占据着非常重要的位置,可以说DDD是应用架构设计的核心。

    DDD为我们提供了一种架构设计方法,既面向业务,又面向技术,从业务需求到领域建模,从领域服务到技术转化,强调开发人员与领域专家协同。DDD是埃里克·埃文斯(Eric Evans)在2003年出版的《领域驱动设计:软件核心复杂性应对之道》(Domain Driven Design: Tackling Complexity in the Heart of Software)一书中提出的具有划时代意义的重要概念,不过这种领域建模和设计的思想其实早在20世纪就有很多设计人员重视起来。DDD通过统一语言、领域模型、领域划分和服务划分等一系列手段来降低软件复杂度。

    DDD的核心思想是业务与技术相结合的一种过程,既强调业务的理解,又强调应用领域建模方法的使用。DDD本质上是面向对象分析的扩展和延伸,它基于面向对象分析技术进行了分层规划,同时对其中的核心概念和划分做了详细的指引。

    为什么要DDD?

    DDD对应用架构设计有非常大的指导作用,具体如下所示。

    统一语言

    团队成员会在有界的上下文中有意识地形成统一语言,便于沟通,减少分歧,以一种所有干系人都能理解的通用语言为相互交流的工具,在交流的过程中形成领域概念,然后将这些概念设计成领域模型。

    业务知识沉淀

    DDD不以人为中心,而以业务为中心,通过承接业务架构的业务流程和业务能力,并且通过领域知识进行转化,进而反哺业务架构和应用架构。

    边界清晰的应用服务划分

    用领域模型划分边界来界定哪些需求是合理的,一些需求应该在什么地方实现,不断拉齐团队成员对需求的认知,让设计更加清晰和规范,分而治之,控制规模。

    关注点分离

    领域模型与数据模型分离,业务复杂度与技术复杂度分离,保持结构清晰,以应对不可预测性挑战。

    团队协同

    业务人员和设计人员共同参与,这样有助于创建大家都能理解的通用模型,并用该模型来沟通业务需求、数据实体和过程模型。

    模型可扩展

    很好地对业务需求进行了到领域服务的转化,同时是微服务及项目落地开发的纽带,领域模型是可扩展且易维护的,也提高了相应的可重用性和可测试性。

    什么时候用DDD?

    当然DDD也不是万能的,在采用DDD之前,我们需要考虑是否真正需要,思考以下几个问题可以帮助我们做出判断。

    是否以数据为中心,所有操作都是数据库CRUD?

    业务逻辑是否只是少量的业务场景和用例?

    应用功能是否稳定?

    是否已经对业务领域足够了解?

    如果以上问题的答案基本都是“”,说明系统并没有复杂的业务逻辑,则可以用一般的面向数据的架构或者事务脚本等模式。但如果业务逻辑复杂、变化频繁、团队对该领域还缺乏一定的认知,需要进行领域模型和服务的梳理,那么DDD会帮助我们抽象和解决问题。

    如何使用DDD?

    通用语言(Ubiquitous Language)

    业务人员和技术人员在协作过程中,如何讲同一种语言?在DDD中用通用语言来解决。通用语言是理解业务需求和梳理领域知识的过程,也是团队中各个角色就系统目标、范围与具体功能达成一致的过程。通用语言可以定义公共术语,减少概念混淆,消除歧义和理解偏差,提升需求和知识消化的效率,达到概念和代码的统一,使得虚拟概念和具体实现一致。

    通用语言可能由团队所有相关角色参加,如业务代表、产品经理、业务架构师、技术架构师、开发人员。同时,领域专家也非常关键,领域专家需要对业务领域非常了解,或者能够跟领域专业人员学习到足够的领域知识。

    通用语言建立的过程并不容易,因为技术人员和领域专家在沟通过程中存在“天然屏障”:

    技术人员考虑的是类、方法、算法、继承、封装、代码等

    领域专家考虑的是订单流程、库存状态、商品类目等

    因此,在建立领域知识的时候,双方必须交换知识,彼此深度参与,才可能得出领域模型

    领域(Domain)

    领域是用于确定范围和边界的,DDD将业务上的问题限定归属在特定的边界内,而这些边界就可以叫作领域。为了降低业务理解和系统实现的复杂度,DDD会将领域进一步划分为更细粒度,也就是子域。子域根据自身的重要程度和功能属性又可以划分为三类子域。

    核心域

    决定应用和系统核心竞争力,它是决定业务是否成功的主要因素,比如电商系统中关注的会员、商品、订单、交易、库存、营销等。

    通用域

    没有太多个性化的诉求,同时被多个子域使用的通用功能子域是通用域,比如统一的认证和权限管理系统。

    支撑域

    既不包含核心竞争力的功能,又不包含通用功能的子域,但该功能子域又是必需的,也就是支撑域,比如某个特定领域的数据字典。

    领域中的核心是领域模型(Domain Model),领域模型具备自己的属性行为状态,并与现实世界的业务对象相映射,领域模型之间具备明确的职责划分,领域对象元素之间通过聚合和引用来关联相应的业务规则,同时反映通用语言中的领域知识

    领域模型通过提炼领域对象,定义领域对象之间的关系、属性和行为,属于DDD的核心产物

    限界上下文(Bounded Context)

    领域帮助我们对系统进行拆分,而限界上下文帮助回答各领域之间的边界及它们如何交互。

    DDD中有一个形象的比喻,“细胞之所以会存在,是因为细胞膜定义了什么在细胞内、什么在细胞外,并且确定了什么物质可以通过细胞膜”。

    这个“细胞膜”就是对限界上下文很形象的举例。

    再举个例子,我们在平时的人际沟通中,为了避免同样的词语产生歧义,我们会把这个词语带入语言上下文中去理解其语义。比如,当谈到“苹果”时,有的人可能想到平时吃的水果,而有的人可能想到苹果手机。

    限界上下文是一个显式的边界,领域模型便存在于这个边界之内,通用语言必须限制在这个限界上下文之中。在微服务设计中,一般一个限界上下文理论上就可以设计为一个微服务。限界上下文对应用的边界交互有重要作用,可以帮助我们保持模型的一致性,避免边界之外问题的混淆。这一点很重要,因为在大多数组织中,某些术语在不同的业务领域或团队中有不同的含义。

    在限界上下文中,通过上下文映射图(Context Map)确立上下文之间的关系,通过上下游来表达依赖,最后形成限界上下文如何在应用程序中相互配合的全局视图。上下文的交互方法有多种,在实际工作中,目前使用比较广的是防腐层和统一协议。

    已发布的语言(Published Language)

    两个上下文使用共同的语言,比如SOA服务总线定义了一堆XML模型,或者基于共享的文件或数据库,上下文可以基于此进行直接交互。

    开放主机服务(Open Host)

    又叫统一协议,为上下文之间的服务定义一套包含标准化数据结构在内的协议,比如基于HTTP风格的RESTful接口协议。

    共享内核(Shared Kernel)

    两个上下文使用一个共同的代码内核作为通用语言,比如两个工程使用同一个Bean基础模型库。

    客户/供应商(Customer/Supplier)

    一个上下文使用另一个上下文的服务,有显著的上下游依赖关系,比如基于RPC的服务交互方式。

    顺从者(Conformist)

    一个上下文使用另一个上下文的服务,但彼此之间的关系并不紧密,比如基于消息传递机制的交互模式。

    防腐层(Anti-Corruption Layer,ACL)

    使用一层适配层来协助上下文的交互,隔离业务逻辑,比如在商品子域和采购子域之间提供防腐层,将商品的变更进行收口,隔离子域内的后端业务实现。

    DDD的核心概念

    领域帮助我们对系统进行拆分,而限界上下文帮助回答各领域之间的边界及它们如何交互。

    DDD中有一个形象的比喻,“细胞之所以会存在,是因为细胞膜定义了什么在细胞内、什么在细胞外,并且确定了什么物质可以通过细胞膜”。

    这个“细胞膜”就是对限界上下文很形象的举例。

    再举个例子,我们在平时的人际沟通中,为了避免同样的词语产生歧义,我们会把这个词语带入语言上下文中去理解其语义。比如,当谈到“苹果”时,有的人可能想到平时吃的水果,而有的人可能想到苹果手机。

    限界上下文是一个显式的边界,领域模型便存在于这个边界之内,通用语言必须限制在这个限界上下文之中。在微服务设计中,一般一个限界上下文理论上就可以设计为一个微服务。限界上下文对应用的边界交互有重要作用,可以帮助我们保持模型的一致性,避免边界之外问题的混淆。这一点很重要,因为在大多数组织中,某些术语在不同的业务领域或团队中有不同的含义。

    在限界上下文中,通过上下文映射图(Context Map)确立上下文之间的关系,通过上下游来表达依赖,最后形成限界上下文如何在应用程序中相互配合的全局视图。上下文的交互方法有多种,在实际工作中,目前使用比较广的是防腐层和统一协议。

    已发布的语言(Published Language)

    两个上下文使用共同的语言,比如SOA服务总线定义了一堆XML模型,或者基于共享的文件或数据库,上下文可以基于此进行直接交互。

    开放主机服务(Open Host)

    又叫统一协议,为上下文之间的服务定义一套包含标准化数据结构在内的协议,比如基于HTTP风格的RESTful接口协议。

    共享内核(Shared Kernel)

    两个上下文使用一个共同的代码内核作为通用语言,比如两个工程使用同一个Bean基础模型库。

    客户/供应商(Customer/Supplier)

    一个上下文使用另一个上下文的服务,有显著的上下游依赖关系,比如基于RPC的服务交互方式。

    顺从者(Conformist)

    一个上下文使用另一个上下文的服务,但彼此之间的关系并不紧密,比如基于消息传递机制的交互模式。

    防腐层(Anti-Corruption Layer,ACL)

    使用一层适配层来协助上下文的交互,隔离业务逻辑,比如在商品子域和采购子域之间提供防腐层,将商品的变更进行收口,隔离子域内的后端业务实现。

    DDD的核心概念

    实体(Entity)

    实体是一个具有唯一身份标识的对象,并且可以在相当长的一段时间内持续变化

    我们可以对实体进行多次修改,一个实体对象可能和它先前的对象大不相同,但拥有相同的身份标识,即依然是同一个实体

    对实体而言,重要的不是其属性,而是其延续性和身份标识。一般实体的唯一标识有两种生成方式。

    应用可以自动为实体生成唯一标识,比如JDK自带的UUID、数据库的自增序列.

    有时也需要综合业务语义来考虑,比如通过业务属性、时间、IP等因素生成.

    另外,实体具有可变性,这里需要引出两个概念:

    贫血模型

    贫血模型与Bean或者DO对象类似,一般只有Getter和Setter方法,只作为保存状态或者传递状态,不包含业务逻辑,这种只有数据没有行为的对象不是真正的领域对象

    充血模型

    DDD中的实体属于充血模型,会封装包含这个实体相关的所有业务逻辑,它既是多个业务属性的载体,又是操作或行为的载体。

    以订单(Order)为例,Order有下单、发货和退单等行为,**而面向数据设计方式是将这些行为放到另一个服务OrderService中,而不是Order对象中**

    值对象(Value Object)

    值对象是只关心属性的对象,并且是一个没有标识符的对象

    值对象本质上是一个集合,这个集合中包含若干用于描述目的、具有整体概念和不可修改的属性。它可以避免属性零碎,使属性归类更加清晰,从概念理解上也更加完整。

    值对象在领域模型中是可以被共享的,它们应该是不可变的,当有其他地方需要用到值对象时,可以将它的副本作为参数传递。

    值对象与实体的区别在于:

    值对象一般依附于实体而存在,是实体属性的一部分

    值对象没有唯一标识,当任何属性发生变化时,都意味着新的值对象产生。

    值对象功能单一,一般是贫血模型。

    以Order为例,订单下的送货地址(Address)就是典型的值对象。Address并不随着Order的产生而产生,它相对不变,也不需要单独标识

    领域服务(Domain Service)

    领域中的一些概念不太适合建模为对象,它们本质上是一些操作、一些动作,代表领域中一个重要的行为。这些操作或动作往往涉及多个领域对象,并且需要协调这些领域对象共同完成这个操作或动作,这就是领域服务。

    领域服务有一个重要的功能就是可以避免领域逻辑泄露到应用层。如果没有领域服务,那么应用层会直接调用领域对象完成本该领域服务执行的操作。

    领域服务体现的行为一定是不属于任何实体和值对象的,但它属于领域模型的范畴,同时领域服务应该是无状态的,应确保领域服务和通用语言是一致的

    领域服务是无状态

    领域对象是有状态

    虽然服务本身也是对象,但它没有属性,只有行为,因此说它是无状态的。

    以订单发货(OrderDelivery)为例,需要Order和履约两种实体之间通过一定的业务逻辑,确保事务可以作为领域服务

    聚合(Aggregate)

    聚合的核心思想是将关联减至最少,这样有助于简化对象之间的遍历,使用一个抽象来封装模型中的引用

    聚合由两部分组成:

    一部分称为根实体,是聚合中的特定实体。根实体是聚合中所包含的一个特定实体,是唯一允许外部对象保持对它的引用的元素。

    另一部分描述一个边界,定义聚合内部有什么。边界内部的对象之间可以互相引用。

    除根实体外的其他对象都有本地标识,但这些标识只有在聚合内部才需要加以区分,因为外部对象除根实体外看不到其他对象

    聚合行为被视为一个整体,在每个行为完成时,必须满足聚合内部所应用的固定规则的要求,即保证数据变化的一致性

    根实体最终检查固定规则,如**删除操作必须一次删除聚合边界之内的所有对象**

    过程中有一些最佳实践,比如可以设计一些小的聚合,通过唯一标识引用其他聚合,并且在边界之外考虑最终的一致性。

    比如,订单域可能有很多实体,如Order、子订单、订单明细、地址、物流信息、支付信息等,而在我们将它们聚合为订单域后,这些实体都聚焦在一起,并由Order这个实体作为聚合根对外交互

    工厂(Factory)

    当创建一个对象或创建整个聚合时,如果创建工作很复杂,或者暴露了过多的内部结构,则可以使用工厂来进行封装。也就是说,将创建复杂对象的实例和聚合的职责转移到一个单独的对象,这个对象本身在领域模型中可能没有职责,但它也是领域设计中的一部分

    设计模式中的工厂类和工厂方法与领域模型中的工厂概念是相似的,其可以帮助我们封装复杂的对象创建过程。

    我们可以把工厂作为一种创建复杂对象和聚合的实现方式。工厂用来封装对象创建所必需的知识,它们对创建聚合很有帮助。当聚合的根建立时,所有聚合包含的对象将随之建立。

    资源库(Repository)

    在DDD中,资源库作为对象的提供方,能够实现对象的持久化,解耦领域内业务逻辑与底层持久化

    每个聚合类型可以对应一个资源库,过程中需要避免实体和值对象成为单纯的充血模型,我们需要资源库把ORM框架与领域模型隔离,以屏蔽数据访问的技术复杂度。资源库可以获取持久化对象,使应用程序和领域设计与持久化技术解耦,让我们始终聚焦于模型,并且将所有对象的存储和访问操作交给资源库来完成。在面向接口和依赖注入机制支持下,资源库也容易通过Mock等方式进行测试。

    工厂和资源库之间存在一定的关系,它们都能帮助我们管理领域对象的生命周期。然而,工厂关注的是对象的创建,而资源库关心的是已经存在的对象

    当一个新对象被添加到资源库时,它应该是先由工厂创建过的,再被传递到资源库,以便更好地保存它。

    另外,资源库和数据访问对象(Data Access ObjectDAO)的作用类似,但也有所不同,资源库以“领域”为中心,所描述的是“领域语言”,不涉及数据库实现的细节;而DAO是比资源库更低的一层,其包含如何从数据库中提取数据的代码

    领域事件(Domain Event)

    领域事件表示领域中所发生的重要事件,在事件发生后通常会导致进一步的业务操作,或者在系统其他地方引起反应

    领域事件非常重要,我们在系统设计过程中经常需要解耦,技术人员一般通过MQ方式进行;架构人员可能采用事件驱动架构(Event Driven ArchitectureEDA)的方式。Serverless架构中核心的就是基于事件编程,这一切的核心就是对领域事件的设计,不过当前大部分系统事件(Event)设计比较随性,从而导致Event滥用和无用情况发生,而领域事件是对我们很好的指引。

    比如,在订单的例子中,在订单下单后,会进行**库存冻结、支付状态更新、物流同步**等,这些都是对系统事件良好的解耦设计。

    Event命名

    Domain Name + 动词的过去式 + Event,如OrderCreatedEvent

    Event内容

    EnrichmentPayload中放Data),Query-Back(通过回调拿到更多的Data)。

    Event管理

    通过MQ等保存所有的Events,并提供良好的Event查询和回溯。

    Event处理

    事件构建和发布、事件数据持久化、事件总线、消息中间件、事件接收和处理等。

    DDD常用的分析方法

    DDD常用的分析方法主要有用例分析法四色建模法事件风暴法

    用例分析法

    用例分析是比较通用的领域建模方法,可以在**比较传统的需求调研过程中结合领域模型的设计思路**进行,核心是通过业务需求、场景流程等梳理用例,进而规划领域模型

    用例分析的前提是业务架构的需求输入,其中核心是业务能力与业务流程

    比如电商领域的订单寻源、库存锁定、商品价格计算、优惠券核销等业务能力,以及订单处理、分单和拆单、逆向退款等业务流程。

    每个用例应该面向一个或多个场景,场景主要说明应用是如何和最终用户互动的,也就是谁可以使用应用做什么,从而获得一个明确的业务目标

    编写用例时要避免使用技术术语,应该使用最终用户或者领域专家可以理解的语言,进而我们可以基于用例分析法,根据语义来整理用例,然后整理领域模型,大概步骤如下。

    收集用例

    从业务能力、业务流程、业务需求描述中进行提取,收集相应的名词、动词、形容词,以及对应的业务场景。

    提取实体

    :从名词中定位出主要实体,如商品、SKU、品类等。

    提取属性

    从形容词中添加实体属性,如颜色、价格等。

    添加关联

    从动词或形容词中添加实体和实体之间的关联,如商品“包含”SKU,卖家“开设”“多家”店铺等。

    完善模型

    识别出初步模型,验证并迭代模型,同时补充用例验证模型、业务流程验证模型。

    举个关于电商的例子:

    假设有这样的需求描述:“会员使用代金券兑换了很多促销的商品。”

    我们先从名词“会员”“代金券”“商品”中提取实体,并从形容词“促销的”提取商品的属性,进而将动词“使用”“兑换”识别成关联,同时结合行业知识得知,代金券属于优惠券的一种,最终得出领域模型。

    四色建模法

    四色建模法在实践中也比较常用,其包括以下几个核心概念。

    时间记录(Moment-Interval)

    具有可追溯性的记录运营或管理数据的时刻或时段对象(如用粉红色表示)。

    人货场(Party-Place-Thing Archetype,PPT)

    代表参与到流程中的参与方、地点、物(如用绿色表示)。

    角色(Role)

    在时间记录与PPT对象(通常是参与方)之间参与的角色(如用黄色表示)。

    描述(Description)

    对PPT对象的一种补充描述(如用蓝色表示)。

    简单地说,四色建模法关注的是,某个人(Party)的角色(PartyRole)在某个地点(Place)的角色(PlaceRole)用某个东西(Thing)的角色(ThingRole)做了某件事情(Moment-Interval

    事件风暴法

    事件风暴又称事件建模,与头脑风暴类似,可以快速分析复杂的业务领域,完成领域建模的目标

    事件风暴是事件驱动设计的典型代表,是一种快速、轻量且未得到充分认可的群体建模技术,它对于加速开发团队非常适用

    事件风暴法关注以下元素。

    事件

    发生了什么事情,产生了什么结果(如用橘黄色表示)。

    属性

    事件的输入、输出,是对时间的细化描述。

    命令

    某个动作的发起者,可能是人、外部事件、定时器等(如用蓝色表示)。

    领域

    领域的聚合、内聚、低耦合,聚合内部保证数据的一致性(如用黄色表示)。

    简单理解就是谁在何时基于什么(输入)做了什么(命令),产生了什么(输出),影响了什么(事件),最后聚合成了什么(领域)

    DDD分层架构

    DDD在具体落地实施的过程中,强调四层分层结构,将核心概念进行有效的整合。

    展示层(Facade Layer)

    负责与不同用户和应用之间的交互协议和数据格式的转换,因此它又叫用户接口层。

    应用层(Application Layer)

    应用层是很薄的一层,负责展示层与领域层之间的协调,它是与其他系统的应用层进行交互的必要渠道,负责对领域层组件进行简单封装,例如事务、调用应用程序的任务。应用层要尽量简单,其服务及方法一般以用例为对应关系,通常一个用例对应到一个应用层的服务方法,方法中不包含业务规则或者知识,不保留业务对象的状态,只保留应用任务的进度状态,更注重业务能力或者业务流程的相关展示。主要通过调用领域层和基础设施层来完成协调。

    领域层(Domain Layer)

    领域层是DDD的核心,包含一些核心概念,如领域实体、值对象、领域服务、聚合,以及它们之间的关系。它主要负责表达业务概念、业务状态信息及业务规则,具体表现形式是领域模型。DDD提倡充血模型,即尽量将业务逻辑归属到领域对象上。

    基础设施层(Infrastructure Layer)

    基础设施层向其他层提供通用的技术能力,为应用层传递消息(如API网关等),为领域层提供持久化机制(如数据库资源、中间件交互等),屏蔽技术底座能力(如底层服务的健康度检查、配置参数等)及其他通用的工具类服务。

  • 25 Inspiring Personal Website Examples in 2025

    Inspiring Personal website Examples 

    Explore our top picks for 2025’s most inspiring personal websites. These examples highlight innovative designs and impactful content, perfect for sparking new ideas for your own website.

    Let’s dive in and get inspired!

    1. Karl Myrvang

    Karl Myrvang Homepage

    Karl has organized this unique product engineer personal website amazingly with dynamic texts on the upper body and parallax animations in the following sections. This one-page website lets the site visitors be in a rhythm. This rhythm will let anyone enjoy scrolling his professional website from top to bottom.

    2. Peter Janssen

    Peter Janssen
    Peter Janssen Personal Website

    This trader’s personal website uses a clean one-page template. It describes the author so well that anyone can know Peter and his expertise at a glance at his website.

    As usual, it is not a navigation bar but a call to action on the very first section of the body. He revealed his expertise in a few words. You can see him in the About section with brief content as you scroll down.

    3. Billal Hossain

    Billal Hossain
    Billal Hossain Personal Website

    Billal’s one-page website is a great example of a clean personal site for web developers. There is no groundless design or layouts, which makes the message bold and clear without any clutter. His site features focused contact information above the fold with social media links.

    As you scroll down, you’ll find his skills and a CTA at the very bottom. This is just what a personal software engineer portfolio website should offer.

    4. Darian Rosebrook 

    Darian Rosebrook Homepage

    Darian is a product designer and developer. His personal portfolio site is a super unique multi-page website from the very beginning. On the HERO section, you’ll find an interactive background that moves dynamically with your cursor.

    Right after the HERO section, he added some of the clients’ logos he has worked with to build trust and credibility. Darial also added a short bio, as well as his experience with proper CTAs.

    5. Noa’s Fly

    Noa's Fly
    Noa’s Fly Personal Website

    It’s a personal photo gallery website belonging to Noa, who loves to travel and share her experiences through websites with the world. 

    This personal travel album website is from her collections, where she shares her Moraine Lake tour experiences with a bulk of pictures. 

    She added social media icons to enrich her network. This website is so simple yet eye-soothing that anyone can try it.

    6. Hashemi Rafsan

    Hashemi Rafsan Homepage

    This website is a perfect picture of a personal portfolio website for software engineers. Hashemi Rafsan created his website using a resume style and added some blogs to the blog page. 

    After amazingly organizing a landing page, he added a “Blog” button on the top of the page, which includes some blogs about his experiences, knowledge, and many more things from his perspective.

    7. Gary Vaynerchuk

    Gary Vaynerchuk
    Gary Vaynerchuk Personal Website

    Gary Vaynerchuk is a serial entrepreneur and a multitasker. He includes video content on his banner page and a sidebar with social media accounts on his website.

    The sidebar also features a search function and links to other important pages like blogs.

    8. Vex King

    Vex King
    Vex King Personal Website

    Vex King has created his personal author website following a centered page layout with a large amount of white space. The first screen of this one-page website includes Vex’s photo, his social media links, and the navigation links, which are just the right amount of content.

    One thing that makes Vex’s website easy to navigate is the use of jump links. Yes, the links in his navigation are not the usual links we generally see in multi-page websites that lead to the respective pages for those links.

    Since it’s a single-page website, Vex utilized jump links that will lead you to the specific segment on that page. This is super helpful and user-friendly for every one-page website.

    Read Also: How to Build an Author Website

    9. Arty Crafty Bee 

    Arty Crafty Bee Homepage

    This personal art and craft website is also a blogging site with a specific topic where the author Amina Faiz writes the crafts instructions for kids. However, she organized her homepage with total engagements with elements like videos, downloadables, printables, etc.

    She ended her front page with the blogs and a footer. Undoubtedly, this web design can be adaptable if you also have such plans for your blog website. 

    10. The Craftaholic Witch

    The Craftaholic Witch
    The Craftaholic Witch

    The author of the Craftaholic Witch website, Muhaimina Faiz, showcases her craft artisttalent and knowledge on her personal website. She kept the rhythm of the color scheme and animated pictures on her website. It is also great to keep the theme according to its name, as Muhaimina did here.

    As we scroll down to her website, we will see some DIY featured projects that she has linked to some blogs. And then, a brief description of her and her projects.

    If you’ve liked this design, then what’s stopping you from creating your artist website today?

    11. Muazzim

    Muazzim Portfolio
    Muazzim Portfolio

    This fabulous product and visual designer portfolio website has impressive features that anyone can apply to their websites. The hover effects and animated gifs are amazingly utilized to maximize engagement. 

    Muazzim showcased his talents and worked very well on this website. He also added some blogs to help his clients understand him before hiring.

    The best thing I’ve found on his website is the sticky “Book a Call” button at the bottom right of the website. This helps substantially increase the booking rate.

    He also added a store integrated with Gumroad where clients can easily purchase the digital products he offers.

    This website is also created with Dorik AI, the easiest website builder.

    Related Article: How to Create a Graphic Design Portfolio Website

    12. Shourav

    Shourav Portfolio
    Shourav Portfolio

    After a lengthy collection of the best personal websites, Sourav’s personal portfolio website came up with a very professional vibe. He is a UI/UX designer and showcased his talent through his website.

    Shourav added dynamic text to his website and some animated icons to grab his visitors’ attention. He also showcased his skills, projects, and experiences accordingly. 

    The “clients I worked with earlier” and the testimonials are the top drawer section of his website, which will build excellent impressions towards his clients.

    13. Alexane NGO HAGBE

    Alexane NGO Hagbe
    Alexane NGO Hagbe

    Alexane’s graphic design portfolio website is a great example of a service website. She provides her services through this beautiful tiny French website.

    Here, she included her present position, academic career, and online portfolio. Again, this is very simple with bold messages.

    14. Elias Soykat

    Elias Soykat Portfolio
    Elias Soykat Portfolio

    Elias is a software engineer, and he followed a unique approach to his personal portfolio website. This is one of the simplest personal websites I’ve ever encountered, but he still managed to make it quite interactive.

    When you enter Elias’s website, you will receive a dynamic text typing some codes (code snippet animation) that speak about his personal details.

    code snippet animation

    You can skip this animation or wait for a few seconds to be floated into the main page of Elias’s website. Once you’ve landed on the homepage, you’ll find a toggle button to switch between the website themes from dark to light and vice-versa.

    The website’s first page doesn’t need to be scrolled down because he included all his messages in a few words and added some pages in the blog button on the nav bar.

    15. Ashfak

    Ashfak Portfolio
    Ashfak Portfolio

    As Ashfak is a MERN STACK developer, he showcased his talent well in a few words in the very first section of the website. The website looks beautiful and clean, with the menus always hidden under the burger menu regardless of the screen size.

    The subtle hover effects and animations give the visitors a soothing experience. If you like a non-linear asymmetrical design, this can be a great inspiration.

    Also, he added some tech stacks in an excellent way that he used in his professional career. It’s a fantastic way to showcase your skills on your website to grab potential clients. 

    Furthermore, clients would like to know the candidates’ experiences, skills, and courses, so Ashfak nicely added the course page and contact information on the menu bar dropdown in the last section.

    16. Shekh Al Raihan

    Shekh Al Raihan Homepage

    Shekh Al Raihan is very bold about his personal brand in the HERO section of the website. However, the moment the client scrolls down, the designation of his brand will fade out, showing his complete picture.

    Shekh followed a unique approach to start the content section of his product designer portfolio site. Instead of using visuals, he added an entire “text” section to communicate his career journey.

    In the following section, he added some case studies from his latest projects, followed by a dedicated “Achievements” section.

    In the last section, he added some clients’ names as social proof to build trust.

    17. Ashraful Islam Hridoy

    Ashraf Portfolio
    Ashraful Islam Portfolio

    This software engineer’s resume and portfolio website is a decent example of a single-page website. Ashraful, the person behind this website, has added a nice customized website logo and affixed dynamic texts in the HERO section with his professional overview. 

    He also added the resume to the call-to-action buttons instead of contact information. 

    Rather than using several pages, Ashraful chose to embody the website with a few sections on a page. You can jump to different sections using the jump links on the navigation bar.

    He assimilated his skills, experiences, and projects with social links on his website. Also, the contact form from his website will help clients reach him easily.

    18. Bayzid Khan

    Bayzid Khan Portfolio
    Bayzid Khan Portfolio

    No, it’s not a PowerPoint slide tool; it’s a designer’s personal website. Here, Bayzid designed his HERO section of the website like a tool. It’s a unique way to attract potential clients’ attention with personal branding details.

    As a seasoned designer, Bayzid added the logos of some popular companies he has worked with to build credibility.

    The website looks sleek and professional, with minimal color variation. The subtle use of parallax and transition effects, animations, and a sticky header with a distinct “Get in Touch” button made the website a lead generation machine.

    He also added a couple of testimonials to increase the trust further.

    19. Narveer Singh

    Narveer Singh Portfolio
    Narveer Singh Portfolio

    Narveer Singh is a digital marketing consultant, and his website is a great example of a personal website for digital service providers.

    Narveer used a multi-page website, including a dedicated blog section. The HERO section of his website features a short bio with his picture, a contact form, and clients’ logos.

    The most exciting part of Narveer’s website is the animated hover effects, especially on the CTA buttons, that can attract all the people who visit his site. He also added an FAQs segment just before the footer.

    20. Brandon Johnson

    Brandon Johnson Homepage

    Brandon Jonson is an Associate Professor in the Department of Earth, Atmospheric, and Planetary Sciences at Purdue University

    He themed his website accurately as his profession. However, the website is not conventionally designed. He added some beautiful parallax effects that made the website look alive.

    But here’s what I liked the most about this website—the “Vertical Dot Navigation” system with jump links. It offers a visually appealing and uncluttered navigation method. It’s also a compact way to provide navigation, especially on smaller screens.

    The color combination and the theme are precisely on point.

    21. Jasmine Star

    Jasmine Star Homepage

    Jasmine truly brings her personal website to life right from the start. At the top of the page, she showcases a unique banner with an energetic clip of herself.

    Just above this, you’ll find social media icons smartly placed in the left corner, and an option to subscribe via email is on the right. These make it super easy to stay connected.

    Below the main banner, the navigation menu tucks neatly beneath the hero section. It guides you through more of her content. As you scroll, the menu cleverly hides to the side and pops out only when you need it.

    Throughout the site, Jasmine mixes different fonts, engaging visuals, and smooth parallax effects. She complements these with strategically placed calls to action.

    She also integrates videos from her YouTube channel. This enhances her presence as a thought leader and adds dynamic content to her page.

    22. Bruno Simon

    Bruno Simon Portfolio Homepage

    Did I mistakenly list gaming websites here? Obviously not. This is actually the personal portfolio website of freelance web developer Bruno Simon.

    On his site, you can literally drive a car to navigate through his web pages. Bruno Simon’s Playground is one of the most interactive personal websites you’ll encounter.

    Bruno Simon Website Navigation

    It might seem confusing at first, but it’s really fun to explore. You can use the mouse or drive the car to discover different areas of the website.

    Bruno also added a playground where anyone can enter and play, keeping engagement high on his website.

    23. Sheikh Ariful Islam 

    Sheikh Ariful Islam Portfolio
    Sheikh Ariful Islam Portfolio

    The resume button on this MERN stack developer’s personal website from the navigation bar is an excellent pathway to effortlessly interact with the client.

    On the other hand, on this website, all the skills and portfolios are combined on the first page with professional transition and hover effects. The blog page linked on the navbar speaks more about Sheikh Ariful’s perspectives. 

    24. Robin Sharma

    Robin Sharma Homepage

    Robin is a leadership expert and author whose writings, more or less, all of us have read. 

    How about visiting his personal branding website to generate some ideas for building a personal website, especially when you are a professional writer and want to sell your writings? 

    This renowned author’s website gives the readers a positive vibe right from the beginning, with clips from multiple events in the HERO section.

    He added some logos of the companies he’s worked with and the social media handles on the second screen.

    One thing that captured my attention was the placement of social proof elements. Robin strategically added well-known brand logos and testimonials throughout the homepage wherever he could. This helps boost his credibility and builds trust among the visitors.

    25. Haruki Murakami

    Haruki Murakami Homepage

    The Haruki Murakami website is minimalist and user-friendly. It includes sections like “Books,” “Author,” and “More.” 

    It features sections devoted to the author’s biography, his literary works, and additional resources — offering a comprehensive portal for fans and newcomers alike to dive into Murakami’s universe. 

    These are all for now. We hope that you enjoyed visiting sites and gathering ideas about them. Now. let’s move on to some significant points of building a personal website. 

  • How to Write Prompts for AI Website Builders#reprint

    Creating a website can be daunting, but AI website builders are making it easier than ever. 

    With just a few lines of well-written prompts, you can have a professional-looking site up and running in no time. AI will do everything, so you won’t face any coding or design headaches.

    This guide will show you how to write prompts for AI website builders to generate stunning websites.

    I will include prompt examples, create some websites with the prompts, and discuss some best practices that you can follow. It will be a fun ride. 

    Let’s begin.

    What are AI Prompts?

    AI prompts are specific instructions you give to an AI system to generate content or complete a task. Think of them as commands or guidelines that tell the AI what you want. 

    For example, if you want to create a business website with an AI website builder, your prompt should include details like the type of business, the desired layout, and any specific features you need. The clearer your prompt, the better the AI can understand and execute your vision.

    Creating a website with AI is as easy as it gets. You can create different types of websites with AI website builders within minutes.

    Take Dorik AI website builder, for example. It can create small business websites, personal websites, blog websites, portfolio websites, online stores, landing pages, and more following your prompts.

    How to Write Prompts for AI Website Builders

    To write prompts that yield the best results, focus on four main components: purpose, style, content, and target audience.

    1. Define the Purpose

    Start by telling the AI what the purpose of the website is. Whether it’s an eCommerce store, a portfolio, a blog, or a nonprofit page, the clearer you are about your purpose, the more accurately the AI can fulfill your request.

    Example Prompt: “Create a website for a freelance graphic designer to showcase their portfolio and attract potential clients.”

    2. Describe the Visual Style

    The visual style tells the AI about the design direction—such as colors, themes, and general aesthetics. Think of it as giving the AI an idea of the ‘vibe’ you’re going for.

    Example Prompt: “I want a minimalist style with pastel colors, large images, and clean fonts to give a modern, creative look.”

    3. Outline the Content

    Make sure you specify the types of content that are important for your website. This can include headings, sections like “About Me” or “Testimonials,” and any key features like forms, galleries, or blog sections.

    Example Prompt: “Include a homepage with a hero section, portfolio gallery, about me section, testimonials, and a contact form.”

    4. Identify the Target Audience

    The target audience is crucial for determining how the AI tailors both the design and the content. A website for teenagers would look and feel very different from a website for business executives.

    Example Prompt: “The website should appeal to small business owners looking for branding services.”

    Example of a Full Prompt

    Here’s an example of a comprehensive prompt that includes all the elements we’ve discussed:

    “Create a clean, modern website for a pet grooming service. The site should include a homepage with a hero image featuring happy pets, an “About Us” section, a list of grooming services with pricing, customer testimonials, and a booking form. Use bright, friendly colors like blue and yellow. The target audience is pet owners aged 25-45.”

    With this prompt, the AI will know exactly what you’re looking for: a pet grooming website that’s professional, engaging, and user-friendly for pet owners.

    Try this prompt with Dorik AI

    Examples of Good vs. Bad Prompts

    Understanding the difference between good and bad prompts can further help you refine your own.

    Bad Prompt:

    “Create a website for me.”

    This prompt is too vague. The AI doesn’t know what type of website you want, who it is for, or what kind of features you need.

    Good Prompt:

    “Create a clean and professional website for a consulting business, featuring a homepage, services page, and a contact form. Use blue and white as the main colors, and make sure it appeals to corporate clients.”

    The good prompt is specific about the type of website, the audience, the pages, and the visual style—all of which help the AI produce something much closer to your expectations.

    How to Write Prompts to Create a Business Website

    Creating a business website with an AI website builder is straightforward if you know what details to include. Your prompt should be clear, concise, and specific. 

    Let’s break down how to write an effective prompt for a business website with some examples.

    Prompt Examples to Create Business Websites

    1. Small Business Website

    • Prompt example: “Create a business website for a small bakery. Include a home page with a menu, about us, and a contact section. Use a warm color scheme with images of baked goods.”

    Dorik AI Generated Output:

    2. Service Business Website

    • Prompt example: “Design a website for a local plumbing service. Include sections for services, pricing, customer testimonials, and a contact form. Use a professional and clean design with blue and white colors.”

    3. E-Commerce Business

    • Prompt example: “Build an e-commerce website for a boutique clothing store. Include a product catalog, shopping cart, checkout page, and customer reviews. Use a modern and stylish design with high-quality images.”

    When writing prompts for a business website, consider the following elements:

    • Business Type: Clearly state what your business does.
    • Pages: Specify the pages you want, like home, about, services, or contact.
    • Design Style: Mention the desired look and feel, such as professional, casual, or modern.
    • Color Scheme: Indicate preferred colors to align with your brand.
    • Special Features: Include any additional features like contact forms, galleries, or e-commerce capabilities.
  • 2025年ChatGPT15个顶级提示词

    涵盖效率提升、深度学习、创意激发及前沿技术应用,结合未来AI发展趋势与多场景需求:


    一、效率革命类

    1. 「多线程任务处理器」
      示例
      “将以下任务分解为优先级列表,并为每个任务分配AI助理、人类协同及截止时间:
    • 筹备产品发布会PPT(需数据可视化)
    • 回复20封客户邮件(需情感化语言)
    • 调整供应链方案(需Excel模板)”
      核心价值:整合资源分配,实现人机协作无缝衔接。
    1. 「会议纪要→行动蓝图」
      示例
      “分析昨日销售团队会议录音,提取3个关键痛点,生成带责任人与时间节点的解决方案树状图。”
      创新点:语音转结构化数据,自动生成可执行计划。

    二、深度学习加速器

    1. 「知识图谱构建师」
      示例
      “以‘碳中和政策’为核心,构建包含政策法规、企业案例、技术路径的三层知识图谱,标注中英文献来源及数据可信度评分。”
      优势:快速建立领域知识体系,支持动态更新。
    2. 「论文攻坚模式」
      示例
      “针对《Nature》最新论文《量子纠缠在神经网络中的应用》,生成:
    • 核心观点总结(附公式解释)
    • 争议点辩论框架
    • 实验复现步骤checklist”
      突破性:打破学术壁垒,缩短研究周期。

    三、创意工业化

    1. 「IP孵化工厂」
      示例
      “根据‘会说话的AI考古学家’设定,输出:
    • 世界观设定(含历史背景与魔法体系)
    • 人物关系图谱
    • 第一章剧情梗概+3种不同风格的开篇写法”
      应用场景:游戏、影视、文学IP高效开发。
    1. 「营销脑暴矩阵」
      示例
      “为‘元宇宙健身房’设计营销策略,需覆盖:
    • Z世代社交裂变触点
    • 企业ESG合作方案
    • 虚拟赛事经济模型”
      特点:多维度碰撞创意,直接输出ROI测算。

    四、技术前沿接口

    1. 「代码手术刀」
      示例
      “优化以下PyTorch模型训练代码:
    • 将显存占用降低40%
    • 训练速度提升30%
    • 添加对抗样本防御模块”
      技术纵深:超越简单调试,实现架构级优化。
    1. 「法律合规扫描仪」
      示例
      “分析我司自动驾驶数据采集协议,识别:
    • GDPR第9条风险点
    • 跨境数据传输合规方案
    • 伦理委员会审查要点”
      必要性:规避新型技术法规风险。

    五、认知升级工具

    1. 「思维熵减训练营」
      示例
      “用费曼学习法讲解‘区块链共识机制’,要求:
    • 用初中生能懂的比喻
    • 设计3道陷阱题检验理解
    • 对比比特币与以太坊的差异可视化图表”
      教育革新:深度学习个性化教学方案。
    1. 「决策沙盘推演」示例: “模拟公司决定进入东南亚市场的情景,变量包括:
      • 地缘政治风险权重
      • 当地供应链替代方案
      • 文化适配度对品牌溢价的影响曲线”
        战略价值:预判复杂决策的多维 outcomes。

    六、未来场景预演

    1. 「元宇宙建筑师」
      示例
      “设计一座融合敦煌壁画元素的虚拟博物馆,需包含:
      • 动态光影交互算法
      • 基于NFT的文物数字分身
      • 无障碍感知系统(含脑机接口兼容方案)”
        前瞻性:构建虚实融合空间。
    2. 「气候危机剧本杀」
      示例
      “生成2045年气候难民危机的沉浸式剧本,角色包括:
      • 海平面上升中的岛国总统
      • 碳捕捉技术CEO
      • 气候难民权益律师”
        社会价值:推动气候议题公众参与。

    七、人性化关怀模块

    1. 「情绪颗粒度分析师」
      示例
      “分析用户评论中的情感倾向,区分:
      • 表面抱怨 vs 潜在忠诚度流失
      • 文化差异导致的误解点
      • 情绪触发关键词热力图”
        商业洞察:精细化管理用户体验。
    2. 「职业转型导航仪」
      示例
      “基于我目前的Java工程师背景与对AI的兴趣,规划5年转型路径:
      • 技术栈过渡路线图(含证书与项目)
      • 行业人脉搭建策略
      • 自我营销内容矩阵”
        个人发展:降低职业转型风险。

    八、伦理与哲学向

    1. 「AI价值观校准器」示例: “当自动驾驶面临‘电车难题’时,设计:
      • 多层道德决策树
      • 公众调研数据可视化
      • 法律免责条款的三种表述方案”
        深度思考:探索AI伦理的边界。

    使用建议

    1. 组合使用:如将「多线程任务处理器」与「决策沙盘推演」结合,制定高风险项目管理方案。
    2. 持续迭代:每季度更新提示词库,适应技术与社会变迁。
    3. 权限管控:敏感场景(如医疗诊断)需配合专业审核流程。

    这些提示词的设计目标是让ChatGPT从“工具”进化为“战略伙伴”,在效率、创新与伦理间找到平衡点,助力用户驾驭AI时代的复杂挑战。