How I Created a Web-Based IDE in 7 Days

DZone 's Guide to

How I Created a Web-Based IDE in 7 Days

Creating a fully functioning web app in 7 days is impressive, no matter what kind of app you're making. See how one dev pulled it off!

· Web Dev Zone ·
Free Resource

Some few days ago, I released the first version of Hyper IDE. Hyper IDE is an integrated development environment built as a web application, which implies that it can be installed on a web server, and allow you to code from an iPhone, from anywhere you are in this world - at least in theory. It supports 100+ programming languages, it can integrate with all compilers and source code management systems that I am aware of, and it has a very rich plugin architecture. However, probably its most interesting trait is that it is no more than 2-3,000 lines of code, and I built it in 7 days.

Image title

How is that possible you may ask? Especially considering Microsoft spent 30+ years with probably 500+ developers creating Visual Studio as we know it today. How is it possible for one man to create such a complex application, in such a short timespan?

Well, the first thing you'll need to overcome to become extremely productive is the "not invented here syndrome." Hyper IDE relies upon a lot of great existing tools. First of all, it relies upon CodeMirror, which is an amazing editor for editing code through your browser. Arguably the largest job when creating an IDE is the editor itself. I could integrate CodeMirror, wrap it into my own code with some 40 lines of code, and start out with arguably 50% of the problem solved. In addition, it uses components created by Microsoft and Sencha, that help me with common tasks, such as CSS and JavaScript minification, beautifying, etc.

Secondly, instead of building all sorts of integrations for stuff such as Git, compilers, etc. - I instead chose to create a command line interface, allowing you to execute shell commands directly from inside your browser. This allows me to integrate it with stuff such as compilers, Git, etc. Third of all, I had to compromise on some things when it came to different project types. In fact, there are no "project types" in Hyper IDE. Instead of parsing stuff such as Visual Studio project files, I chose to simply create it as a "file browser," allowing its users to edit any text-based files. After all, most project files, such as for instance .vsproj files, are simple text files, and can just as easily be edited with an XML editor, as they can through your Visual Studio project settings.

So, the only job I actually had to do was to create the ability to browse and apply changes to your file system, integrate with shell/cmd, and integrate CodeMirror. Everything else was done for me. However, and there is a big "but" here ...

Hyper IDE is built on top of Phosphorus Five. Phosphorus Five is a tool for creating web-based apps, which seamlessly integrates your client-side code with your server, in ways difficult to imagine for those who haven't used it. This implies that the job of integrating between the server and the client was also arguably done, and I could simply hook up stuff such as my "onclick" event handlers for my buttons and tree view items on the server side, and not have to worry about how to create an Ajax request, serialize data, store it on the server, etc. Phosphorus Five also has "security out of the box," allowing me to let Phosphorus take care of the security, and all the nitty-gritty stuff you'd normally have to think about when creating a web app. In fact, Hyper IDE doesn't even have its own login window! Still, it's rock solid secure! In addition, it contains a CSS and Ajax component library called Micro, which means that I didn't have to create my own tree view, or worry about how to style my web app.

All-in-all, before I even started, I was arguably 98% finished, and all I had to do was to integrate pre-existing components. This allowed me to create a really complex and rich web app in 7 days, that most other developers would spend years trying to tie together. There is a lesson to be learned here, can you see it?

Disclaimer: I am the developer and architect of both Phosphorus Five, Micro, and Hyper IDE. Hyper IDE, in its current release, is still BETA'ish arguably, and there might be quirks and issues with it. Some of which I have already fixed in the latest Git repository, other issues I might not have anticipated yet. Still, I think that it's already a great tool as a "second IDE." It doesn't have a very rich AutoComplete implementation, except for languages such as JavaScript, HTML, CSS, and Hyperlambda - so for stuff such as C#, C++, Python, and Ruby, you'll probably not find it as rich in features as other IDEs. Still, it is a web app. It also allows you to create, compile, and distribute code, for any platform you wish, from inside of your browser. How cool is that?

If you wish to try Hyper IDE, you can download the main Phosphorus Five installation, which you can do from here. Make sure you download the correct zip file though. All you need to test it is Visual Studio, and nothing else, if you download the correct file.

ide ,ajax ,web dev ,web application development

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}