I’ve seen nWire announcing their plugin on some blogs and they offer a free trial for it. Since I’m a Eclipse PDT userette I wanted to give it a testdrive. Here we go:
The Setup went flawlessly. I choose the URL method. As with most Eclipse Plugins, this works well.
After starting up I needed to activate the trial. Then I was asked to apply the nWire Nature to Projects. I took the proposed option (to do so) and then nWire started to analyze the currently opened and active project. You should take your time for that. I had it running on a bigger wordpress project shared on a fileserver. This took some time. Technically it was possible to do some edits, but one action is blocking the others in Eclipse as you might know. So I could not for example to a SVN update while nWire was analyzing. I suggest for a starter it is advisable to use it on a smaller Project first.
To give you an Image: For a WordPress based project this took about 5 minutes. Problem was that I had multiple projects of that size opened, incl. the whole testsuite. Bad Idea. So I canceled the rest of the analyze progress which did work for me.
When you use nWire later on in practice, you’ll realize that when you open projects, that nWire will scan that project first. This hinders you to edit the code fast right away.
For some action I needed to press one of two buttons (ctrl+4 and ctrl+5) were given as hotkey while starting up, both will open the nWire Navigator. So no Eclipse perspective to look for. So now were ready to go.
Scenario one: Find where the file get’s included
I was refactoring a plugin which contained of multiple files. It was part of a whole set of plugins from one vendor which added a lot of admin pages so I wanted to know where that file was included. On the nWire website it was announced that this is something what nWire is able to do. But no time for winners here, it just failed. I did not return any include points to the current file.
So I went into a second project and tried it there. In there it worked. I guess this is just related to the fact that nWire is not clever enough to find out about inclusions that are done with magic constants.
Scenario two: Find where the class is being used.
Since I was not able to find the points where the file actually gets included I choosed an alternative method: Looking for the use of the class. Luckily in this case, the class is used statically and PHP 4 compatible. That means it should be no problem at all to find every point of use by the classe’s name. I had three classes to dig for. A perfect scenario for the “Search in Navigator” functionality. Let’s call them classOne, classTwo and classThree. ClassOne was not found. Hmm, that does not look properly. So I threw a test by doing a DLTK based PHP code search for that class and voila all 33 places where it was used were found. Looks like nWire is not using the built in DLTK engine, but I have no insight. Two more classes to search for
Feelings while using.
First of all this looks nice. Half ready but nice. The animations of the UI are flawlessly, everything scrolls and moves very naturally. But you feel that the touchup is missing. Some functionality is in but you miss right-mouse menus, a doubleclick does not work everywhere and that stuff.
But not only on the UI side this is half-ready. For example, even the DLTK in PDT can find you the definition of a function fast. In the “Visualization View” it does not offer any way to navigate to the definition for example. Excludes from buildpath are not reflected by the nWire analyzer which I think is a no-go. Those user-settings should be properly reflected. Overall it does not look like that nWire is using the DLTK for it’s PHP plugin which I think is not that clever.
Then in Navigator, you can not collapse the entries you’re not interested in. Next to this, you do not get any kind of back/forward navigation which is something I like in eclipse in general. The visual view has such a way to navigate by the way. Also it’s possible to create an endless line-up by creating self-references.
Some minor Issue:
- Using the Eclipse Outline to navigate to a function is not reflected by nWire Navigator as long as the Editor get’s the Focus again.
Let’s do not overcritices that like I tend to do. So here is the nice Stuff:
- Responsive, the Navigator works well on the location it analyzed.
- Link with Editor does play well.
- Tooltips show filenames in a nice way.
- That nice display goes for filenames as well.
- Animations are unobtrusive
nWire for PHP is somewhat usable but you feel that it’s not a that ready, commercial grade Eclipse plugin. Well it’s pretty fair priced what I really like, I love the MyEclipse approach. I really like tools that do help me doing my work and nWire by concept might be one to consider. But for the scenarios I tested it, this thingy did fail too often technically. I know that some things will never work, like guessing invokes on dynamic classnames or so. And there won’t be any way to analyze eval code – nWire is not a debugger. So the first scenario is not that fair. But for class usage and function invokes it did fail on things that are technically possible and already available in eclipse PDT. Next to this it did not reflect the exude path for the project which it really should. What I like is that the software reflect PHPDOC hints. That’s something really helpful. Would be great if it becomes able to not only reflect @return and @var but @global as well.
For whom this is to use right away? I think this software makes sense in projects which are object oriented and which do have a somehow quality controlled coding style in there. So it’s nice for a quick visualization when you write complex class constructs and you’d like to see the structure after some hours of heavy coding.
Overall I think a really useful usage is limited when you work in a single project in your development environment only. I have plenty of projects and instances of software projects I dip my finger in and it took weeks until nWire finally analysed all projects. It takes a long time for a project analysis with is a major downturn and which limits nWires usage drastically. But when you only got one project that get’s incrementally analysed all over again, this should not be a problem.
For me it’s a plugin I’ll remove after this 14 day review. I know how to deal with the built-in DLTK search and it pretty much does everything that nWire does as well – in a faster way but not that accessible. But since the analyzing turndown puts the breaks on my daily development work I can live with that.
Reference: nWire PHP Eclipse Plugin