多年来,我用一个代码编辑器,现在是由它的开发停产,并引进HTML5和CSS3的促使我寻找那些支持新的标签和属性编辑器。 在这篇文章中我将分享我用来寻找大型项目适合进行快速修复的编辑器和开发环境的标准和程序。
我最初的候选名单中包含超过30个流行的Linux,Java中,Windows和XUL的软件包,其中至少有一个稳定版本2010年1月1日以后:Arachnophilia,蓝鱼,Bluegriffon,CoffeeCup HTML编辑器,Dreamweaver的是,Eclipse PDT,Emacs的,Expression Web中, Geany,gedit中,HTML的工具包,使用jEdit,凯特,KDevelop的,科莫多编辑,Kwrite的,Netbeans的,记事本+ +,的Notepad2,OpenBEXI,PHPEdit的,PHPED临,PHPStorm,程序员记事本,PSPad,RadPHP,赛特,设备SeaMonkey时,Vim,Webdev的,WebMatrix中和Zend Studio的。 你可以在google每个程序他们的具体细节。
我的HTML / CSS / PHP / Javascript开发的使用需要一个编辑器,能够进行智能化的建议,并通过保持视觉型分离组件。
建议可以通过自动完成,参数提示,并自动关闭进行。 自动完成是程序试图猜测并提供完成HTML标记,CSS属性,以及PHP和Javascript类,函数和变量名。 参数提示是告知可能的HTML属性及其值,CSS属性的值,和PHP和Javascript函数的参数开发的能力。 自动收是增加闭合的HTML标签,括号,括号,等等的能力。
组分分离是不同类型的元素的着色,如变量,函数和变量,编辑器的屏幕上,通常被称为语法高亮。 也有用的是找到一个匹配的分隔符的能力 - 通过选择开立一个或反之亦然 - 括号,中括号和大括号。
我的第一个测试是检查其原始列表的编辑提供这些功能的即装即用,或者至少,用一个简单的安装模块。
我立刻从下降进一步调查三个包:Emacs的这些要求是很难安装其他文件; OpenBEXI它看起来像一个有趣的概念,网页开发,但不是一个真正的脚本工具,以及Webdev的似乎这不是有一个免费试用版。 我希望我能已经测试了很好的Mac的IDE,咖啡。 他们的团队给我发了很多有用的信息,我会鼓励所有的Mac用户尝试一下。
对于其余的每个包我检查他们的提示和自动完成能力的HTML4 / 5标签,CSS属性,PHP和Javascript函数和变量,和语法高亮。 下面的代码,保存为一个PHP文件,是典型的测试:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$aaa=strtotime();
if(true) {
$aaa=strftime("%a");
}
?>
|
Identifying the distinct features specifically (PHP function auto-complete, PHP variable auto-complete, Javascript function auto-complete, etc.) I had 13 requested features. I computed the scores for both packages and features; it was a YES/NO check, and each YES was worthy of one point added the editor’s total score.
The most prevalent features were syntax highlighting and delimiter localization, and the auto-closing of HTML tags. The least seen ones were auto-completion and argument hinting of Javascript functions and auto-completion of Javascript variables. The average score was 4.8 absolute or 38% relative, meaning that the average package had not quite 5 of the 13 features requested. 13 of the 29 packages were above the average.
For further evaluation, I selected the top 25%. That is, the following 8 ranked best with my criteria (listed alphabetically): Dreamweaver, Geany, Komodo Edit, Netbeans, Nusphere PHPEd, PHPStorm, Programmer’s Notepad, and WebMatrix. It’s interesting to note that four of those are free (as in free scotch) and four are paid software, and that four are Windows-only while the other four are cross-platform.
This selection does not imply that these packages are better than the others. It just means that they had more of the requested features than others. If, for instance, code refactoring were a priority for me, the results would have been quite different.
The second battery of tests looked at the following list of features: code snippets/templates, code folding, bookmarks, automatic code-formatting, integrated debugging support, macro support, availability of refactoring tools, project management support, version control support, built-in FTP support, integrated command-line console, plug-in support, support for frameworks, editor customizations, whether the start-up time was acceptable, availability and completeness of documentation, and a few others. Again the focus was on out-of-the-box or click-to-install plug-ins, and it was a YES/NO test with each YES scoring one point. Here’s how it turned out:
Although all the ones above are powerful programs for working with PHP code, I was the happiest with Geany and NetBeans. Geany is lighter with less features but is expandable with a growing list of community-maintained plug-ins. NetBeans is powerful but has a steeper learning curve and, though free and open source, is privately maintained. Possibly I’ll be using one or the other depending on the task at hand and after a bit of time settle on using just one.
Anyway, in about three years time I’m sure new IDEs will have come up and some of these here will have ceased development. It’ll be time for another review.
This article was painful to write. Checking every program in the list was a tiresome, sometimes infuriating, but nevertheless refreshing experience. It took a lot of research, downloading (including a 800MB wrong one!), and time for checking features. I revisited some packages I worked with years ago and discovered others I had never heard of. And it afforded me an interesting comparison between Linux’s repository system and Window’s installer concept as well as between the sizes and setup complexity that separates free from paid software. My desktop is cluttered with downloaded files and there’s a lot of deletions to do now that it’s all over. But I had the chance to do a planned search for an item I needed, something that I had never done before this way. I take from this experience that a search for a product or service should begin with checking simple but essential qualities in a large set and then looking for refinements in those that pass the first test. I also learned to leave my prejudices aside. I never guessed I’d end up putting NetBeans on my final list.
I never planned to tell anybody what’s the best IDE around. Really it’s a matter of what works best for you. But I hope to have helped some of you to devise a strategy for finding which currently is the one most suited to your needs.
Update Jan 17, 2012
I’d like to thank all readers kind enough to leave a comment here. It’s really rewarding to see that one’s writing is of interest and use to others.
I’d also like to stress that the goal of the article was much more to describe a research-and-decide method than to point out one best IDE, inasmuch as “best” in this case is a highly personal concept which reflects the user’s particular needs and tastes. Furthermore, the absence of any particular IDE from the study should NOT be construed as to mean a negative opinion of it. It simply means that I was not aware of its existence — mea culpa mea maxima culpa! — or that it did not seem to be in active development.
Anyway, readers interested in choosing his or her best IDE should by all means include the packages listed in the article PLUS those the most enthusiastic readers mentioned. With millions of developers all over the world, I’m happy to see that all IDEs and editors have a public of their own. Some religions believe that things have souls. I believe that software, in a way, has one too and it gets great comfort when its users display they care about it.
Happy and productive 2012 to all.