A framework to help you quickly build local and cloud IDE

A framework to help you quickly build local and cloud IDE

2022-11-10 0 1,278
Resource Number 47828 Last Updated 2025-02-21
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue recommends OpenSumi, an underlying framework for quickly building Cloud and desktop IDE products.

A framework to help you quickly build local and cloud IDE插图

OpenSumi framework aims to solve the problem of repeated construction of IDE product research and development within Ali Economy, meet the customization capability of IDE in more vertical scenarios, and realize the sharing of the bottom layer between Web and local clients. Let IDE research and development from the early “slash-and-burn” era to the “machine mass production” era.

Function feature

  • Easy integration: Provides rapid integration solutions for container scenarios, Electron scenarios, and pure front-end scenarios, helping services quickly land
  • High scalability: Provides three-layer business solutions from VS Code plug-in, OpenSumi plug-in to OpenSumi module, perfectly supporting business customization requirements
  • UI customization: provides a layout system that can be customized at will, supporting various scenarios from simple view configuration to layout template development, and injecting custom views from plug-ins

Overall structure

In order to ensure that the framework can run in both Web and Electron environments, OpenSumi uses a project structure that separates the front and back ends and calls each other through an abstract communication layer.

On the Web, we use WebSockets as an implementation for communication.

On Electron, we are IPC communication.

Each communication connection corresponds to an independent DI (Dependence Inject) container on the front and back ends, so OpenSumi’s backend implementation is stateless, and different connections are strictly isolated.

There are three main core processes in OpenSumi:

  • Extension Process
  • Node Process
  • Browser Process

In order to ensure that plug-in problems will not affect the performance of the IDE, OpenSumi adopts a similar scheme to VS Code in terms of plug-in capabilities, which starts the plug-in through an independent plug-in process, and then communicates with the front-end process through the back-end process.

A framework to help you quickly build local and cloud IDE插图1

OpenSumi’s different capability implementations are split into different modules, which have weak Dependence on each other through Contribution Point mechanism and Dependence Inject mechanism. For some of the more core basic modules, such as theme services, layout services, etc., will also be directly dependent by other modules.

Therefore, it is necessary to ensure that some modules are introduced in order during the integrated development process.

The overall startup life cycle is shown as follows:

A framework to help you quickly build local and cloud IDE插图2

Fast Start (Web)

OpenSumi is based on Node.js 12.x +, so make sure you have the correct Node.js version installed locally. OpenSumi also relies on some Node.js addons. To ensure that these Addons can be compiled and run properly, it is recommended to refer to the installation guide in node-gyp to set up a local environment.

A framework to help you quickly build local and cloud IDE插图3

Local startup

Note: Due to the need to download a large number of packages during the compilation process, and some packages need to access GitHub to download source code, please keep GitHub access unblocked. Many 404 Not Found problems are caused by network access failures.

Run the following commands in sequence:

$ git clone git@github.com:opensumi/ide-startup.git

$ cd ide-startup

$ yarn # Install dependency 

$ yarn start # Start front-end and back-end in parallel 

Open your browser to http://127.0.0.1:8080 for preview or development.

Mirroring with Docker

# Pull image 

docker pull ghcr.io/opensumi/opensumi-web:latest

# Run 

docker run --rm -d -p 8080:8000/tcp  ghcr.io/opensumi/opensumi-web:latest

Open your browser to http://127.0.0.1:8080 for preview or development.

Fast Start (Electron)

OpenSumi includes a simple Electron framework that is designed to provide a desktop environment for quickly testing OpenSumi. You can use ide-electron as a template to build your own client.

You can also Release (
https://github.com/opensumi/ide-electron/releases) in the list for the relevant installation package for rapid experience.

A framework to help you quickly build local and cloud IDE插图4

Compatible environment

  • Electron 11.4.3+
  • macOS & Windows 7+
  • Node.js 12+

Local start

Note: Due to the need to download a large number of packages during the compilation process, and some packages need to access GitHub to download source code, please keep GitHub access unblocked. Many 404 Not Found problems are caused by network access failures. If mainland users can not install the dependency properly due to network problems, they can switch to the main-cn branch: git checkout main-cn, or refer to the appendix at the end of the article to configure the npm image.

Run the following commands in sequence:

$ git clone git@github.com:opensumi/ide-electron.git

$ cd ide-electron

$ yarn

$ yarn build

$ yarn rebuild-native -- --force-rebuild=true

$ yarn download-extension # Install built-in plug-in (optional) 

$ yarn start

Development

Run in project root:

$ yarn watch

Start:

$ yarn start

Packing

Run yarn pack to package the project. The packaged installation package will be output to the out directory.

npm mirroring configuration

Open ide-electron/.npmrc and add the following npm image configuration to solve the installation dependency failure problem:

registry=https://registry.npmmirror.com/
disturl=https://npmmirror.com/mirrors/node
chromedriver-cdnurl=https://npmmirror.com/mirrors/chromedriver
couchbase-binary-host-mirror=https://npmmirror.com/mirrors/couchbase/v{version}
debug-binary-host-mirror=https://npmmirror.com/mirrors/node-inspector
flow-bin-binary-host-mirror=https://npmmirror.com/mirrors/flow/v{version}
fse-binary-host-mirror=https://npmmirror.com/mirrors/fsevents
fuse-bindings-binary-host-mirror=https://npmmirror.com/mirrors/fuse-bindings/v{version}
git4win-mirror=https://npmmirror.com/mirrors/git-for-windows
gl-binary-host-mirror=https://npmmirror.com/mirrors/gl/v{version}
grpc-node-binary-host-mirror=https://npmmirror.com/mirrors
hackrf-binary-host-mirror=https://npmmirror.com/mirrors/hackrf/v{version}
leveldown-binary-host-mirror=https://npmmirror.com/mirrors/leveldown/v{version}
leveldown-hyper-binary-host-mirror=https://npmmirror.com/mirrors/leveldown-hyper/v{version}
mknod-binary-host-mirror=https://npmmirror.com/mirrors/mknod/v{version}
node-sqlite3-binary-host-mirror=https://npmmirror.com/mirrors
node-tk5-binary-host-mirror=https://npmmirror.com/mirrors/node-tk5/v{version}
nodegit-binary-host-mirror=https://npmmirror.com/mirrors/nodegit/v{version}/
operadriver-cdnurl=https://npmmirror.com/mirrors/operadriver
phantomjs-cdnurl=https://npmmirror.com/mirrors/phantomjs
profiler-binary-host-mirror=https://npmmirror.com/mirrors/node-inspector/
python-mirror=https://npmmirror.com/mirrors/python
rabin-binary-host-mirror=https://npmmirror.com/mirrors/rabin/v{version}
sass-binary-site=https://npmmirror.com/mirrors/node-sass
sodium-prebuilt-binary-host-mirror=https://npmmirror.com/mirrors/sodium-prebuilt/v{version}
sqlite3-binary-site=https://npmmirror.com/mirrors/sqlite3
utf-8-validate-binary-host-mirror=https://npmmirror.com/mirrors/utf-8-validate/v{version}
utp-native-binary-host-mirror=https://npmmirror.com/mirrors/utp-native/v{version}
zmq-prebuilt-binary-host-mirror=https://npmmirror.com/mirrors/zmq-prebuilt/v{version}
bin-mirrors-prefix=https://npmmirror.com/mirrors
canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas
electron-mirror=https://npmmirror.com/mirrors/electron/
electron_custom_dir={{ version }}
electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/

Fast Start (pure front-end)

OpenSumi provides a pure front-end version of the access ability, can let you out of the node environment, in a pure browser environment, through a simple B/S architecture to provide relatively complete IDE capabilities.

Before running, ensure that Node.js 10.15.x or later has been installed on the local environment. OpenSumi also relies on some Node.js addons. To ensure that these Addons can be compiled and run properly, it is recommended to refer to the installation guide in node-gyp to set up a local environment.

Fast start

Clone project opensumi/ide-startup-lite, go to the directory and run the following command to start the IDE:

$ git clone https://github.com/opensumi/ide-startup-lite.git

$ cd ide-startup-lite

$ npm install # Install dependency 

$ npm run compile:ext-worker # Compile webworker plug-in environment 

$ npm run start # 

Open your browser to http://127.0.0.1:8080 for preview or development.

A framework to help you quickly build local and cloud IDE插图5

Product Case

Alipay small program development tool

Small program Developer tool is a one-stop small program development tool created by Alipay open platform, providing coding, debugging, testing, uploading, project management and other functions. Not only support the development of Alipay small programs, the same code is also commonly used in Ant open ecology, can be directly released to Taobao, Dingding, Autonavi and other application platforms.

A framework to help you quickly build local and cloud IDE插图6

Taobao Developer tools

Developer tool IDE is a local development tool to assist Taobao developers to develop business applications, including local debugging, code editing, real machine preview, release and other functions, covering the complete process of application development.

A framework to help you quickly build local and cloud IDE插图7

—END—

Open Source protocol: MIT

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code A framework to help you quickly build local and cloud IDE https://ictcoder.com/kyym/a-framework-to-help-you-quickly-build-local-and-cloud-ide.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service