In this corner, Visual Studio .Net 2004 weighs in at approximately 600MB installed and 6 CDs high. The professional software engineering world regards it as the undefeated champion of IDEs. In the other corner, KDevelop 3.2 is a comparative lightweight, at a meager 13MB download.
While both products can be used to develop applications in a variety of languages, I will refer to development mainly in C and C++; most features of each IDE described here are similar for other languages.
The user interface
For the first round, we'll take a look at the user interfaces of both IDEs. Both offer an integrated UI with docking windows and toolbars, and a multitude of options.
Visual Studio .Net shows a start page, which I find useless. It shows a list of the recently used projects, which you can also find under the File menu. Toolbars are at the top, and when opening several files, you can use tabs to navigate between them. You can dock output windows, breakpoint lists, and a variety of other displays anywhere in the main window, or drag them out of it to detach them and put them in their own windows.
Visual Studio's Solution Explorer, which displays a file tree or class view of the currently opened projects, is annoying rather than useful. The problems start as soon as you load a project with more files than fit into the Solution Explorer, and you open a file from one of the lower pages for editing. All of a sudden property dialogs fail to work correctly due to flawed autoselection in the Solution Explorer's file tree. As a result it can be a real pain to get the project properties to show up at all.
Another problem is auto-hiding docked windows. The output window, for example, opens when docked, as soon as a build is started. Often, however, the auto-hiding status is mysteriously disabled, so that it won't auto-hide again, or it'll just stay hidden. Sometimes clicking on the tab of a hidden docked window results in nothing, so that the window has to be closed and reopened via the menu in order to bring it back up.
|KDevelop's add files -- click to enlarge|
|Visual Studio's Includes -- click to enlarge|
Other features in Visual Studio's UI have problems too. The IDE configuration is spread over several dialogs that can be reached via different menu options, and these dialogs look cramped and confusing. Adding library or include directories to a project needs to be done by going through two dialogs, and the resulting window listing the directories opens too small to do anything useful with. The Wizard Bar used to locate a function declaration or implementation in a file works only about a quarter of the time. There are many other small quirks that don't seem major, but can get extremely irritating when actually working in a project.
Pretty much every option in Visual Studio's configuration windows have a tooltip displayed in a text label in the dialog, which makes understanding the different options easier. Switching between different build configurations is easily done via a drop-down menu, and changing project configurations, excluding or including projects from a build, or setting dependencies between different projects, is straightforward and reliable. Visual Studio makes good use of context menus throughout the application, which makes accessing options specific to certain entries in the solution explorer or symbols and selections in the editor quite easy.
KDevelop looks similar to Visual Studio at first glance. It offers three different UI modes, however. For this article, and because it's the most similar to Visual Studio's UI, we'll discuss the IDEAI mode, which is the default. Most of the windows KDevelop shows are close relatives of the ones we can see in Visual Studio, but there are additional tabs to the left, right, and bottom of the editor area.
The Automake Manager is a crucial tool to manage subprojects and configure build targets. Configuring projects may be somewhat unusual to those not familiar with the GNU/Linux development tools, since they work in somewhat different ways; although KDevelop takes most of the low-level work out of users' hands, it is helpful to have some knowledge about automake, configure, and makefiles. It's not difficult to learn, however, and users should be able to set up application and library projects fairly easily with a little practice. There are tabs to display the files in the project in different ways, a system console, bookmarks, class and documentation browser, and several others.
Toolbars are, as in Visual Studio, at the top of the window. The Location Bar (the equivalent of Visual Studio's Wizard Bar) actually works; the project manager's file and class trees don't exhibit the annoying behaviour of the ones found in Microsoft's product. A separate toolbar shows one button for each file open in the editor -- unnecessary, as there are already tabs for these in the editor. As with Visual Studio, windows can be moved around, detached, or docked anywhere in the main window, and be in pinned or auto-hide mode.
|Visual Studios's bindings -- click to enlarge|
KDevelop's UI is well rounded, easy to operate, and nicely designed. Sometimes, however, keyboard shortcuts don't seem to catch. For example, the default build shortcut on F7 results in no reaction from KDevelop at times; minimizing and restoring the KDevelop window seems to fix the problem. I would also like to see more extensive use of the context menus in the file and class browsers, for example to compile a single file out of a project.
The integrated editors in Visual Studio and KDevelop both support configurable syntax highlighting and code folding, and both are fast and easy to use. KDevelop can be configured to use one of three different editors. Both products provide project wizards that can generate a skeleton for pretty much any application type; however, KDevelop's wizard does not contain a template for development of static and dynamic libraries, so that you must reconfigure an application project for that type of project. On the plus side, KDevelop provides templates to cross-develop Win32 GUI and console applications, which may ease the transition for some developers.
The compiler output window of KDevelop is colorized, which makes it a little easier to differentiate messages, warnings, and errors. KDevelop also provides docked windows for an additional built-in diff utility, which is nice, and a CTAGS-based lookup to quickly find references to any symbol in a project within a fraction of a second. Both of those are features Visual Studio could benefit from. KDevelop's Code Snippets window, available via another tab, can hold user-definable pieces of text that can be given a name and stored for later use. Double-clicking on a snippet inserts its text at the current cursor position. You can define variables in the snipped text with a special delimiter, and a dialog will open to substitute the variable segments with other text upon insertion -- a nice feature for anyone who has ever had to repeat a larger number of similar or the same pieces of code.
An excellent feature is the optional background parsing of C++ code. In a window labeled Problems, KDevelop prints errors in the current source code -- while you are typing it. This helps catch errors early on and speeds up code creation. Another useful addition is a display of a class's inheritance tree as a diagram.
In previous versions, finding the declaration or definition of a symbol via the editor's context menu had its problems, which seem to be solved with KDevelop 3.2 -- this feature works reliably now.
The editor also provides a context menu entry to create user configurable accessor methods for a member variable -- a small, simple feature that can save a considerable amount of tedious work.
Summarizing, KDevelop beats Visual Studio in the user interface category. While both use similar UI concepts, KDevelop's user interface has fewer quirks and problems and provides lots of nifty features that make operating the application pleasant as opposed to annoying. The only area in which Visual Studio has a clear edge is in its use of context menus for file and class tress, which provide better functionality than KDevelop's. Generally, KDevelop may take a little getting used to for someone who has mainly used Visual Studio, but is easy enough to learn and supports a development workflow very well.
Code completion features tie in with the user interface, but deserve separate mention. Visual Studio's IntelliSense is excellent and makes it easy to view and access members of classes and structs while typing. It is fairly unobtrusive and ties in well with the workflow. Member variables and functions are displayed during typing, and Ctrl-Space brings up a completion popup with suggestions at any time.
KDevelop's code completion, on the other hand, needs a little work. While it functions in general just like Visual Studio's, I had some trouble getting it to show up at all in the beginning. I was porting two small library projects, and when working on the library code itself, the code completion didn't seem to know anything about the library code. It suddenly started working as expected in an application project that used the two libraries.
Both products could use a slightly better method to differentiate between the types of completion options. Visual Studio at least shows icons to help distinguish public and private members, namespaces, classes, and structs, but they are sometimes difficult to identify. Some more effort in visual design couldn't hurt here; it's not just eye candy but helps to speed up the workflow and prevents mixups between similarly named symbols. KDevelop shows nothing but a syntax colored symbol name -- icons or color coding to differentiate symbol specifiers would be helpful.
|KDevelop's Interface -- click to enlarge|
|Visual Studio's Interface -- click to enlarge|
UI editors and frameworks
Both products come with built-in user interface editors. KDevelop includes QtDesigner, a full-featured UI editor for TrollTech's Qt framework. QtDesigner features everything you need for designing a complete GUI for your applications. Class skeletons including event handlers can be generated from within the editor, and comprehensive alignment and layout functionality makes building even complex user interfaces a snap. Alternatively, user interface files for other frameworks (for example GTK) in the project can be processed with an external editor, that can be started from KDevelop upon double click on the respective file.
Visual Studio integrates its own user interface editor, which is generally also easy to use. As in QtDesigner, UI elements such as buttons and edit boxes, or more complex controls like database table viewers can be dragged into dialog templates, edited, and saved for integration into any application. On Visual Studio's side, the functionality for layout and spacing are inferior to QTDesigners. While guides to snap elements to can be dragged from the window edges into the dialog, there is no automatic or semi-automatic spacing between elements, so that resizing a dialog during the design phase can be very cumbersome. No grouping of elements is possible, and the use of some functionality, such as correctly connecting groups of radio buttons, is opaque at best.
The same goes for making fully functional, resizeable dialogs on the code side -- the user interface frameworks are to blame. Qt, as far as its functionality, clarity and ease of use are concerned, can run circles around MFC without breaking a sweat, and similar can be said about GTK+. DotNet's Windows Forms framework is a bit better than MFC, but still lags far behind Qt.
Any development environment integrates to some point with other applications, such as compilers and documentation systems. Such integration can make a big difference in how well an IDE works for a developer.
KDevelop integrates nicely with the Doxygen documentation system and makes it possible to browse and search documentation for a project or the IDE itself, as well as different application frameworks, APIs, and programming languages, in any of six different help formats in a docked window. You can configure and build the Doxygen documentation seamlessly from within the IDE. Aside from that, KDevelop comes out-of-the-box with source control integration for the CVS, Subversion, Clearcase, and Perforce version control packages -- especially the latter two could be a big plus point for commercial development, since these are the two major packages in the field.
KDevelop supports not only the actual process of developing an application, but also its deployment. Via the Distribution and Publishing menu entry in the project menu, you can do everything from configuring and building source and binary packages to uploading the finished packages to an FTP server. It may be a good step for the KDevelop team to make this step plug-in-based to support other forms of application deployment -- for example to game console hardware or via other network protocols.
Out of the box, Visual Studio integrates with pretty much nothing. There is a database client that can connect to and edit databases from within Visual Studio -- a nice feature, but database applications such as Access or OpenOffice.org Base are likely better suited to that task. SourceSafe is the only version management system supported. However, most third-party source control applications provide plug-ins for Visual Studio integration. Visual Studio's built-in MSDN help browser is usable, but not as well done as KDevelop's counterpart. Both IDEs seem to have a flexible enough plug-in system to be customizable for different development requirements.
In any development system, the documentation of the IDE and the accompanying frameworks is important for developers. KDevelop's documentation is incomplete. Many of the help pages about KDevelop itself contain only "To be written," which may make it difficult to figure out certain features. Visual Studio's documentation doesn't exactly make me want to burst out in whistles and cheers, but it's better than KDevelop's.
Things are different with the amount of documentation for different APIs, application frameworks, or programming languages. KDevelop comes with a mind-boggling amount of different documentation subjects, all of which is searchable and should provide the necessary help for pretty much any project. The ability to bookmark any of that documentation places KDevelop further ahead of Visual Studio as far as the integration and use of the documentation is concerned. The missing parts of the IDE documentation itself represent a drawback, however.
This article just scratches the surfaces of these IDEs. An in-depth look at and comparison of all the features would require a much larger scope.
That said, however, I found KDevelop is much better than I had expected before I started to actually work (as opposed to just play around) with it. KDevelop is more feature-rich than Microsoft's product -- and we're talking actually useful things here -- more flexible, and better integrated with different programming languages, frameworks, and third-party applications, and it has a less clunky user interface than the commercial contender.
The old slam that "Linux has no good development tools" is no longer true. KDevelop is a rock-solid, feature-rich development system with only few non-trivial flaws. With its overall ease of use and integration with the system and other applications, KDevelop lands a series of tough blows against Visual Studio. Code completion and IDE-documentation are subjects in which Visual Studio is still a ways ahead.
Given the choice between these two contenders, I'd be more likely to place my bets on the Linux-based solution. And if Visual Studio existed as a native Linux application? I'd still rather use KDevelop.
If KDevelop keeps up with the pace of improvement it has just over the last few versions, its competitors, both commercial and open source, may be on the ropes.