当前位置:网站首页>Alchemy (3): how to do a good job in interfacing a business process
Alchemy (3): how to do a good job in interfacing a business process
2022-06-28 00:18:00 【Phantom grey Dragon】
Suppose a complete project , Contains 6 Different 【 End 】:PC client 、 Mobile 、 Official website 、 Payment page 、 Activity page 、 And the back end 、 And the development of the underlying core functional components .
Suppose there is 5 Individuals are responsible for 5 individual 【 Have a face 】 Of 【 End 】:PC client 、 Mobile 、 Official website 、 Payment page 、 Activity page ; hypothesis 1 The individual is responsible for developing the backend , How many people actually don't know , this 1 An individual is a representative ; hypothesis 2 The individual is responsible for developing the underlying core functional components , How many people actually don't know , this 2 An individual is a representative ; hypothesis 1 Follow up tests .
Suppose the product , Ready to MVP Functional analysis and design , Write the design documents of each end . Product at this time 【 You can't 】 Directly send the document to the person in charge of each end , Just waiting for people at each end to do development . What needs to be done at this time 【 Demand confirmation 】: With the person in charge of each end 【 formal 】 Open a discussion ,【 Item by item 】 Check the design , Confirm each other's requirements for this end for the first time 【 Consensus 】. If 【 No, 】 This is a necessary discussion , Design only exists in the mind of the product itself . Others may just look at the rough and start writing code , So as to stay at the beginning and 1 Version requirements do not match .
In development , Different ends will start to implement without relying on the functions of other ends , When it comes to interfaces that need to be connected with other terminals . You must stop your work ,【 first 】 do 【 Interface confirmation 】: Find the person in charge of other end to confirm the interface design of a business model , At this time, you should not only consider the relationship between the two ends , But should be able to consider from the overall framework , Interfaces between multiple ends , There should be a sequence diagram , This sequence diagram shows a complete business process :
- From which portals do you start business , Suppose that A End , Called entry startXXX.
- Consider the complete interface call from the entry 【 closed loop 】:
- Which interfaces depend on the other end , For example, back-end calls 1 Or N Interface .
- What events on other ends are monitored , For example, monitoring the backend 1 Or N Events .
- Whether the process jumps to other end , For example, display a QR code , Scan the code and jump to the web page , What did you do on the web page , For example, the back-end interface is called , The back-end interface triggers an event to A End .
After this discussion , Each end confirms that its own logic is 1 In a business process 【 Location 】 And function , At the same time, have a clear understanding of the overall situation of the process .
After understanding this business process , A consensus has been reached , But not enough . On the frame , These scattered process points , Should be encapsulated in a common component , Each end depends on the interfaces and events of this common component . Suppose the component is C, that :
- C A set of 【 Entrance to meet different needs 】 Interface , In order to meet the needs of different scenario entry calls at different ends .
- C A standard set of events should be provided , Different entrances should trigger follow-up 【 Consistent flow of events 】. Make the event flow concerned by each end for the same business consistent .
- C The details should be hidden inside , Do it internally 【 A complete state machine 】, And complete error handling 、 timeout handler 、 Retry mechanism and so on .
For this business process , Take this public component as the entry , Write 【 Based on the command line 】 Of 【 Scenario test 】 Code . Available after basic testing , Before submitting the interface implementation , And notify other end interfaces and components that are available .
In terms of coverage , It should be for each individual interface , Write unit tests for interfaces . Tests and assertions that contain both normal and abnormal data . Can be written by developers , perhaps 【 Division of labor 】 Write for tests that have the ability to write unit test code .
Come here , in the light of 1 Business processes , Form a design that involves multiple ends 、 docking 、 encapsulation 、 The test of 【 closed loop 】, Instead of becoming a person who knows only a little at each end 【 Toy interface docking 】. In multiple iterations , Will continue to adjust this chain , Gradually complete the complete understanding of the chain . The program development environment has been fragmented , Client diversification , The distribution of the back end , The development environment is 【 cracking 】, do 1 Interface design and docking of business processes , There needs to be an overall closed loop , In order to avoid program development “ I don't know the truth , Only the body in this mountain ” problem .
--end--
边栏推荐
- Super outline exercises
- Build an open source and beautiful database monitoring system -lepus
- 股市小白在网上股票开户安全吗?
- Although the TCGA database has 33 cancers
- How to use the apipost script - global variables
- [untitled]
- Sentinel
- ValidateRequest=”false” 是做什么的「建议收藏」
- Systematic learning + active exploration is the most comfortable way to get started!
- 快速掌握grep命令及正则表达式
猜你喜欢

炼金术(7): 何以解忧,唯有重构

Msp430f5529 MCU reads gy-906 infrared temperature sensor

技术的极限(11): 有趣的编程
![软件工程作业设计(1): [个人项目] 实现一个日志查看页面](/img/95/0c3f0dde16d220ddecb5758a4c31e7.png)
软件工程作业设计(1): [个人项目] 实现一个日志查看页面
![[microservices sentinel] sentinel data persistence](/img/9f/2767945db99761bb35e2bb5434b44d.png)
[microservices sentinel] sentinel data persistence
![[idea] idea formatting code skills](/img/06/38079517e901bc48dc4ca0f8cc63fe.jpg)
[idea] idea formatting code skills

Character interception triplets of data warehouse: substrb, substr, substring

Zero foundation self-study SQL course | if function

吴恩达《机器学习》课程总结(11)_支持向量机

Logging log usage
随机推荐
Code neatness -- function
Golang uses Mongo driver operation - query (Advanced)
免费、好用、强大的开源笔记软件综合评测
MYSQL的下载与配置安装
一个人可以到几家证券公司开户?开户安全吗
[untitled]
Promise是什么
Pat class B 1013
积分体系和营销活动结合在一起有哪些玩法
CharSequence初探
TIME_ Solutions to excessive wait
Scu| gait switching and target navigation of micro swimming robot through deep reinforcement learning
表单form 和 表单元素(input、select、textarea等)
[PCL self study: pclvisualizer] point cloud visualization tool pclvisualizer
Mise en œuvre du pool de Threads: les sémaphores peuvent également être considérés comme de petites files d'attente
炼金术(7): 何以解忧,唯有重构
快速掌握grep命令及正则表达式
Golang uses Mongo driver operation -- Query (array related)
Flutter series: Transformers in flutter
吴恩达《机器学习》课程总结(14)_降维