How to Build a Multi‑Platform E‑Commerce App with Taro and Cloud Development
The article explains how startups can quickly create low‑cost, lightweight multi‑platform e‑commerce applications by combining Tencent Cloud's cloud development services with the Taro framework, covering challenges, concepts of low‑cost and light‑mode, setup steps, and a real‑world example.
This article is based on Zhong Xin's talk at the 2019 Tencent Cloud TECHO Developer Conference titled “Multi‑Endpoint E‑Commerce Application Based on Cloud Development Model”.
Self Introduction
Hello, I am Zhong Xin from JD Aotu Lab, a core developer of the Taro framework and former lead on JD shopping mini‑program homepage and search.
Today I will discuss building a multi‑platform e‑commerce application under a cloud development model.
Zero‑Start, Multi‑Platform
In startup companies there is no mature internal system to plug into, so developers must build everything step by step, and backend deployment and operations become painful.
Front‑end and back‑end separation often creates friction: overlapping responsibilities, communication overhead, and time‑consuming interface integration.
With many target platforms—H5, WeChat Mini‑Program, Baidu Mini‑Program, Alipay, QQ Mini‑Program, Quick Apps, and even native apps—the development cost rises and maintaining divergent codebases becomes difficult.
What Is Low‑Cost?
Deployments, operations, monitoring, and alerts can be handed over to cloud development services.
Cloud development provides native cloud support and WeChat service integration, eliminating the need to set up servers. Developers use provided APIs to implement core business logic, achieving rapid launch and iteration while remaining compatible with existing cloud services.
Compared with traditional server deployment, cloud development reduces manpower and material costs and offers a free quota.
What Is Light‑Mode?
Cross‑platform development aims to write a single codebase that runs on H5, mini‑programs, and native apps.
Popular multi‑platform frameworks include Taro, Omi, uni‑app, mpvue, and wepy. For teams using a React stack, Taro is the most suitable choice.
Syntax style
Multi‑platform runtime
Componentization
TypeScript support
Developer experience
Modern development workflow
Using Taro and Cloud Development Together
Take JD’s “Jingxi” social e‑commerce platform as an example. The project uses Taro to generate WeChat Mini‑Program, H5, and React‑Native (RN) versions. Mock data in the demo is provided by local cloud development; production data resides elsewhere.
To start with cloud development, open the WeChat Developer Tools, enable cloud development, and you will see a console showing free resource quotas, data storage, and cloud functions.
Cloud development also offers a multi‑platform environment; by importing the appropriate SDK you gain cross‑platform capabilities.
Initialize a Taro Project
Install the CLI globally and create a new project:
npm i @tarojs/cli -g
taro init myAppAfter initialization, edit the global app.js entry file to initialize cloud development:
Taro.cloud.init({ env: 'YOUR_ENV_ID' })From then on, you can write React‑style code as usual and call cloud functions directly where needed.
One More Thing – The Next Generation of Taro
Taro has maintained a rapid iteration pace for over a year. The upcoming version will support not only React syntax but also Vue, Angular, and other frameworks, aiming to provide a more disruptive redesign for teams seeking to push technical boundaries.
Stay tuned for the next‑generation Taro. Thank you.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Aotu Lab
Aotu Lab, founded in October 2015, is a front-end engineering team serving multi-platform products. The articles in this public account are intended to share and discuss technology, reflecting only the personal views of Aotu Lab members and not the official stance of JD.com Technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
