A dedicated writing enthusiast who enjoys fishing and camping when not writing some tech stuff. Eugene has posted 6 posts at DZone. You can read more from them at their website. View Full User Profile

Codenvy Factories: a New Way to Clone a Developer Environment With a Shareable Button

10.04.2013
| 3462 views |
  • submit to reddit

What is the biggest challenge dev teams usually face? Complex tech challenges? Lack of competent staff or tools and services to make their lives easier?

Of course, these can be big problems but they can be solved eventually. Problems are solved by smart coders, more personnel are hired, and services are purchased. What can’t be solved, however, is a developer that is tied to his desktop. It goes from bad to worse when a developer needs to share a project with colleagues, top managers, or whomever he wants to share it with.

Sharing a project itself is a piece of cake, but cloning a developer’s environment seems to be a common problem. Codenvy took up the challenge and blessed a coding community with Codenvy Factories.

I’d go as far as to say the entire Factory concept revolutionary!  Why do I think it is innovative and revolutionary? Codenvy Factories are not just about sharing projects. Sharing a GitHub URL remains an easy way to share projects, but not a developer environment. Just click on the below button to see what happens next:

A Few Words on What Has Happened:

Codenvy has created a fully functional temporary workspace, identical to the one you’d get after registering with this service. Then the system clones a project from which a Factory has been created. A Factory URL consists of several parameters. Commit ID is one of them. Thus, it is possible to share a Factory of a project in its particular state, for instance, before or after some drastic changes. After a project is cloned, a temporary workspace is ready to be used. In Codenvy that means coding, building, testing, running, debugging, and deploying apps entirely in the cloud.

It usually takes up to a minute to create a temporary workspace and clone a project. Sure, it depends on the size of the project being cloned. A few months ago Codenvy ran an experiment  and compared the time required to create a simple Spring app and deploy it to Cloud Foundry provided that two developers have identical Linux machines. One followed the conventional desktop approach (install Java, Maven, Tomcat, git, Eclispe etc). The other one used Codenvy. Codenvy was almost 10 times faster. With new Codenvy Factories this gap is likely to grow even more.

Some potential use cases are obvious:

Sharing a Factory to Get Support

We all use StackOverflow from time to time. Instead of publishing code snippets, one can publish a Factory button so that fellow developers can have a bigger picture, not just a few lines of code that supposedly cause troubles. Moreover, one can configure a factory URL in such a way so that a particular file is opened after creation of a temp workspace. In one click Codenvy creates all necessary infrastructure and environment, opens a project and a file.

You don't need to be a Codenvy user to create a Factory. In the docs the Codenvy team provides a guide on how to manually create a factory URL. Copy the Git URL or a project on GitHub, add a few mandatory components, publish it online, and everyone who clicks on it will get a temporary Codenvy workspace with your GitHub project.

Experimenting with New Technologies

What if you need to experiment with new technology or just a few lines of code to track behavior?  Codenvy gives you throwaway workspaces for free! It's a temporary workspace that self destructs in 2 hours. Create a temp Codenvy workspace, satisfy your curiosity and decide whether or not you need a permanent account. There’s no need to register and fill in forms. We all hate it, especially if your hands are itching to try out something new.

You Name it!

There are many other use cases covered in Codenvy the docs, but I am sure the dev community will come up with their own. Indeed, Factory use cases are not limited just to trading URLs online. More serious scenarios may include separation of duties for dev teams or partner ecosystems where partners can consume your API.

Collaboration with Factories

Create a Factory, click on it, copy the temporary workspace URL and share it with colleagues. You’ll be placed in a collaborative session taking place in a temporary workspace with your project. It will take a few seconds for collaborators to hop in. I mean it... a few seconds! You can go and try it yourself. Once you’re done, this workspace will be terminated.

Create an Account From Within a Temp Workspace

You may create a permanent account with Codenvy or not. It’s up to you. If you want to grab a free workspace in Codenvy, just click a relevant button in the top right corner of a temp workspace, and in a minute or so, you’ll be an owner of a named account.

 
Have fun with Factories! You can find many of them on Codenvy.com and Codenvy documentation center.
Published at DZone with permission of its author, Eugene Ivantsov.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)