Friday, November 30, 2007

Third party swing components

I've been blogging about Java IDEs for quite some time, and i thought of taking a different route this time and hence this topic.

I've been working with java swing for a long time. I remember the days, where i use to struggle a lot to design a decent swing application. Then i managed to learn some techinques to come up with some decent, if not great design. Those were the days when NetBeans GUI builder was not there.
Then NetBeans came and made swing development a breeze.

Though NetBeans made it very easy to design swing apps, the swing component suite remains the same and hasn't evolved much. You are left with the basic components like label, textfield, scrollpane, table, tree etc. Though these components are sufficient for most of the applications and swing itself is very much extensible, creating components that meets your need is not impossible.

But who want to invest and develop things like date chooser or tree table, which is needed by even the smallest of the applications?. Thank God, there are legions of third party components available and many are open source (that's the beauty of java). There is swingx (tons of components), l2fprod, jcalendar, jfreechart, jide etc. And if one takes "look and feel" providers as well then there is jgoodies, substance (improving day by day), liquidlnf (we use it in some of our projects), synthetica and so on...

But wait!!! which one should i choose? Which integrates better with my application, with other components? Are they consistent across different look and feels?

I've been using components like jcalendar, jfreechart for a while and i can say that, they have worked very well so far.
I've been exploring swingx for quite some time and i'm really impressed with the component suite it boasts now. (But i wonder, whether swingx has a stable release yet or not. Whenever i go to swinglabs.org/downloads, i find only milestones and weekly builds. So i'm afraid that i may end up using unstable components. But i really like their components, especially the sortable table/treetable. We spend so much of time in providing sortable functionality to our JTables ):

I've used look and feels provided by jgoodies, substance and liquidlnf. Among the three, i prefer jgoodies for their clean and professional look. But we are using liquidlnf in quite a number of projects. Substance is really amazing, but i couldn't use it because our applications are mostly for business users, so we don't want all those cool effects and themes. But i'm really looking forward to use substance in our upcoming projects because substance now provides some cool themse like "SubstanceBusinessBlueSteel" etc.

Of late, i've been exploring JIDE swing suite and i was amazed at their vast component suite and quality.
You can even design an application as complex as an IDE, using JIDE components. Amazing!!!
You should see their demo applications which mocks visual studio and msword. It was very realistic. Great work!!
They even have a code editor component, which looks exactly like Intellij IDEA's code editor.
(Does IDEA use jide components?)

Even more shocking was the fact that some of the JIDE components are open sourced. I explored their open source component suite and though they are basic, they provide great functionality (like searchable table, searchable bar)
I'm really looking forward to use some of their open source components (their commericial components are bit expensive, but i think they are worth of it)

Do you use any third party swing components? If yes, can you share your experience?

Saturday, November 17, 2007

Eclipse 3.3 - Initial impressions

In my last blog entry, i wrote an article about the best features in NetBeans 6.0.

This entry explains the initial impressions i had with Eclipse 3.3 (Europa)

I've always heard people saying that eclipse editor is superior to netbeans. I was very curious to find out how.

I don't know whether these features are available in eclipse for a long time (as i'm a intellij idea/netbeans user). But these are the things that impressed me a lot.

1. Much intuitive syntax colouring. Eclipse stands out from netbeans here. I don't think the default syntax colours in netbeans is great, though we can configure it. For example the colours chosen by eclipse to "Mark occurences" and to "highlight braces" are clearly eye-friendly than the netbeans colours.

2. Lots and lots of code navigation options. Wow! it's really amazing. Now i can understand why eclipse users feel proud about their ide.
I really like the "navigate java elements - CTRL+SHIFT+UP/DOWN" option. This is one feature which i like very much in intellij idea and missed a lot in netbeans. I made a lot of requests in netbeans user mailing lists to add this feature but till now i don't have that feature in netbeans :-(.

3. Very good "surround with" options. Eclipse simply offers a lot of options to surround your code with. Though intellij idea has supported this feature for a longggggg time, it's nice to see that in eclipse.
Netbeans also has "surround with" options but i have a small complaint there. That is sometimes when i select a particular block of code and choose the surround with try catch option, it surrounds the entire piece of code inside the method (not just the selected block).

4. Lightning fast code completion. Hats off to eclipse here. The code completion is really really fast. (Netbeans guys, you still need to improve. Though 6.0 has reasonably faster code completion than 5.5, it's not as fast as eclipse )-:

5. More options while creating a java class. Eclipse provides a lot of options while creating a java class. I would like to mention a few here:
- Options to declare a class as abstract/final
- Options to declare class access modifiers (public/default)
- Option to extend a super class
- Option to declare the list of interfaces the class shall implement.

Some might argue that these options make the class generation wizard a bit more complex to look nevertheless, it looks like a very useful feature to me.

6. Local history is just a right click from the editor window.

7. Improved servlets/jsp support. (Disclaimer: I didn't spend much time investigating this, but i read an article which explained the improvements done in the web tools platform project)


But i found somethings which didn't look intuitive to me:

- Running a project/class is not as simple as "right click the project/class, click run". There might be some valid reason for this, but for me, it looks a bit more complex than it need to be.

- There are no menu items (atleast to my understanding) to stop a project which is running. (Yes, i have a small stop button in the run window itself, but trust me, it took me nearly half an hour to figure that out)-:

But overall, i think Eclipse 3.3 is a great product and i'm very much interested in exploring it further.

I also found onething that might amuse netbeans users...(i'm a loyal netbeans user as well :-)

Netbeans is really catching up fast with eclipse in terms of pure java editing. Eclipse users, beware!!!!

I missed only a few (but very very useful)-: features in eclipse that don't have a equivalent in netbeans.
I hope netbeans developers will take note of this and improve netbeans further.

As a java developer, i thank both the eclipse and netbeans teams for giving away world class products with amazing quality free of cost. Thank you so much.............

(Note:
If anybody know a visual source safe plugin for netbeans/eclipse, please let me know, because if i don't find anything i'm planning to develop that on my own :->> )

Friday, November 9, 2007

Best feature in NetBeans 6.0

You might have heard tons of information about NetBeans 6.0 in recent days.

I'm using NetBeans 6.0 Beta 2 for almost 2 weeks now for some of my development activities.
Though it had lots of new features available, the new refactoring is the feature which impressed me the most.
(Note: So far, I have used the ide for Java SE projects only)

Refactoring in NetBeans 5.5 is good, but in 6.0 it's outstanding, i must admit.

I heard that refactoring has been improved in 6.0, but i didn't spend time reading what were the improvements.
So when i first pressed the shortcut key to refactor a local variable, it highlighted all the occurrence of the variable in blue and when i started to change the variable name in one place, all the highlighted occurrences were changed simultaneously. This is really excellent!!!


Figure 1: All the occurrence to be refactored are highlighted.

Now when i start changing it, all the highlighted occurences change simultaneously.



Figure 2: All occurences change simultaneously

This is the view after refactoring is done.


Figure 3: View after refactoring

Great, isn't it?

I was even more impressed when i stumbled across one more astonishing refactoring feature....

This time, i wanted to change a method name used in more than one class and what better than the netbeans refactoring?

I want to change a method name "getAESEncryptedText" to "getEncryptedText", but this method is referred in more than one class. So when i pressed "CTRL + R", this is what i got.


Figure 4: Refactor dialog


I wanted to have a preview of the places where this change will be effected. This is the preview offered by the ide:


Figure 5: Refactoring preview

That is outstanding. You can see exactly how the refactored code will look like in the preview pane.

I was thrilled by this offering from netbeans.

Now i'm motivated to compare the refactoring module offered by netbeans and eclipse.

Interesting times ahead for the developers....