WEBIDE(在线开发环境) Cloud9、Eclipse Che 和 Eclipse Theia 对比

1,959 阅读11分钟

Cloud IDE review: AWS Cloud9 vs. Eclipse Che vs. Eclipse Theia

云端开发环境评测:对比 Cloud9、Eclipse Che 和 Eclipse Theia

You don’t have to develop locally to get full IDE support. We compare three great tools that let you edit and debug code from a browser.

您不必在本地进行开发就可以获得完整的IDE支持。我们比较了三种伟大的工具,它们可以让您从浏览器中编辑和调试代码。

Bringing on a new developer to a programming project with many dependencies can sometimes be a nightmare. I’ve seen an extreme case where the company finally gave up and bought the developer a new computer after a month of issues trying to configure his old one. More commonly, setting up a new development environment for a new developer might take between three days and two weeks.

一个新的开发人员,参加一个有很多依赖关系的编程项目,有时可能是一场噩梦。我见过一个极端的例子,花费一个月试图配置旧电脑的开发环境,最后该公司最终放弃了旧电脑,给开发者买了一台新电脑。更常见的情况是,为新进入团队的开发人员配置一个开发环境可能需要三天到两周的时间。

That issue is one of the motivations for web-based developer workspaces. Another motivation is that machines for local development need significant CPU and RAM resources, which increase the cost of hardware; those resources allow the developer to build the project expeditiously. Computers for accessing web-based workspaces can get away with lower-end hardware than computers for local development.

这个问题是基于web构建IDE的动机之一。另一个动机是用于本地开发的机器需要大量的CPU和RAM资源,这增加了硬件成本;节省这些资源可以使开发商能够更快地交付项目。与用于本地开发的计算机相比,用于访问基于web的IDE的计算机可以使用较低配置的硬件。

As an added benefit, web-based developer workspaces can centralize and standardize a configuration. How many times have you heard “It works on my machine” in response to a bug report? Standardized environments can eliminate that problem.

另外一个好处是,基于web的IDE可以集中和标准化配置。你听过多少次“它在我的电脑上好好的啊”来回应测试人员的错误报告?标准化的环境可以消除这个问题。

In this article I’ll discuss three cloud IDEs that provide web-based developer workspaces. Two of them—Eclipse Theia and Eclipse Che—are fairly recent free-open-source projects currently under the auspices of the Eclipse Foundation. The third —AWS Cloud9—is an older product that is now owned by and integrated with Amazon Web Services.

在本文中,我将讨论三个 WEB(Cloud) IDE,它们提供基于web的集成开发环境(IDE)。其中Eclipse Theia和Eclipse Che是最近由Eclipse基金会赞助的免费开源项目。第三个 AWS Cloud9 是一个较旧的产品,现在由亚马逊网络服务所有并与之集成。

Eclipse Theia

Eclipse Theia is an open-source project to provide the Visual Studio Code development experience in a browser; it can also run on the desktop in the Electron shell. Theia relies on Visual Studio Code’s Language Server Protocol to provide language-specific code completion and the other features we expect in a modern code editor.

Eclipse Theia是一个开源项目,在浏览器中提供与 Visual Studio 一致的代码开发体验;它也可以在桌面电脑上的 Electron内核 中运行。Theia依赖于Visual Studio Code的语言服务器协议来提供特定于语言的代码完成以及我们在目前主流代码编辑器中所期望的其他功能。(VSCode是微软开源的一款桌面IDE)

Because it can take advantage of the language servers written for Visual Studio Code, Theia has access to more than 60 available language servers including JavaScript, Java, Python, and TypeScript. Theia also supports the debug adapter protocol.

因为Theia可以利用为Visual Studio Code编写的语言服务器,所以它可以访问60多个可用的语言服务器——包括JavaScript、Java、Python和TypeScript。Theia还支持调试适配器协议。

Theia itself is written in TypeScript and uses PhosphorJS as the foundation for its shell and its draggable dock layouts. It integrates a terminal that reconnects on browser reload to maintain the command-line history. You can create your own extensions to Theia if you wish.

Theia本身是用TypeScript编写的,并使用PhosphorJS作为其外壳和可拖动停靠(贴靠)布局的基础。它集成了一个终端,该终端在重新加载浏览器时重新连接,以维护命令行历史记录。如果您愿意,您可以创建自己的Theia扩展。

There are three major ways to try Theia. One is to run it in Docker:

尝试Theia主要有三种方法。一种是在Docker中运行:

docker run -it -p 3000:3000 -v “\$(pwd):/home/project:cached” theiaide/theia:next

The second is to run it in Gitpod (see sidebar and screenshot below). The third is to run Eclipse Che version 7 or later (see the next section), which uses Theia as its UI instead of the Java UI used in older versions of Che.

第二个是在Gitpod中运行它(见下面的侧边栏和屏幕截图)。第三个是运行EclipseChe版本7或更高版本(见下一节),它使用Theia作为UI,而不是旧版本Che中使用的Java UI。

image.png In the screenshot above we are running Theia in a browser on the GitHub theia-ide/theia project, via Gitpod. Note Theia’s similarity to Visual Studio Code in both features and appearance. Also note that Gitpod automatically built the project in the terminal window.

在上面的屏幕截图中,我们正在GitHub的浏览器中通过Gitpod运行 Theia-ide/theia项目。注意Theia在功能和外观上都与 Visual Studio Code相似。还要注意,Gitpod会在终端窗口中自动构建项目。

The Eclipse Theia project includes contributions from TypeFox, Ericsson, Red Hat, IBM, Google, and ARM. The project roadmap includes a plug-in system to support VS Code extensions (beyond language servers), integration with testing frameworks, and other improvements.

Eclipse Theia项目包括TypeFox、爱立信、Red Hat、IBM、谷歌和ARM的贡献。项目路线图包括一个插件系统,以支持VSCode扩展(超越语言服务器)、与测试框架的集成以及其他改进。

Gitpod is a commercial hosted environment (see screenshot above) designed to open GitHub repositories in workspaces. The Gitpod IDE is open-source and based on Eclipse Theia. Currently in a free beta-test phase, Gitpod will always be free for open source projects, but will eventually require a subscription to open private repositories and to use for more than 100 hours per month.

Gitpod是一个商业托管环境(见上面的屏幕截图),旨在在工作区中打开GitHub存储库。Gitpod IDE是开源的,基于Eclipse Theia。目前处于免费测试阶段,Gitpod将始终对开源项目免费,但最终需要订阅开放的私人存储库,每月使用时间超过100小时。

The Gitpod.io cloud currently runs in multiple Kubernetes clusters hosted on Google Cloud infrastructure in three different regions around the world. The Gitpod product is also available for private hosting.

Gitpod.io云目前在全球三个不同地区的谷歌云基础设施上托管的多个Kubernetes集群中运行。Gitpod产品也可用于私人托管。

Eclipse Che

Eclipse Che is an open source developer workspace server and cloud IDE designed for teams and organizations. Che version 7, currently in beta, uses Eclipse Theia as the basis of its IDE. Older versions of Che use a GWT-based IDE. Che workspaces run in containers on Docker, OpenShift, or Kubernetes.

EclipseChe是一个为团队和组织设计的开源开发人员工作空间服务器和云IDE。Che版本7,目前处于测试阶段,使用EclipseTheia作为IDE的基础。Che的旧版本使用基于GWT的IDE。Che工作区在Docker、OpenShift或Kubernetes上的容器中运行。

You can run Che in the public cloud, a private cloud, or install it on any operating system. Che has been tested on Ubuntu, Linux, MacOS, and Windows. You can also run Che in a self-service workspace hosted at che.openshift.io/, for which you’ll need to have or create a free OpenShift or Red Hat log-in.

您可以在公共云、私有云中运行Che,也可以将其安装在任何操作系统上。Che已经在Ubuntu、Linux、MacOS和Windows上进行了测试。您还可以在托管于的自助服务工作区中运行Cheche.openshift.io/,您需要拥有或创建一个免费的OpenShift或Red Hat登录。

In addition, Eclipse Che comprises the core of Red Hat CodeReady Workspaces, the new development environment for OpenShift. In addition to being supported by Red Hat, CodeReady Workspaces have pre-built stacks with supported Red Hat technologies and include Red Hat SSO to handle authentication and security between the developer teams.

此外,Eclipse Che还包括Red Hat CodeReady工作区的核心,这是OpenShift的新开发环境。除了受到Red Hat的支持外,CodeReady工作区还预装了带有支持的Red Hat技术的堆栈,并包括Red Hat SSO,以处理开发团队之间的身份验证和安全性。

The Eclipse Che project includes contributions from more than 20 companies including CodeEnvy (the original developer of Che), Docker, IBM, Red Hat, and TypeFox. The Che roadmap includes finishing the Theia integration and the plug-in systems for Theia and Che.

Eclipse Che项目包括20多家公司的贡献,包括CodeEnvy(Che的原始开发人员)、Docker、IBM、Red Hat和TypeFox。Che路线图包括完成Theia集成以及Theia和Che的插件系统。

image.png In this screenshot we are running Eclipse Che 6 in a browser, hosted on che.openshift.io, with a Node.js stack. The project is a “Hello, World!” web app based on Node.js and Express.

在这个屏幕截图中,我们在浏览器中运行Eclipse Che 6,该浏览器托管在Che.openshift.io上,具有Node.js堆栈。该项目是一个基于Node.js和Express的“Hello,World!”网络应用程序。

AWS Cloud9

The Cloud9 IDE, which I mentioned as a Go IDE in 2017, now belongs to Amazon Web Services. In addition to having a browser-based, multi-language code editor, debuggers for several languages, and a terminal that’s pre-authorized for AWS services, Cloud9 now allows for collaborative coding.

Cloud9IDE,我在2017年提到的Go IDE,现在属于亚马逊网络服务。除了拥有基于浏览器的多语言代码编辑器、多种语言的调试器和预先授权用于AWS服务的终端外,Cloud9现在还允许协作编码。

You can run Cloud9 development environments on managed Amazon EC2 instances or any Linux servers that support SSH. Cloud9 includes tooling for upwards of 40 programming languages, although only five have debuggers, seven have linting, and 12 have code completion.

您可以在托管的AmazonEC2实例或任何支持SSH的Linux服务器上运行Cloud9开发环境。Cloud9包括用于40多种编程语言的工具,尽管只有5种具有调试器,7种具有linting,12种具有代码完成功能。

If you run Cloud9 on EC2, the EC2 instance will stop automatically after you close Cloud9, by default after 30 minutes, and your code will persist in Amazon EBS storage. If you run Cloud9 on your own Linux server, the code will persist in local storage. If you restart Cloud9 after its underlying instance has stopped, Cloud9 will automatically restart the instance and restore your edit session where you left off.

如果您在EC2上运行Cloud9,EC2实例将在您关闭Cloud9后自动停止,默认情况下在30分钟后停止,并且您的代码将保留在Amazon EBS存储中。如果您在自己的Linux服务器上运行Cloud9,代码将保存在本地存储中。如果在Cloud9的底层实例停止后重新启动Cloud9,Cloud9将自动重新启动该实例并恢复您中断的编辑会话。

You can easily populate a Cloud9 instance from a repository or from local files. In the screenshot below, I used Git from the Cloud9 command line to check out the GitHub repository for Keras. If you are editing a project based on a repository for which you have commit permission, you can update the repo and pull changes as needed from the command line. Cloud9 doesn’t have graphical support for version control.

您可以从存储库或本地文件轻松地填充Cloud9实例。在下面的屏幕截图中,我使用Cloud9命令行中的Git来查看Keras的GitHub存储库。如果您正在基于具有提交权限的存储库编辑项目,则可以根据需要从命令行更新repo并提取更改。Cloud9没有对版本控制的图形支持。

Note the outline view at the right of the screenshot below, which works nicely for gross navigation within a file. The Go menu shown at the top left works nicely for more general navigation. There is no refactoring functionality in Cloud9, although there is simple code reformatting.

请注意下面屏幕截图右侧的大纲视图,它非常适合在文件中进行粗略导航。左上角显示的Go菜单可以很好地用于更通用的导航。Cloud9中没有重构功能,尽管有简单的代码重新格式化。

AWS Cloud9 is integrated with Amazon Lightsail, AWS CodeStar, AWS Lambda functions, and AWS CodePipeline. The Lambda integration seems to be especially good.

AWS Cloud9集成了Amazon Lightsail、AWS CodeStar、AWS Lambda功能和AWS CodePipeline。Lambda集成似乎特别好。

image.png AWS Cloud9 IDE displaying Keras Python code cloned from GitHub. Note the outline view at the right and the options on the Go menu. The keyboard shortcuts shown are for MacOS.

AWS Cloud9 IDE显示从GitHub克隆的Keras Python代码。请注意右侧的大纲视图和“转到”菜单上的选项。显示的键盘快捷键适用于MacOS。

Which cloud IDE?

Eclipse Theia, Eclipse Che, and AWS Cloud9 all let you edit and debug code in multiple programming languages from a browser. There are differences in the layout and functionality, but not enough to matter unless you want to accomplish something fairly advanced, such as refactoring.

Eclipse Theia、Eclipse Che和AWS Cloud9都允许您在浏览器中编辑和调试多种编程语言的代码。布局和功能上有差异,但这还不够重要,除非你想完成一些相当高级的事情,比如重构。

Cloud9 is an especially good choice if you are working on AWS projects, and Che is an especially good choice (as CodeReady) if you are working on code for Red Hat systems. Theia provides the nicest editing environment of the three, but once Che 7 comes out of beta it will have a Theia IDE as well.

如果您正在从事AWS项目,Cloud9是一个特别好的选择,如果您正在为Red Hat系统编写代码,Che是一个尤其好的选择(作为CodeReady)。Theia提供了三个中最好的编辑环境,但一旦Che 7推出测试版,它也将有一个Theia IDE。

原文地址:www.infoworld.com/article/334…

参考: