For many years I used a code editor that is now discontinued by its developers, and the introduction of HTML5 and CSS3 led me to look for an editor that supports the new tags and properties. In this article I’ll share the criteria and process I used to find an editor suitable for making quick fixes and a development environment for large-scale projects.
多年以来,我一直使用一个代码编辑器,但现在它的开发人员已停止使用它,而HTML5和CSS3的引入使我寻找支持新标签和属性的编辑器。 在本文中,我将分享用于查找适用于进行快速修复的编辑器和用于大型项目的开发环境的标准和过程。
My initial candidate list contained over 30 popular Linux, Java, Windows and XUL software packages which had at least one stable release after January 1, 2010: Arachnophilia, Bluefish, Bluegriffon, CoffeeCup HTML Editor, Dreamweaver, Eclipse PDT, Emacs, Expression Web, Geany, gedit, HTML-Kit, jEdit, Kate, KDevelop, Komodo Edit, KWrite, Netbeans, Notepad++, Notepad2, OpenBEXI, PHPEdit, PHPEd Pro, PHPStorm, Programmer’s Notepad, PSPad, RadPHP, Scite, SeaMonkey, Vim, WebDev, WebMatrix, and Zend Studio. You can google each program for their specific details.
我最初的候选清单包括30多个流行的Linux,Java,Windows和XUL软件包,这些软件包在2010年1月1日之后至少发布了一个稳定版本:Arachnophilia,Bluefish,Bluegriffon,CoffeeCup HTML编辑器,Dreamweaver,Eclipse PDT,Emacs,Expression Web, Geany,gedit,HTML-Kit,jEdit,Kate,KDevelop,Komodo Edit,KWrite,Netbeans,Notepad ++,Notepad2,OpenBEXI,PHPEdit,PHPEd Pro,PHPStorm,程序员的记事本,PSPad,RadPHP,Scite,SeaMonkey,Vim,WebDev,WebMatrix和Zend Studio。 您可以在每个程序中搜索其特定详细信息。
My usage of HTML/CSS/PHP/JavaScript development require an editor that is capable of making intelligent suggestions and keeping components visually separated by type.
我对HTML / CSS / PHP / JavaScript开发的使用需要一个能够提供智能建议并使组件按类型在视觉上分开的编辑器。
Suggestions can be made through auto-completion, parameter hints, and auto-closing. Auto-completion is the program’s attempt to guess and offer to complete HTML tags, CSS properties, and PHP and JavaScript class, function, and variable names. Parameter hinting is the ability to inform the developer of possible HTML properties and their values, CSS property values, and PHP and JavaScript function arguments. Auto-closing is the ability to add closing HTML tags, parenthesis, braces, and the like.
可以通过自动完成,参数提示和自动关闭来提出建议。 自动完成是程序尝试猜测并提供完整HTML标记,CSS属性以及PHP和JavaScript类,函数以及变量名的尝试。 通过参数提示,可以将可能HTML属性及其值,CSS属性值以及PHP和JavaScript函数参数通知开发人员。 自动关闭功能可以添加关闭HTML标签,括号,花括号等。
Component separation is the coloring of the different types of elements, like tags, functions and variables, on the editor’s screen, often referred to as syntax highlighting. Also helpful is the ability to locate a matching delimiter – parentheses, brackets, and braces – by selecting the opening one or vice-versa.
组件分隔是在编辑器屏幕上不同类型元素(例如标签,函数和变量)的着色,通常称为语法突出显示。 通过选择开头的一个或反之也可以找到匹配的定界符(括号,方括号和大括号),这也很有用。
My first test was to check which of the editors in the original list offer these features out-of-the-box or, at least, with a simple to install module.
我的第一个测试是检查原始列表中的哪些编辑器提供了这些功能,即装即用,或者至少具有易于安装的模块。
I immediately dropped three packages from further investigation: Emacs which required additional files that were difficult to install; OpenBEXI which looks like an interesting concept for web page development but isn’t really a scripting tool; and WebDev which didn’t seem to have a free trial version. I wish I could have tested a very good Mac IDE, Espresso. Their team sent me a lot of useful information and I’d encourage any Mac user to try it out.
我立即从进一步调查中删除了三个软件包:Emacs,它需要安装其他难以安装的文件; OpenBEXI看起来是网页开发中一个有趣的概念,但实际上不是脚本工具; 以及似乎没有免费试用版的WebDev。 我希望我可以测试一个非常好的Mac IDE Espresso。 他们的团队向我发送了许多有用的信息,我鼓励任何Mac用户试用一下。
For each remaining package I checked their hinting and auto-completion abilities for HTML4/5 tags, CSS properties, PHP and JavaScript functions and variables, and syntax highlighting. The following code, saved as a PHP file, was typical of the tests:
对于其余每个程序包,我检查了它们的提示和自动完成功能,包括HTML4 / 5标签,CSS属性,PHP和JavaScript函数和变量以及语法突出显示。 以下代码是典型的测试,另存为PHP文件:
<html> <head> <style> dir { display: none; } </style> <script type="text/javascript"> var aaa = 12; aaa = Math.abs(12); </script> </head> <body> <div style="display: none"></div> <?php $aaa = strtotime(); if (true) { $aaa = strftime("%a"); } ?> </body> </html>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.
专门识别不同的功能(PHP函数自动完成,PHP变量自动完成,JavaScript函数自动完成等),我有13个要求的功能。 我计算了包装和功能的分数; 这是一个“是/否”检查,每个“是”都值得加1分,加上编辑的总分。
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.
最流行的功能是语法突出显示和定界符本地化,以及HTML标签的自动关闭。 最少见的是JavaScript函数的自动完成和参数提示以及JavaScript变量的自动完成。 平均分数是4.8绝对分数或38%相对分数,这意味着平均套餐中所要求的13个功能中有5个没有。 29个包装中有13个高于平均水平。
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.
为了进一步评估,我选择了前25%。 也就是说,以下8个按我的标准(按字母顺序列出)排名最高:Dreamweaver,Geany,Komodo Edit,Netbeans,Nusphere PHPEd,PHPStorm,程序员的记事本和WebMatrix。 有趣的是,其中有四个是免费的(就像免费苏格兰威士忌一样),有四个是付费软件,四个是仅Windows操作系统,其他四个是跨平台的。
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:
第二组测试着眼于以下功能列表:代码段/模板,代码折叠,书签,自动代码格式,集成调试支持,宏支持,重构工具的可用性,项目管理支持,版本控制支持,内置在FTP支持,集成命令行控制台,插件支持,对框架的支持,编辑器自定义,启动时间是否可以接受,文档的可用性和完整性等方面。 同样,重点放在即用型或单击安装的插件上,这是一次YES / NO测试,每个YES得分为1分。 结果是这样的:
Dreamweaver – Scored 70%. Possibly the best known web development IDE, it’s a very powerful tool for the website designer though I find its interface a bit cluttered. It had some sort of code folding, but not what I’d expect. Dreamweaver –得分70%。 可能是最著名的Web开发IDE,它对网站设计人员来说是一个非常强大的工具,尽管我发现它的界面有些混乱。 它具有某种代码折叠功能,但是没有我期望的。 Geany – Scored 62%. It’s modular and highly expandable. It has a very light interface, but lacks proper FTP support. Geany –得分62%。 它是模块化且高度可扩展的。 它的界面非常简洁,但是缺少适当的FTP支持。 Komodo Edit – Scored 54%. A kind of open-source version of Komodo IDE, it was very clean and usable. I found it similar to Geany. Komodo Edit –得分54%。 这是Komodo IDE的一种开源版本,非常干净且可用。 我发现它与Geany类似。 Netbeans – Scored 75%. It was very impressive with lots of features but a clean interface. It takes about 13 seconds to start on my box (Dual Core 2GHz Intel, 2G RAM and Oneric Oncelot with Unity) which I gather is somewhat reasonable for such a complex application. Netbeans –得分75%。 它具有许多功能,但界面简洁,令人印象深刻。 在我的设备(双核2GHz Intel,2G RAM和带有Unity的Oneric Onelot)上启动大约需要13秒钟,对于这样一个复杂的应用程序,我认为这是合理的。Nusphere PHPEd – Scored 67%. A great tool, but with a very cluttered interface. Also, they seem not to like plug-ins very much. I read a forum post where someone asked how to create one and the answer was just “send us your ideas.” This was another NO.
Nusphere PHPEd –得分67%。 一个很棒的工具,但是界面非常混乱。 另外,他们似乎不太喜欢插件。 我读了一个论坛帖子, 有人问如何创建一个 ,答案只是“向我们发送您的想法”。 这是另一个。
PhpStorm – Scored 75%, like NetBeans. In fact, it’s rather what NetBeans would probably look like if it were dedicated to PHP development. It seems to tax the processor a bit more, though. PhpStorm –与NetBeans一样得分75%。 实际上,如果NetBeans专用于PHP开发,那可能就是NetBeans的样子。 不过,这似乎会使处理器负担更多。 Programmer’s Notepad – Scored 46%. But then again, it’s supposed to be a simple, lean, well performing tool. It lives to its promise. It’s a pity that it’s Windows-only, though. 程序员的记事本–得分46%。 但是话又说回来,它应该是一个简单,精益,性能良好的工具。 它兑现了诺言。 可惜的是,它仅适用于Windows。 WebMatrix – For sure, as a free website development tool, Web Matrix looks quite impressive. I did not rate it though as it seemed to be concept different from my idea of programmer’s IDE. WebMatrix –当然,作为一个免费的网站开发工具,Web Matrix看起来非常令人印象深刻。 我没有给它打分,因为它似乎与我的程序员IDE的想法不同。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.
尽管以上所有程序都是用于处理PHP代码的强大程序,但我对Geany和NetBeans感到最高兴。 Geany较轻,功能较少,但可通过社区维护的插件列表的增加来扩展。 NetBeans功能强大,但学习曲线更陡峭,尽管是免费和开源的,但仍由私人维护。 可能我会根据手头的任务使用一个或另一个,并且过一会儿便决定只使用其中一个。
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.
无论如何,在大约三年的时间里,我确定将出现新的IDE,并且其中一些将停止开发。 是时候再进行评论了。
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.
这篇文章写起来很痛苦。 检查列表中的每个程序都是一个令人厌烦的过程,有时令人发指,但仍然令人耳目一新。 经过大量的研究,下载(包括800MB错误!)和检查功能的时间。 我回顾了几年前使用的一些软件包,并发现了一些我从未听说过的软件包。 它为我提供了Linux的存储库系统与Window的安装程序概念之间以及大小与安装复杂性之间的有趣对比,该结构和安装与免费软件无关。 我的桌面上到处都是下载的文件,现在已经删除了很多东西。 但是我有机会按计划搜索需要的物品,这是我以前从未做过的事情。 我从这种经验中得出的结论是,搜索产品或服务应该首先检查大量的简单但必不可少的质量,然后再对通过第一项测试的质量进行细化。 我还学会了抛开偏见。 我从没想过我最终会将NetBeans列入最终名单。
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.
我从来没有打算告诉任何人最好的IDE。 真的,这取决于最适合您的问题。 但是我希望能帮助你们中的一些人制定一项战略,以找到目前最适合您需求的战略。
Update Jan 17, 2012I’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.
更新2012年1月17日,我要感谢所有读者在此发表评论。 看到一个人的写作有趣并为他人所用是一件很有意义的事情。
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.
我还想强调一下,本文的目标不仅仅是描述一种研究和决定方法,也不是指出一个最佳的IDE,因为在这种情况下,“最佳”是一个高度个人化的概念,反映了用户的想法。特殊的需求和品味。 此外,研究中没有任何特定的IDE不应被解释为对它的负面评价。 这只是意味着我不知道它的存在-mea culpa mea maxima culpa! -或它似乎没有在积极发展中。
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.
无论如何,有兴趣选择自己最好的IDE的读者都应该包括文章中列出的软件包以及那些最热心的读者。 全世界有数以百万计的开发人员,我很高兴看到所有IDE和编辑器都有自己的公开对象。 一些宗教认为事物有灵魂。 我相信该软件在某种程度上也有一个,当用户显示他们关心它时,它会变得非常舒适。
Happy and productive 2012 to all.
祝大家2012年快乐,多产。
Image via Zurijeta / Shutterstock
图片来自Zurijeta / Shutterstock
翻译自: https://www.sitepoint.com/how-i-chose-my-programming-editor/