How to Create an IDE - Why Build Your Own IDE?
What is an IDE? To develop computer software or mobile apps most programmers use an Integrated Development Environment (IDE). An IDE is an all-in-one program for writing, running and debugging software. What can you do in an IDE? You can:
- Design the program's screens.
- Write the code.
- Compile the code.
- Ideally perform test runs of the code.
- Debug the code.
- Package the code for distribution.
As you can see from the above list creating a fully featured IDE is a very big job for a single person. Most IDEs are created by large professional teams (e.g. Microsoft Visual Studio, JetBrains IntelliJ) or by a group of Open Source developers (e.g. Eclipse).
Knowing this why would you want to build an IDE? Especially as it has been done so many times before. It is much easier to use an existing IDE project, since all the work has been done and there are plenty of free IDEs available. This article looks at the task of building your own IDE, or why you should spend your time more productively.
How to Build an IDE
OK you still think you want to develop an IDE. Why do you need an IDE? Despite computer companies trying their best to make computers overly complicated, writing software requires three simple steps:
- Edit the code.
- Compile the code.
- Run the code.
Thus you need a text editor and a code compiler. Anything else is a bonus, and thus the features of an IDE are a bonus. In fact the mark of a good programmer is one that can write software with a minimum of tools. There will be times in a programmer's career when just a text editor and compiler will solve a problem. Though IDEs do allow a programmer to be a lot more productive.
Did you know that to develop Windows software you do not need to install an IDE. Windows has a text editor called Notepad, and a compiler,
csc.exe, that comes with the .NET Framework that is installed in Windows. The C# Compiler (csc.exe) and the Visual Basic compiler (vbc.exe) can be found in the various versions of the .NET Frameworks that sit under
But I Still Want to Build an IDE
There are some good points about writing your own IDE:
- You will learn a lot.
- You get to work on a big project.
- It is good experience.
- You probably won't finish it.
- And thus it probably won't be used by anyone but yourself.
How to Develop Your Own IDE
Firstly what are the minimum set of features you require for your IDE?
- Obviously, you want to edit source code files.
- And you want to invoke (run) your compiler.
- And you want to show compilation results.
After those, extra features are a bonus:
- Syntax colour highlighting.
- Help and documentation.
- Project file manager.
- Multi-file build.
- A debugger (very hard).
- Support for plug-ins.
Let's look at it from a different perspective. The last item in the list is support for plug-ins. One solution is to make everything a plug-in. This has the natural advantage of breaking the task down into individual chucks. Thus write a program that allows the ability to support plug-ins, then develop each IDE feature as a plug-in:
- Start with a plug-in framework.
- Then develop an editor plug-in.
- Add a compiler invocation plug-in.
- Develop a program output viewer plug-in to see compiler results.
- Write a plug-in for source code parsing.
- This allows for a source code syntax colour highlighting plug-in.
- Develop a HTML file viewer plug-in (for help files and Internet pages).
- Write a project file manager plug-in to manage project files.
- Next develop a make, Ant or Gradle project build manager plug-in for multi-file builds.
- How about a Git plug-in for source code control.
- The really hard one is a debugger plug-in, see GDB, x64dbg or the Windows debugger.
- Then any other feature you want, e.g. an install builder plug-in, a database manager plug-in, a snippet manager plug-in, etc.
This way you can get each chunk working as you go down the list, and use existing Open Source projects to fill the gaps until you write your own version. See the Gemini framework for a Windows Presentation Foundation (WPF) based IDE shell solution.
Still the best question to ask is can I spend my programming time doing something better? The answer will be yes. In fact there are many Open Source projects that need additional help. Or pick up an Open Source project that has not had any work done on it for a while. Or even better write some software that fulfils a niche need. It could be the start of a successful business.
Don't Reinvent the Wheel, Just Use It
There are many IDEs already available, so why not build on those and adapt them. Here are some solutions and Integrated Development Environment examples:
- Notepad++ is a Windows text editor that supports a plug-in (NppExec) to run a compiler, and you can add colour syntax support for a new language.
- The new Visual Studio Code lightweight IDE supports adding extensions.
- The ATOM IDE is an editor based on web technologies.
- The Eclipse IDE is free (but requires Java).
- MonoDevelop is a free IDE for C# and F#.
- For older versions of the C# language the SharpDevelop project is an Open Source (free) IDE, written in C#, several versions are available. (The Tek Eye TFEdit control originally came from version 3 of SharpDevelop.)
For more information on IDEs see the Comparison of integrated development environments on Wikipedia.
If you still decide to build your own IDE at least make it available to others for contributions. If by chance it gets enough interest you'll get help to get the job done.
Edvinas Jablonskis on 27th May 2021 at 21:39 said: Hello,
I would like to build an ide for python and host it on a website. Do you have any advice on what I would need to achieve this?
Dan at Tek Eye on 29th May 2021 at 08:32 said: Hi Edvinas,
Think about how the edit and run processes will work on a web server. See how others have done it, e.g the Programiz online Python Compiler. Plenty of projects available that do something similar, ideally find an open source version so you can look at the code for tips. Start with the editing process, for example see the Ace embeddable code editor.
Mark Gillam on 20th July 2021 at 00:42 said:
An IDE should ideally include both a startup and innovation hub and Language Engineering hub. Ideally such an IDE should be in the form of a very heavily player driven, multiplayer video game. (There are currently NO startup and innovation hubs, Language Engineering Hubs or IDEs in the form of a multiplayer video game.)
Dan at Tek Eye on 20th July 2021 at 14:51 said:
Hi Mark, you have a great idea there. Whilst innovation in usability of IDEs has occurred, novel features that explore different ways of innovating the programming experience are lacking. Furthermore, I can see a multiplayer programming video game being a good educational tool.
- View the Tek Eye full Index for other articles.
Author:Daniel S. Fowler Published: