Introduction

It has always been difficult for programmers to organize and work on projects across a variety of locations, computers, and devices – especially when you work in teams. When you store your code on one computer at one location, you become tied down to that one computer, finding yourself running back to that machine each time a you’re hit with coding inspiration. Worse, if you’re working in a team, each member of the team has to send their code to every other member, each step of the way, creating organizational distractions and unnecessary delays. This is the problem that online compilers have solved, and the programming world will never be the same.

With an online compiler you can store your code online, allowing you the freedom to program from any computer (or device) with a connection to the internet. With an online compiler, you and your team can work on the exact same set of files, regardless of where your team members are, allowing you to work better as a team and keep your projects organized. 

This article will cover (1) the benefits of using an online compiler, (2) current limitations of online compilers, and also (3) help walk you through your first steps in using some of today's top online compilers such as Closure Compiler, ShiftEdit and Compilr.com. 

Benefits of Using an Online Compiler

Code on the Road

Online IDE’s have cut the number of tools you need tenfold – now, to access and edit your code, all you need is an internet connection. This allows you to access and edit your code from just about any computer worldwide, freeing you from the need to have constant access to a single computer where your files are stored.

Working at the Compilr.com Online C Compiler Office

Working on the online java compiler at the Compilr.com office.

Code in a Team

When working in a team, it’s essential to keep all team members on the same page, keep team members updated to the latest changes in code, and keep projects organized without a confusing jumble of different project versions stored on different computers. An online compiler allows a team to work on the exact same set of code, browsing files just as they would if they were stored on their local machine, marking the end of organizational hassles.

Ready to Go

Shipped with just about language/library/etc. you’ll ever need, online IDE’s come ready to program out of the box. With an online IDE you can get your projects up and running faster than ever by skipping over tedious installations, and getting right down to the programming of your project itself.

Use Any System

An online compiler stores your files in the cloud, and you access/edit these files with your browser. This means that you are now able to program for a wide selection of devices, without actually needing to go out and purchase them. You can write for Mac, Windows, and Linux or even an iPhone or iPad without spending the money on buying one of each.

Program with Any Device

Can you log into your online compiler with your Smartphone or tablet, and edit your code? Absolutely. It might seem a bit awkward to consider writing code on your iPhone or BlackBerry, but when you have a client demanding coding changes fast, you will be glad you can. With an online IDE you can log in with your Smartphone, edit a project’s code, and have it sent off to your client in a matter of minutes.

Compilr.com Online C Compiler

In this screenshot, the Compilr interface has been set up as an online C compiler.

Some Current Limitations 

As an emerging technology, today's online compilers are certainly not without their limitations. Most online compilers have yet to integrate the reliable version control capabilities which many of us will find necessary on production projects, however for the time being, most online compilers have integrated auto-save functionality to temporarily make up for lost ground. Auto-save functionality will save a back-up of your code as you work in case you loose your internet connection, but this will not overwrite your project's files, which will only be done when clicking "save". 

Team collaboration can also still be a bit limited, though this is there area where online compilers likely stand to make the most impact on the way we code. Again to temporarily make up for lost ground some online compilers have implemented a "public projects" feature, which will allow your fellow team members to view your code online and copy it into their own profile. In the future as the development of online compilers becomes more advanced, we will undoubtably see better team collaboration functionality, allowing multiple team members to work on a single set of files without overwriting the changes of their team-members. 

As the primary goal of any online compiler has been to replicate the feeling of programming on your own computer, care is taken to ensure that there are no significant changes when approaching programming on an online compiler vs. programming on your own computer.  

Keep in mind that online compilers are an emerging technology and under active development. Rather than taking the current limitations of online compilers as a stumbling block to getting your feet wet with the technology, you should take it as a cue to dive right in. Find the online compiler that fits you best and get involved in that compiler's forums, make suggestions on what features you feel need to be implemented first, and help develop the online compiler platform. The beauty of online compilers is that their CEO's, marketing teams, and of course developers all programmers just like you - they're more than eager to listen to your suggestions on developing their online compiler, and most importantly, they'll understand what you're talking about when you ask for a feature. Just to drive this point home, find your favorite online compiler and get involved - not for what it is, but for what it will be.  

Choosing the Right Online Compiler

When choosing the right online compiler for your project you need to ask yourself one simple question: what language / platform do I want to use? At the time of writing there are a handful of online compilers / online IDE's that currently exist; luckily for you your decision on which online compiler to use has been made much easier by the fact that each of these online compilers, at least at the time of writing, seems to be specialized for a certain set of languages with relatively little overlap between products. In the future there will likely be more direct competition between online compilers, however at present the following compilers are your best bet for their respective languages.

Closure Compiler

Closure Compiler is an online Javascript compiler provided by Google. Although closure compiler can be downloaded to your computer, it can also be used as an online compiler by visiting this link.

Compilr.com

Compilr.com is the best tool to use if you want an online compiler for Java, C#, VB.net, or to work on the XNA platform.

ShiftEdit.com

ShiftEdit supports a range of web development languages, including PHP, Ruby, Python, and Perl among others.

Coderun.com

Coderun is another good solution when working with PHP, AJAX applications, or working with ASP.net.

Using Closure Compiler for your Javascript

closure-1.jpg

Closure Compiler is an open source project developed in Google Labs, and has been used by a number of high-profile google applications, including Gmail, Google Maps and Google Docs to improve the performance of their javascript. Though it lacks some of the online code storage and team collaboration aspects mentioned earlier in this article, the tool has been designed for optimization of javascript rather than for the management of an ongoing project. To use Closure Compiler in its online version, navigate to the following url: http://http://www.codeproject.com/KB/ThirdParty/closure-compiler.appspot.com/home 

closure-2.jpg

Step One: Add a url

Using the "Add a url" feature shown at the top on the left-hand side, you can quickly load a number of the web's most popular javascript libraries including jQuery, MooTools, YUI, Prototype, Dojo and several others of equal importance. All libraries are loaded directly from Google's CDN.

Step Two: Choose Your Optimization;

Closure allows you to choose from several optimization options before running your code through the compiler. Choosing "Whitespace only" will remove all whitespace and comments, but does not alter anything in your actual script. "Simple" will perform the same stripping, but also shorten the names of local variables to improve performance. Because it only works on local variables, the functionality of the script remains intact. "Advanced" will optimize your code better than just about anything else out there, but it can be touchy so before using it it would be best to consider reviewing this article.

Step Three: Compile!

Hit "Compile" and watch your code shrink! If you have errors in your code you'll be warned of them before getting an output, allowing you to ensure that your compiled code is not only small but of the highest quality possible.

Getting Started with ShiftEdit

ShiftEdit works best with web languages such as PHP, Ruby, Python, and Perl among others. To get started with ShiftEdit head over to ShiftEdit.net.

Step One: Click Access ShiftEdit

After landing on the page, simply click "Access ShiftEdit" and log into the website; you can create a new account, or log in with your social network.

Step Two: Choose your language

Choose the language you want to code in. For this example, we've chosen PHP.

Step Three: Code!

After choosing your programming languages you'll be greeted with a familiar code editing page, though unfortunately, the syntax highlighting of the application is still only in its early stages.

shift-3.jpg

Creating Your First Project on Compilr.com

Compilr.com is an online compiler for Java, C#, and VB, with the recent addition of a online XNA capabilities as well. To get started using Compilr.com point your browser to the following url where you can sign up for a free account with Compilr: sign up for Compilr.com. Once you've signed up, with your free account you'll be able to create and store public projects on Compilr online IDE, accessing and editing your code from anywhere.

Step One: Select Create New Project

compilr-4.jpg

To begin creating your first project in Compilr, navigate to the sidebar and click "Create New Project". This will launch the new project screen where you can specify the details of your project.

Step Two: Select "Create New Project"  

compilr-5.jpg

Once you have landed on the new project page you'll be asked to specify the details of your project. The options on this page will depend on the programming language you have decided to use in your project, whether it be C#, C++, VB.net, or Java. You will also be able to choose XNA, or another language platform. Once you have selected the specifics of your project, click "Create Project".

Step Three: View your Project, and Open it in the Online IDE

compilr-6.jpg

Once your project has been created you will be able to view it, and if it is a public project, the Compilr community will be able to view the project and vote on its quality as well. To view your project and begin editing and compiling your code online, click the "Open in IDE" button.  

Step Four: Get Programming!

compilr-7.jpg

You're up an running! You now have a project stored online, where you can compile your Java, C#, and VB.net code from any web browser. To get started with the IDE and have a look at some example code, click the example file that is displayed in the file directory on the right hand side of the page.

Conclusion

Online Compilers / Online IDE's have changed the way we programmers do business – at least those who’ve had the foresight to make the switch. By storing and editing your code in the cloud, you’re able to code better, faster, and more efficiently. An online compiler is one of the most essential tools in the modern programmer’s tool belt, and if you want to stay ahead of the game; it is about time you bring your code into the 21st century. Online compilers may yet need a bit of work before they become the tools they're capable of, but the best way to get them there is to find the best compiler for you, and get involved in that online compiler's community.  

推荐.NET配套的通用数据层ORM框架:CYQ.Data 通用数据层框架
新浪微博粉丝精灵,刷粉丝、刷评论、刷转发、企业商家微博营销必备工具"