Three great weeks... and three great days!

I've been traveling a lot lately. It's been one week in La Coruña and two other weeks at Lisbon. And, well, I've learned a lot.

During these three weeks I've been gently introduced to Sun Java Studio Creator, I've learned a lot about MySQL internals, I've realized how people tend to not follow the KISS principle, I've experienced SwingX components inside NetBeans, I've met great friends at Lisbon and, most importantly, I've realized how much people need a good binding mechanism for Swing applications.

Now it's time to have a rest in Madrid for three days. A rest? Well, we have Java Expo 2006, Sun Tech Days and... the NetBeans World Tour!!

Sun Java Studio Creator... I want one of this for Swing!

A friend of mine was presenting Sun Java Studio Creator 2 at a workshop we presented in Lisbon. I was amazed how easy is to build high quality web applications. Just drag and drop an EJB, a WebService or a RowSet into a Table and you're done. I miss that in Swing, guys. I wish I could just drag and drop data into the NetBeans Form Editor.

Sun Java Studio Creator 2 is, of course, one of the most impressive Swing applications I've ever met. Highly responsive, rock solid, user-friendly way to build applications.

And there's even more. These are a list of things I appreciate in SJS Creator 2:

  • You know what your user HttpSession holds in every page. This is great.
  • Java Beans are automagically mapped to fields using the JSF Expression Language. This is cool because since I always use the Transfer Object J2EE Core Pattern, all my EJBs just transfer Java Beans (Transfer Objects). So mapping these to fields in a web application is just a piece of cake. It seems different people are suggesting having something similar for Swing (see the comments section). I think it's a great idea.
  • You can quickly *see* (visually, I mean) what the navigation between pages is. This is cool. Doing that with Struts based applications is, well, difficult.

MySQL internals are... surprising?

For this workshop at Lisbon we decided to export the data inside the NetBeans bundled PointBase database and import it into MySQL. As clearly stated in MySQL documentation, only InnoDB databases verify foreign key constraints. (Well, and only InnoDB databases provide for ACID transactions). I needed these features for the workshop so I had to reconfigure MySQL in my Debian-like distribution. Good to know.

I also found out that MySQL uses internaly BTrees for indices. This is not very surprising (I was expecting it). Since I've talked about BTrees in JDBM lately I decided to take some screenshots of MySQL BTrees.

MySQL indices

SwingX inside NetBeans... cool!

Another part of the workshop at Lisbon was centered on Swing. Some people asked how custom Swing widgets could be inserted into the NetBeans Form Editor, using the Palette Manager.

So I decided to download SwingX and experiment with it inside NetBeans.

The release I downloaded didn't had many BeanInfos, so I had to build some myself. As you probably know, BeanInfos are used for obtaining information about Java Beans (Swing Components) and are required for presenting Java Beans inside the Form Editor. This is an screenshot of the experiment:

SwingX in NetBeans;

SwingX components are really cool, but there's room for improvement. Here's a quick list of things I'd improve:

  • SwingX is bundled with BeanInfos. There should be two deliverables: one for design time (including icons and BeanInfos) and another for production (without BeanInfos). BeanInfo class files are huge and are not needed at runtime, so there's no need to deliver them. A jar file with BeanInfos may be as big as 1 Mb, another without the BeanInfos is half the size.
  • Calendar is almost internationalized. Since I'm using a spanish locale all the days are presented in my spanish locale, but here in Spain all weeks start on Mondays (and not on Sundays) so presenting a calendar starting on Sundays is, well, confusing.
  • I was greatly impressed with the JTaskPaneContainer and JTaskPane. This component thas a little bit animation when showing/hiding panels. Cool.
  • There're lots of components there. I'd prefer little tiny projects instead of a huge one. Much more versatile.

The "beijo" (kiss) principle

Another friend of mine was having trouble analyzing a J2EE application that had a mix of BMP and CMP entity beans, DAOs and Hibernate. A real nightmare for maintenance. So I decided to help her with a simple DataSource that performs logging of all SQL operations. It seems P6SPY was not working for her, so I decided to build a similar stuff for her. She's testing this during the next week. If everything works as expected I'll try to post this "DataSource logger" in my Attic for all of us to use.

It's funny to see how the KISS principle is still not followed by many people. I'll post on this topic later on.

Meeting old friends in Lisbon

While in Lisbon I met some old friends. Long time since I last met them. These guys and gals are ruling one of the most impressive Computer-Science related Institutes in Spain and Portugal. (As an example: they were doing web services and SOA about five years ago, using Swing rich clients for delivering applications to thousands of users). They're thinking on taking the CMMI stuff.

As far as I can tell they have a very high score in the Joel Test, so I assume they'll get a very high CMMI score too.

These are excellent people I had the pleasure to work with a few years back. We had a good (and tough) time there together. As portuguese people say, "Tenho saudades deles!" (Well, I know they say that but I don't really know if that's correctly written portuguese :-/).

Three days for ... fun!

So I'm having a rest these days (bank holiday in Madrid today). Getting ready for the huge event here in Spain in the next week. We have Java Expo the biggest Java event in Spain, joined with the Sun Tech Days and the NetBeans World Tour. Great!! I'll try to meet interesting people there!

I'll try to blog more often from now on, but take it easy with me. Some tough weeks in the horizon will make me travel again.

Have fun meanwhile and, if you're in Madrid this week, join us at the Java Expo.

Cheers, Antonio

blog comments powered by Disqus