增强模拟服务器:用户界面方法

Agile approach including the Mock Server

As far as feature life cycles go, we as a team follow certain agile practices in pursuing its delivery. We first discover and surface potential features or enhancements through data-driven approaches, which then culminate as a proposal in the form of an intake document. Following its signoff, we then narrow the scope and define deliverables, focusing on an iterative approach to incrementally accomplish the feature in more manageable milestones. Lastly, once we have fleshed out the technical documentation, initial design mockups, API schemas, and ticket creation we begin with the actual implementation.

就功能生命周期而言,我们团队遵循一些敏捷实践来推动其交付。我们首先通过数据驱动的方法发现和提出潜在的功能或增强功能,然后将其作为一个接收文档的提案呈现出来。在获得批准后,我们缩小范围并定义可交付成果,专注于迭代方法,逐步完成更易管理的里程碑功能。最后,一旦我们完善了技术文档、初始设计模型、API模式和工单创建,我们就开始实际实现。

At this point, however, a common scenario takes place in which the API endpoints have not yet been developed, making frontend developers have to postpone fetching from live endpoints and continue developing the UI by mocking the API response statically. Popular tools have arisen to tackle this issue, such as mirage.js, MSW, etc., which facilitate the mocking of servers, typically by intercepting the desired endpoints and returning predefined responses. This enables front-end developers to work independently from the backend while reducing the time needed to finish the milestone.

然而,此时常见的情况是API端点尚未开发完成,使得前端开发人员不得不推迟从实时端点获取数据,并通过静态模拟API响应继续开发UI。已经出现了一些流行的工具来解决这个问题,例如mirage.jsMSW等,它们通过拦截所需的端点并返回预定义的响应来实现服务器的模拟。这使得前端开发人员可以独立于后端工作,同时减少完成里程碑所需的时间。

Agile approach including the Mock Server

Fig 1. Agile approach including the Mock Server

图1. 包括模拟服务器的敏捷方法

While this solved the issue of frontend independence, the other arose during the review phases with our product manager. A typical review cycle could take the form of developers first publishing the current state of the feature on the staging environment in order for it to be easily accessible by authorized users but still publicly hidden. Those internal users would then be able to inspect the feature though only in the state the mocked values allo...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-24 19:19
浙ICP备14020137号-1 $访客地图$