Site icon Acaducate

IDE vs Text Editor : Benefits of using an IDE like NetBeans

I always wanted to write this up after noticing numerous people struggling to work on enterprise level applications in a terminal or in a simple Text Editor.

Although nowadays the text editor scene has changed a lot with them getting advanced as the likes of Sublime, Atom or Brackets, and these are pluggable as well, so community is working to add the missing features.

But even after that, I still prefer an IDE for full blown development as it provides me everything at one place. My choice of IDE right now (and since last two years) is NetBeans. It can be downloaded from here. I finally chose it after struggling with performance issues on Eclipse and Zend Studio.

I am a PHP programmer and have benefited a lot from below enlisted features provided by NetBeans IDE:

  1. Auto-complete
  2. Click to follow
  3. Word Completion
  4. Context Menu Integrations
  5. Snippets
  6. Theming
  7. Debugging
  8. Version Control Integration
  9. Clean and feature filled Search interface
  10. Everything at one place
  11. Other Features at a glance

1. Auto-complete

Now this is something that will top the list of any feature that the IDE gives you. I myself used an IDE in the initial days just for this feature.

An Auto-completer that comes with such an IDE is a comprehensive, project wide auto-completer out of the box, unlike the in-file auto-completion provided by Text Editors. It scans all your project files and actually understands the language that you are coding in.

It suggests you the type, function, method, property and almost anything that you want.

Here is an example video, which shows NetBeans excelling in PHP, CSS, JS and HTML auto-completion:

 

If you see the video you will notice that it even suggests the CSS selectors that you have in your project, for HTML tags. Now how cool is that!.

 

2. Click to follow

New to a project which already had been in the development from quite sometime? You don’t know what libraries are being used, what is the source of the code. Then this feature will come in handy for you.

You can hover over a method, variable, object etc while pressing “Ctrl” and see where is it coming from. “Click + Ctrl” to go to the definition. This is really helpful if you are working with Open Source Technologies, as browsing through the source code becomes easy and efficient.

Afraid of getting lost in the myriad of code? Worry not you can come back to your initial position by “Alr + left arrow”

You can quickly jump to a method, variable declaration etc and can even see the documentation.

 

3. Word Completion

This is different from Auto Completion. I am not sure if any other editors have this feature, but NetBeans has a very handy feature, using which you can press “Ctrl + k” and it will complete the word for you.

Now this word can be anything from a variable name, array index. It saves a lot of typing and typos, as you can be sure that you are getting the same word throughout your code(the way you wrote it).

 

4. Context Menu Integrations

This is again a very convenient feature. NetBeans can add one of your favorite utility programs right into the context menu. Just go to Tools > Options > PHP and configure all the tools that you want.

Do you see Code Coverage, Npm install, Generate Documentation and Composer? All these and many more items can be added to the list.

5. Snippets

Yes, you can reuse a set of lines of code that you want again and again with ease by creating a Snippet (Template) for it. This can be configured through Tools > Options > Editor > Code Templates.

The template functionality helps you quickly write down bits of code that you write again and again.

Pallete is another feature which is even more advanced as it lets you add dynamic snippets. Dynamic snippets are the snippets that you can configure every time you use them.

6. Theming

Some people don’t use a particular tool because they don’t like the look and feel of it. But with NetBeans you can change almost every aspect of it. Apart from selecting how the syntax coloring will be, you can even control how the windows look like.

In my screen-shots, you can see that I use a darker theme that is different from the default theme.

You can change UI theme by going to “Tools > Options > Fonts and Color” and “Tools > Options > Appearance”

7. Debugging

Usually, this is where IDEs excel and NetBeans is no exception. It provides all the debugging tools that a coder needs. I believe that Debugging is a great learning experience as you get to see step by step where you went wrong and can be careful in future.

If you are using PHP, you just need to setup xdebug(enable the php extension) and then you are ready to debug your code.

Standalone scripts can be debugged directly without special effort if you have xdebug installed. For debugging web applications you will need to send an IDE_KEY in the request(through cookies or request parameters).

This will greatly help you in finding those bugs in the code or logic.

8. Version Control Integration

You can configure all the major VCS client right inside the IDE, you get a full fledged GUI from where you can work with your versions pretty easily.

When I started with Git, this proved to be a boon as I didn’t have to remember the command line instruction and you have options for almost every thing.

One feature that comes with the VCS clients in NetBeans is change highligting. In the Editor Window, you can see all the places where you have changed your code (usually with a green/blue/red highlight for new/modified/removed).  This is a great feature in my opinion, as you can quickly detect what line of code has been changed by you and can also quickly revert to the previous code.

Check out the video for a glimpse of what all is possible with the built-in git client and the change highlighting feature:

The video shows change highlighting, easy change traversal, quick code revert and annotations(see who committed a specific line).

9. Clean and feature filled Search interface

Searching in NetBeans is very efficient. You can search in the current project, selected directory or file, search only within selected files and all that pretty easy.

It supports regular expression while searching.

Although these features are available in almost every text editor as well, but the way NetBeans presents it looks particularly clean to me.

Each search that you do is separate in new tab;

The search panel gives you a wide range of options which are directly visible and easy to use.

 

10. Everything at one place

Ok think of the things that you usually need when you are developing.

  1. An Editor
  2. A version control client
  3. An issue tracker
  4. Frequent access to terminal
  5. A database client

#1 and #2 we have already discussed above but it has the other 3 built-in as well.

Here is a glimpse of these functions:

The image might feel overwhelming, but this is just for illustration, you will not be using it with everything open like this.

11. Other Features at a glance

There is a huge list of features that such an IDE might provide I am listing down some of the other features that I like:

  1. Brace Matching : you get to see where a bracket closes with a highlight and can also quickly go to the matching brace by pressing “Ctrl + [“
  2. Brace/Tag start Preview : Sometime you wish to know where where did a particular tag and Brace closing had started. You can just click on the ending tag/Brace and see NetBeans show up a small preview of where it started if your code between the tag/brace doesn’t fit into the screen.
  3. Plugins : Plugins can add rich functionality to your IDE. Some of the plugins I use in NetBeans are:
    1. Zen Coding
    2. Cool Editor actions
    3. Quick Opener
    4. Terminal Extras
  4. Documentation support : If you have well document code an IDE will make use of it and will show it to you(usually when you hover over it with “Ctrl” pressed. This can save you a lot of time searching for what the particular Class/Object/Method is, you get the answer right here in the editor. This speeds up your work and also helps you in learning the language you are working with.
  5. Errors and Warnings : If enabled the IDE will notify syntax errors and will also give warnings like unused variables, too much nesting, lengthy code blocks etc.

There are still a lot more useful features which you can figure out once you start exploring the IDE.So, if you are a web developer who uses PHP then,based on my great experience, I would strongly recommend that you try NetBeans-especially because it is free and won’t cost you anything to try :).

That’s all for today folks! Hope that this helped you guys.

Exit mobile version