Archive for the 'Technology' Category

This is a comparison?? Eclipse 3.3 or NetBeans 6.0 from JavaWorld

Update: I’m getting quite a few eyes on this posting because of the link from dzone so I wanted to clarify a couple of things. I am referring to the NB project importer that brings Eclipse projects into NetBeans….not the other way around.

Again I want to state that I am not flaming NetBeans ;) I know that people usually have very strong feelings about the environment they use. I am a big fan of the Eclipse/MyEclipse combination. It’s cheap, it offers a lot of functionality, and the support is very good.

I also really like what is happening with NetBeans. 6 is a fantastic release and I wish it fit my workflow better because there are some things that I really like more like the code editor, diff viewer, etc. I think the out of the box experience is far better for NetBeans but I’m already paying for MyEclipse so for me thats where the comparison is most relevant.

——

I saw this link this morning on dzone where the author compares Eclipse and NetBeans with the intention of giving the reader some sort of guidelines as to which environment to choose for development work. Too bad it is just a laundry list of features.

These types of comparisons are really hard to do. You really have to use the products extensively on a real project before you can come to any sort of conclusion and the waters may still be muddy even after that. I’m currently working with both products on a large project and NetBeans still has a way to go before it can compare with Eclipse with MyEclipse (for me). Why?

  • The build process for large projects can be excruciatingly slow.
  • Is there some reason the Eclipse project importer is rewriting my EJB deployment descriptors as EJB 3.0 when they’re EJB 2.1 beans without asking me if that is what I want to do?
  • The CVS support, for those still using CVS, is completely geared toward the branch you’re currently working on. Want to compare some code to another branch? This is easy in Eclipse but apparently not doable in NetBeans.
  • No workspaces. To me this feature is critical because it makes working with various branches of code very easy. I can have totally custom settings for the IDE in the different workspaces as I chose. NetBeans comes closer with Project Groups but it still isn’t quite the same thing.
  • No exploded deployment options for servers other than Glassfish?

You don’t get to these types of things until you start working more in-depth with two products and really start comparing the workflows. Certainly if this is doable by me it’s doable by a journalist.

Don’t get me wrong though as I still really do like NetBeans. Version 6 has a lot going for it and a for an out of the box experience I think it beats Eclipse since Eclipse really requires a lot of extras to get you to the same level. On that note given the cheap price of MyEclipse it is really hard to beat.

NB6: CVS module has no way to compare a file to another branch?

Once again trying out NetBeans and as a long time Eclipse/MyEclipse user I’m pretty frustrated by what seem like limitations but then I’m not sure if it really is a limitation or I’m just not seeing an option somewhere.

In Eclipse and its built-in CVS support you can easily compare a file you’re working on with another branch. This does not seem possible in NetBeans 6 and this is a huge inconvenience. Sure its fine to be able to compare to the server copy of the file in the same branch but when having to work in multiple branches at the same time its nice to be able to see changes between branches. NetBeans only seems to give me the option of switching to another branch or merge from another branch neither of which I want to do. I simply want to see what the differences are between a copy of a file in one branch to another.

Is this possible inside the NetBeans IDE?

NB6: error on “illegal reference to static field” solved

Easy solution (even though it still appears the old way is legal code): move the initializer code into a static method. Instead of:

private static Map byDBValue;

private AssetImporterTypeEnum(String dbvalue) {
this.dbValue = dbvalue;

if (AssetImporterTypeEnum.byDBValue == null) {
AssetImporterTypeEnum.byDBValue = new HashMap();
}

AssetImporterTypeEnum.byDBValue.put(dbvalue, this);
}

We have something more along the lines of:

private static Map byDBValue;

private AssetImporterTypeEnum(String dbvalue) {
this.dbValue = dbvalue;

AssetImporterTypeEnum.init(dbvalue,this);
}

private static void init(String dbvalue, AssetImporterTypeEnum i) {
if (AssetImporterTypeEnum.byDBValue == null) {
AssetImporterTypeEnum.byDBValue = new HashMap();
}

AssetImporterTypeEnum.byDBValue.put(dbvalue, i);
}

The errors magically disappear.

Now, I just hope the code works properly…. :)

NetBeans 6 problem: editor flags error that doesn’t show up in a compile

OK. I’m about to pull my hair out on this one because it’s driving me completely nuts.

Just a bit of background first: I’m giving NetBeans 6 a test run with the current project I’m on to compare it to Eclipse (with the MyEclipse plugins). I keep hearing great things about it and now that I have my projects set up I am noticing a very odd problem that doesn’t happen in Eclipse. We have the following code in one of our enum classes (actually this same pattern is followed in other enums as well):

private static Map byDBValue;

private AssetImporterTypeEnum(String dbvalue) {
this.dbValue = dbvalue;

if (AssetImporterTypeEnum.byDBValue == null) {
AssetImporterTypeEnum.byDBValue = new HashMap();
}

AssetImporterTypeEnum.byDBValue.put(dbvalue, this);
}

The NetBeans editor is flagging the lines that set AssetImporterTypeEnum.byDBValue as an error of type ‘illegal reference to static field from initializer’. From what I can tell this is completely legal code (enums are initialized before any static initializers are run) and the compiler output doesn’t indicate the same error. Actually the compiler output doesn’t indicate any errors. The compile is perfect. I don’t get this error in Eclipse either (neither in the editor or the compiler output)

It’s driving me crazy that I don’t really have errors in the code but the the flag is still showing up both in the editor and in the project tree. Is there some way to change this behavior? Is it a bug (I searched on the bug tracking site for netbeans with no luck)?

Notes on JSP debugging with Weblogic 9.2 and MyEclipse 6

Here are some things I’ve found the last couple of days when trying to get JSP debugging working in MyEclispe 6 and Weblogic 9.2:

  • You don’t need to modify the weblogic.xml file
    I messed around with the settings here and took them out and debugging still worked.
  • There is an undocumented debug tag in the jsp-descriptor section of weblogic.xml. Looking at the docs it is undocumented.
    The file is checked on load to make sure there aren’t invalid tags there. debug isn’t marked as invalid.
  • Apparently JSP debug information is controlled by the session-descriptor tag and its parameter debug-enabled.
    I determined this by looking at how the weblogic.xml file was affected by changing the JSP debug flag in the administration console. The documentation really doesn’t shed much light on this.

Now, all of that being said, I don’t have any of those items in my weblogic.xml for my web application and JSP debugging still works.

Wow…huge news…Sun hires Jython lead

Was buried in work yesterday and missed this one. Huge news for the Jython community. That along with Tor’s news in the Java Posse podcast that he would start working on another language in NetBeans soon would probably mean Python support coming to NetBeans.

Ruby support really kicks ass in NB. That level of Python support would just be huge.

Wait..Rails isn’t perfect? or Ruby: land o’ web frameworks

And people complain that Java has too many web frameworks…. Now we hear of yet another web framework for Ruby. There is Rails, Merb, Camping, Waves, and I assume others. Funny how the Ruby space is becoming so crowded with web frameworks. And here I always thought Rails was perfect but this guy says in the interview that he was running up against limitations of Rails. I could swear Rails was going to solve everything….

Mercurial and merging branches

I’ve been reading the Hg book today and have found that merging between branches is a much different operation than with CVS or Subversion and much easier. I’m really glad to see this and want to take an even better look at Mercurial by using it a bit. Maybe thats why Tor didn’t talk about it at all in the Posse podcast…there really isn’t much to it ;)

Java Posse on SVN and Mercurial

So the guys were discussing version control systems and Joe was talking about SVN. Tor was talking about Mercurial. The only thing they were talking about was stuff that, quite frankly, really doesn’t matter all that much because any revision control system is going to allow check-ins, etc. Obviously thats the point ;) Joe wonders how dangerous is it to use Mercurial since you’re not checking in to a central repository. You might lose something! Joe…just a note that the same thing is true of SVN if you don’t bother checking in your code ;)
But all this really doesn’t get to what I think is the most important point: what is the merge model like in Mercurial? In SVN when you are merging changes from branch to branch (and in branches I’m including trunk) you have to be really careful with making sure you’re getting the revision numbers right. This is no better than CVS. Sure SVN does most things better than CVS but in this important case it does nothing to make the process better.

I have yet to read about how merging happens in Mercurial. I wonder if you have to track revision numbers as in SVN.

At work we’re looking at Accurev which has a pretty smart model for merging changes. Obviously any merge is going to require some careful checking when you have multiple changes from multiple people to the same area of code but Accurev makes the rest of the process much easier. They use the idea of streams, which are sort of a combination of an SVN branch with workflow attached, and when you merge code you are promoting it to streams higher in the hierarchy. You still have to worry about overlapping code areas, no way around that, but you don’t have to worry about tracking revision numbers.

Now if we could finally get off of CVS…. ;)

Mediamonkey how I could have loved you…

Wow. I really wanted to love Mediamonkey. Actually I do love Mediamonkey because it’s a damn fine piece of software. There are some warts like the fact that the newest version, 3.0, has a link to the Yahoo Podcast directory when that service was discontinued back in October of 2007. That is a minor thing though.

The biggest wart, and the reason I can’t use the software, is the iPod syncing. It “works” but there are glitches all of the time like artwork not being set properly for albums (I had Benny Goodman looking out at me from a Telemann piece for instance). The iPod “fast scroll” feature where you get the letter of the alphabet pop up when you are scanning quickly through the playlist doesn’t work right because for whatever reason when Mediamonkey syncs it isn’t making the iPod ignore “The” in band names. I get no indication that the iTunes-purchased song I just synced won’t actually play back on the iPod. It will play back just fine in Mediamonkey itself however.

So, even with all of the great features that Mediamonkey has, I’m heading back to iTunes simply because it works better with my iPod and that is just more important to me because my music collection isn’t big enough to bog down iTunes. If the Mediamonkey guys could fix that stuff I’d pay for it in a heartbeat but that day hasn’t arrived yet ;)

« Previous PageNext Page »