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.
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.
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.
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.
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 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.
There are three major ways to try Theia. One is to run it in 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.
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.
IDG
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.
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.
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 https://che.openshift.io/, for which you’ll need to have or create a free OpenShift or Red Hat log-in.
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.
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.
IDG
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.
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.
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.
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.
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.
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.
AWS Cloud9 is integrated with Amazon Lightsail, AWS CodeStar, AWS Lambda functions, and AWS CodePipeline. The Lambda integration seems to be especially good.
IDG
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.
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.
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.