Key Takeaways
- Developing in the cloud eliminates the need for local development environments, offering a faster setup, remote access, and the ability to handle multiple installs.
- Cloud development platforms, such as Cloud9, offer a range of features including collaboration tools, support for multiple programming languages, and deployment options.
- Cloud9, specifically, enables developers to work on the same source code simultaneously, test layouts on various browsers, and deploy code to servers via FTP or Push to Deploy.
- While cloud development offers numerous advantages, it’s best suited for scenarios where the user has a stable internet connection, requires remote collaboration, or needs to quickly set up an alternate development environment.
Every web developer needs to set up a development environment—a set of tools to work with, such as
- a code editor
- a version control system (such as Git or SVN)
- build tools and/or package managers
- DevOps and provision tools (Docker, Puppet, Ansible, Vagrant)
… and so on. Having a good setup is crucial for maximizing productivity.
Development stacks vary from developer to developer, and can depend a lot on a developer’s field of work. However, there are some pretty typical setups. SitePoint has recently published examples of local development environments for Linux, Windows and Mac.
In this article, I’ll take a look at a fourth kind of development environment—one that’s based wholly in the cloud. This will normally happen through a third party service, and there are quite a few to choose from—such as Cloud9, Codenvy and Nitrous.
Advantages of Developing in the Cloud
When using a cloud development environment, you’re actually a client of a development platform as a service (dPaaS)—which offers a lot more than just an online code editor.
Faster setup
Firstly, developing in the cloud reduces the setup time. Usually you can use your framework of choice, or use boilerplate code structured as it should be, and all that is done by only clicking some buttons.
Access from Anywhere
You can code from any computer, as long as you have an internet connection—whether you’re using the latest iMac, an old Netbook or even a tablet.
Remote Pairing
One of the features I love about these environments is remote pair programming. Cloud IDEs allow more than one developer to access the source code at the same time. You can see each other write code, test and chat in real time.
Multiple Installs
I recently had a problem with a Scala application. The dependencies just wouldn’t install. It turned out to be because I had Java 8 installed, while some of the dependencies required Java 7. I did’t want to downgrade, since it would probably affect other applications, so I decided to go on with a Vagrant config. Well, if you’re in the cloud, you don’t have to do that. You can require a container for each application you develop, and the container will be just like you want it to be (Java 7 in this case).
Working with Cloud9
For the rest of this article, I’ll walk you through a few examples of what you can do with Cloud9, one of the many dPaaS services available to developers.
Cloud9 offers 5 plans, one of which is free. Each plan uses Docker containers running on Ubuntu Linux, offering full terminal access, multiple collaborator access, and infinite open-source projects.
Collaboration
It’s really handy that multiple developers can work on the same source code. Each collaborator has an active cursor, and they can write code at the same time.
In the screenshot above, you can see two users, me and jamesbond006
, accessing the same controller code at the same time. Notice the lines marked with different colors in the left side of the line numbers. Each color identifies a user. The @message
on line 8 is underlined with the color corresponding to jamesbond006
—meaning he’s the one who wrote the code. This feature is very helpful and beats TeamViewer anytime! You can use it to help a friend, get help from a friend, and even test or teach some student/job candidate remotely.
Multiple Browsers
If you’re a front-end web developer or designer, you’ll sometimes have to switch browsers to check if what you wrote is what you expect to see. You’ll likely have Chrome, Firefox, Opera, and possibly IE and/or Edge installed.
Cloud9 saves you from installing a whole stack of web browsers. You can remotely test your layout on the major browsers—both desktop and mobile. You can also test your app on iPad, iPhone, Android and Kindle.
Working with Languages
Like other services, Cloud9 supports a wide range of programming languages and frameworks, including Ruby on Rails, various PHP frameworks, Node.js and also databases such as MySQL, PostgreSQL, Cassandra, MongoDB and others.
Even if you want to develop in a language not listed above, such as Scala, you can choose the Custom template and install your chosen language via the terminal.
Rails
You can create a Rails app by choosing the Rails template, or by choosing the Custom template and executing rails new
in the terminal.
You can start the application by executing this on the terminal:
rails s -p $PORT -b $IP
You can then access the application you’re developing by navigating to <workspace>-<username>.c9.io
.
To install gems, just add them inside your Gemfile
and run bundle install
in the terminal—just like you’d do in a local environment. The rails generate
and rake db
remain the same, and migrations create tables in the default db/development.sqlite3
file. If you don’t want to use SQLite, read the docs on how to set up a database.
Further Examples
For more language setup examples, I’ve put together some demos on GitHub—including C and C++, PHP and MySQL, Gradle and more.
Other Features
Of course, online code editors like Cloud9’s come with a host of nice features that you’d expect in an editor. These include:
- outline views and code completion (including Emmet integration)
- debugging tools
- split view
- themes
- key bindings
- modes of popular editors (VIM, Emacs, Sublime)
- built-in image editing.
Deploying to a Server
Whether developing locally or in the cloud, you’ll eventually want to deploy your code to a server. Some cloud development services include hosting as an option. But you can also deploy your code elsewhere.
FTP
On Cloud9, you can mount an FTP or SFTP (S for SSH/Secure) server by going to File > Mount FTP or SFTP server:
In the image above, you can see how an FTP server is mounted. I recommend using SFTP, which is more secure and uses an SSH connection with the hosting server. With SFTP, you don’t have to specify a password; by default the SSH key in the workspace is used. (I recommend you read about setting up an SSH key if the concept is new to you.)
Push to Deploy
The alternative to FTP is called Push to Deploy. Most cloud services—including Google App Engine, Heroku and Azure—allow you to use Git (or a similar VCS) to push the source code into a cloud VM for deployment. Since Git is already included in every Cloud9 workspace, you can use it to deploy your application by pushing it to the production server.
Working Offline
If you want to continue your work offline, that’s no issue. Cloud9 allows you to download the source code as a .zip
archive and then you can develop locally in your machine. It also supports FTP. You can push the project directly into the development or the production server.
Wrap-up
Cloud IDEs try to make the developer as mobile as possible. The whole environment is somewhere far removed from your machine, which enables you to use it even if you’re using an old computer or sitting at someone else’s machine. It comes with Git included, so you can use it to put the project under version control and/or work with a team of developers.
I’d recommend using a Cloud IDE at times such as these:
- Your computer is not powerful enough and your internet connection is stable (not getting regularly disconnected).
- You want to practice pair programming with another developer when one of you is working off-campus.
- You don’t mind using a code editor that’s less powerful than your local locally installed code editor.
- You quickly want to spin up an alternate environment without all the hassles of local installation.
- You want to show someone a demo of the website/web application/Wordpress theme you’re developing. (You just have to Run the application and share the URL.)
In this article, I’ve mainly covered the features of Cloud9’s online IDE, but it’s not the only one out there. There are lots of alternatives, including Nitrous, Codeanywhere and Codenvy. Which you choose, of course, will depend on your particular needs and preferences.
Have you ever developed in the Cloud? If so, how did you find it? What’s your preferred service, and why?
Frequently Asked Questions (FAQs) about Cloud Development
What are the key benefits of cloud development?
Cloud development offers numerous benefits. Firstly, it provides scalability, allowing businesses to easily upscale or downscale their IT requirements as needed. Secondly, it offers cost-effectiveness, as it eliminates the need for businesses to invest in expensive hardware. Thirdly, it ensures data recovery and backup solutions, which are often automated and don’t require manual intervention. Lastly, it enables collaboration efficiency by allowing diverse teams to access and work on projects simultaneously from different locations.
How secure is cloud development?
Cloud development is generally secure, with many providers offering advanced security features. These include data encryption, network firewalls, intrusion detection systems, and regular security audits. However, the level of security can vary between providers, so it’s important to thoroughly research and choose a provider that meets your specific security needs.
What are the challenges of cloud development?
While cloud development offers many benefits, it also presents some challenges. These include data privacy concerns, as sensitive data is stored off-site. There can also be issues with data ownership and control, as data is held by the cloud provider. Additionally, there can be challenges with integration, particularly with existing on-premise systems. Lastly, there can be potential downtime and service disruptions, although many providers offer guarantees to minimize this risk.
What skills are required for cloud development?
Cloud development requires a range of technical skills. These include proficiency in cloud-based platforms like AWS, Google Cloud, or Azure, understanding of programming languages like Python, Java, or C#, and knowledge of DevOps practices. Additionally, skills in data management, security, and networking are also important.
How does cloud development impact business operations?
Cloud development can significantly impact business operations. It can improve efficiency by enabling remote work and collaboration, reduce costs by eliminating the need for physical infrastructure, and enhance scalability by allowing businesses to easily adjust their IT resources. Additionally, it can improve data security and recovery, and enable businesses to quickly deploy new applications and services.
What is the future of cloud development?
The future of cloud development looks promising, with advancements in areas like artificial intelligence (AI), machine learning (ML), and the Internet of Things (IoT) driving its growth. Additionally, the increasing adoption of hybrid cloud solutions, which combine the benefits of both public and private clouds, is also expected to shape the future of cloud development.
How does cloud development support digital transformation?
Cloud development is a key enabler of digital transformation. It supports the shift from traditional on-premise IT infrastructure to cloud-based solutions, enabling businesses to become more agile, scalable, and cost-effective. Additionally, it supports the development and deployment of new digital services and applications, enhancing customer experiences and driving business growth.
What are the different types of cloud development services?
There are three main types of cloud development services: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). IaaS provides the infrastructure such as servers and storage, PaaS provides the platform for developers to build upon, and SaaS provides software applications over the internet.
How can businesses choose the right cloud development provider?
Choosing the right cloud development provider depends on several factors. These include the provider’s security measures, compliance with industry standards, scalability and flexibility of services, cost-effectiveness, and customer support. It’s also important to consider the provider’s reputation and track record in the industry.
How can businesses manage the transition to cloud development?
Transitioning to cloud development requires careful planning and management. This includes assessing current IT infrastructure, identifying business needs, choosing the right cloud provider, and developing a migration plan. Additionally, businesses may need to train staff or hire new talent with the necessary skills for cloud development. It’s also important to monitor the transition process and make adjustments as needed.
Aldo is a Code-Lover and a student of Computer Engineering from Albania. His short-term goal is that of becoming a full-stack developer, focusing on Android, Ruby technologies and DevOps techniques.