From 5cb3d26bb9f078608262f8f443d32dd4518dcf14 Mon Sep 17 00:00:00 2001 From: qhily999 Date: Sat, 31 Jul 2021 18:02:50 +0800 Subject: [PATCH] add readme Signed-off-by: qhily999 --- common/DistributeCalc/README.md | 22 ++++++++++++++++++++++ common/DistributeCalc/README_zh.md | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 common/DistributeCalc/README.md create mode 100644 common/DistributeCalc/README_zh.md diff --git a/common/DistributeCalc/README.md b/common/DistributeCalc/README.md new file mode 100644 index 0000000000..9ce715cef3 --- /dev/null +++ b/common/DistributeCalc/README.md @@ -0,0 +1,22 @@ +# Distributed Calculator + +### Introduction + +This sample implements a simple calculator app using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator Feature Ability \(FA\) to perform collaborative calculation. + +- Remote startup: **StartAbility** is used to start a remote app. +- Collaborative calculation: The **DistributedDataKit** distributed data framework is used to implement data synchronization between remote applications. + +### Usage + +- Touch the icon on the desktop to start the calculator. +- Touch the button in the upper right corner of the app, or swipe up, down, left, or right on the screen to display the device selection box. +- In the device selection box, touch the name of a peer device to start the remote app. +- After the remote app is started, perform operations on the app at either end. Data can be synchronized between the two apps in real time. +- In the device selection box, touch the local device to close the remote app. + +### Constraints + +- This calculator implements only simple addition, subtraction, multiplication, and division operations. You can implement more complex arithmetic operations on the **calc** page based on the current framework. +- Distributed computing can be implemented only with distributed networking. + diff --git a/common/DistributeCalc/README_zh.md b/common/DistributeCalc/README_zh.md new file mode 100644 index 0000000000..7ade9a16e9 --- /dev/null +++ b/common/DistributeCalc/README_zh.md @@ -0,0 +1,22 @@ +# 分布式计算器 + +### 简介 + +本示例使用JS分布式能力实现了一个简单的计算器应用,可以进行简单的数值计算,支持远程拉起另一个计算器FA,两个FA进行协同计算。 + +- 远程拉起:通过StartAbility实现远端应用的拉起。 +- 协同计算:通过DistributedDataKit分布式数据框架实现异端应用的数据同步。 + +### 使用说明 + +- 点击桌面应用图标,启动应用; +- 点击应用右上角按钮,或者在界面任意位置滑动(上下左右滑动皆可)即可弹出设备选择框; +- 在设备选择框中点击对端设备名称,拉起对端应用; +- 对端应用启动后,可在任意一端中操作应用,两端应用可实现数据实时同步; +- 在设备选择框中选中本机即可关闭对端应用。 + +### 约束与限制 + +- 本示例只实现简单的加减乘除功能,后续开发者可基于当前框架考虑在calc页面中实现更多的功能,如开方、立方、三角函数等科学计算功能。 +- 分布式计算功能使用的前提是分布式组网。 + -- Gitee