Let's Swing!
A globally warmed, Swing focused blog in the Participation Age.
I've definitely moved this blog to my personal site!

Easy Swing: JDNC is out!!!

viernes junio 25, 2004 | Java Swing | Permalink |

JDNC is out!!!

I can't resist posting. For us Swing lovers JDNC (Java Desktop Network Components) is great news!!!

JDNC will ease our lifes with Swing. A set of components and out-of-the-shelf stuff for Swing.

This is great news for desktop Java. We now have JDIC to ease life in integrating our desktop applications with the desktop environment (Gnome/KDE/Windows) and JDNC to ease life in generating our desktop applications.

JDNC has been released in Open Source mode (LGPL). You can go and fetch it inmediately!

JDNC is work in progress!!!

With release 0.5 you have JNTree, JNTable, JNTreeTable, JNEditor and JNForm, among some other stuff (including different models). Go take a look at the API.

You have the power!

We can drive. We can participate. We can suggest. We can influence. It's an Open Source project at Java.Net that is open to everybody. I'll join in as quickly as I can!

Least Effort, Conway's and Manageability

domingo junio 20, 2004 | Complexity | Permalink | Comentarios [2]

Law of Least Effort

Someone has asked me what I understand by the "Law of Least Effort" or "Law of Minimum Effort". There we go:

When do *you* work better? When are *you* most productive? Is it when stressed? When relaxed?

It seems our brain follows the Law of Least Effort to solve problems. That's probably why we give our best when our brain energy can be focused in a problem, when nothing in the outer world disturbs us.

This status where your brain can concentrate lots of energy in a single problem is usually know as the "flow" or "the zone". This phenomenon is well known among developers, but I think applies well to everybody else! ;-)

As Joel expresses it:

We all know that knowledge workers work best by getting into "flow", also known as being "in the zone", where they are fully concentrated on their work and fully tuned out of their environment.(taken from Joel on Software)

For more on this you might want to take a look at: Undertanding the Psychology of Programming.

Conway's Law

Organizational Pattern: Make sure the organization is compatible with the product architecture.

It seems Conway's Lay is important when you build an architecture or when you reorganize your company.These measures can work to reduce the risk and increase the effectiveness of your enterprise architecture efforts.

I think Conway's Law is just a corollary of the Law of Least Effort. When a company is badly organized, or when the software architecture does not fit the company structure, then tensions arise and you don't allow people to enter "flow". You don't allow them to concentrate. You don't allow them to give their best.

I have seen this myself. I remember a company where the IT department was separated into the Analysts Group, the Database Group and the Development Group. This was a big project. These divisions were well established and could not be changed. We designed an architecture where a group of developers was responsible for dealing with Analysts (thus enforcing communication with them). We made the Database Group responsible for designing and tuning the SQL queries inside our DAOs. Communication within the three groups was boosted. Everybody knew what to do. Law of Minimum Effort. Flow. The project was a success.

Manageability

Managing people and architecturing software systems are dependant things. The Human Factor, the People building the system, are as important as choosing between JDO, EJBQL or Hibernate. Don't just focus on the technical part. See what people thinks and what their skills are. Maximize those. Apply the Law of Minimum Effort.

As Alistair Cockburn (of Use Case Analysis world fame) puts it:

Yet it is clear that social issues affect the software architecture in ways that the good architect takes into account.

Joel, web, Mono and JDIC

viernes junio 18, 2004 | Java Swing | Permalink |

Joel

As soon as I received Joel's email informing me of a new posting about Microsoft and its APIs I rushed into it. It's some time now since I became part of Joel's fans, he's one of my preferred writers on the net!

I must admit I know little about Microsoft Windows, .NET and all that stuff (I gave up after browsing a huge book on Windows API programming in C several years ago) so I trust Joel on the Windows API and Microsoft's situation. After all he has worked for Microsoft in the past and he probably knows about them.

The web trend

I agree with Joel when he states that Microsoft Windows API programming is moving into web development. There's a web trend to do everything web. Even if the web does not fit the users, this is, even if the web is not an optimal architectural decission for the application.

I don't really like web development. Far too complex to do things. You have to take into account cookies, user session timeouts, security, multi-browser support, accesibility, proxy-cache settings, etc. And then you can choose on Struts, the Java Application Framework, JFaces, JSP, servlets and whatever. Just too complex to have a simple form, isn't it?

Things are about to change here, hopefully. Have you noticed the creation of WHAT lately? It's a Mozilla-Opera working group to standardize web development. That's good news!!!

The desktop trend

But I think Joel is missing the Gnome-Linux point of view. Here on the Linux side we don't suffer Microsoft's trap. In fact there's huge activity about desktop programming.

Even Havoc Pennington (ex chair of the board of the Gnome Foundation) talks about desktop development. He wants the Gnome-Linux community to agree upon a desktop language. A High Level language to develop rich-client Gnome applications. On that article he ponders different aspects of Java, Mono and C++.

JDIC

It's easy for me: I have already chosen. I am on the Java side. I have good, sound APIs. APIs for everything. For LDAP, transactions, email, imaging, gaming, 3D Painting, speech. APIs owned by lots of different companies using the Java Community Process. Open APIs. No traps here.

We that have already chosen Java should be happy about the recently announced JDesktop Integration Components. Some components that will allow us to transparently integrate with the desktop. JDIC is Cool Stuff !!.

Life is good: Linux, Java, JDIC, EuroCopa 2004 and a weekend to enjoy!! ;-)

Eclipse-SWT, anyone?

miércoles junio 16, 2004 | Java Swing | Permalink | Comentarios [3]

I should learn some SWT, I assume. It's a fashionable thing. If a customer gets trapped in that maybe I'm assigned to help then in migrating. I should be prepared.

I thought I could make some open-letter asking for help to learn SWT. After all open-letters are fashionable as well. After all swingers are fashionable too ;-)

I've installed one of the Eclipse 3.0rcX releases lately in my laptop. What a memory hog!. Slow (yeah, I'm still running Mandrake 9.1 on one of those PIII 700Mhz :-( ). It crashed several times. Ok, well, anyway, back to SWT...

I didn't find any good tutorials at the Eclipse site. Well, in fact I hardly found the SWT page. It took me several clicks to reach a swt related page. After that you reach the Tutorials page and... all you find is a wiki and some stuff from the University of Manitoba? Since I'm some sort of busy guy, and because Spain is playing the Eurocopa 2004 in Portugal right now, I want to go straight to the point, learn some quick SWT and leave. So there we reach my first question:

Question I: Do you know of any good, free, straight-to-the-point, SWT tutorial?

I didn't find anything about SWT accesibility. You know that your UI should be accesible to people with dissabilities. This is not just a fancy requirement, the fact is that you must be accessible in lots of government related stuff, in lots of different countries. So there goes my second question:

Question II: Does anyone know a good URL for learning SWT accesibility?

Since Spain had already finished playing (Spain I-Greece I, good match, real pity ;-) ) I did some more browsing through the recently found SWT page. And some others. I happened to take a look a the Eclipse build notes here . Now I am astonished there're so many "crash" words in there (more than one hundred). So here comes my third question:

Question III: Does Eclipse/SWT crash that much?

I decided to go for the official sources because the tutorial at University of Manitoba is in PDF, and I don't really like PDF. So I decided to go for the SWT Part 2 here. A little bit outdated since it's 2001. It says you have to dispose things. Lots of things. It talks of images, fonts, and whatever. So here comes my fourth question today:

Question IV: Do you really have to dispose things in SWT?

If you have any good answers to these questions I would be delighted you to email them to me clicking here. You can leave a comment to this blog if you prefer. Thanks in advance

UPDATE: GTK Accesibility

I've found that someone at IBM is working on GTK accesibility. Or should be working on that. Or whatever. The fact is that the bug was assigned to him a little time back (October 2003) and he has been doing little progress. Good luck, mate!


Swing Fonts in Linux II: ScreenShots

miércoles junio 16, 2004 | Java Swing | Permalink | Comentarios [1]

Moazam has asked me to include some screenshots of enhanced fonts in Linux. Click on the image below to see one:

Reduced screenshot. Click to enlarge

So I got the SwingSet2 sources (and resources) from my JDK distribution (demos/jfc/SwingSet2 directory) and modified the AquaTheme quickly. I then set up my JAVA_FONTS environment variable and launched "The Gimp" to grab a screenshot. Fast. The Java code I included in the "AquaTheme.java" file looks like this:

private final FontUIResource userFont = 
  new FontUIResource( new Font( "Tahoma", Font.PLAIN, 12 ) );
private final FontUIResource controlFont = 
  new FontUIResource( new Font( "Tahoma", Font.BOLD, 14 ) );
    
public FontUIResource getUserTextFont() { return userFont; }
public FontUIResource getControlTextFont() { return controlFont; }
// Same for getMenuTextFont, etc.

Swing fonts in Linux

martes junio 15, 2004 | Java Swing | Permalink | Comentarios [2]

Although JDK fonts have improved with time I don't like them that much, I'm afraid. I always prefer bigger fonts. Better for your eyes, I think.

I prefer using some other fonts. For instance Microsoft TrueType fonts. Or even OpenOffice fonts. Many Linux distributions allow you to easily import extra fonts to your desktop.

Once you set up your preferred fonts in your system you can enable them for use in your preferred Java application. Just

export JAVA_FONTS=/usr/X11R6/lib/X11/fonts/Microsoft:/usr/X11R6/lib/X11/fonts/Type1:/path_to_font_directories

before your java command line. And you are all set!

OverPatterning, OverJ2EEing, OverUMLing

lunes junio 14, 2004 | Complexity | Permalink | Comentarios [1]

What I have seen travelling all around and solving customer problems with Java is that when you get confused, or you don't understand, you tend to overdo things.

Take, for instance, design patterns.

There's a clear definition of a pattern by Jim Coplien here.

What I like most of that definition is that it clearly states that a pattern is a proven concept that that solves a problem when the solution is not clear. Patterns include as well hints on when to apply them.

That's great, because it saves you lots of time. You just read the pattern, see if the boundary conditions of your problem are similar to those described and then apply the pattern to solve the problem. You don't have to suffer all the trouble of a bad solution. It's some sort of good recipe that saves you lots of time and money.

I have noticed that people tend to apply *all* the patterns when confused. J2EE patterns, for instance. That's not the goal. You don't have to use *all* patterns all the time. That's what I call overpatterning and, I think, it's origins are confussion.

I have noticed as well that people tend to overdo UML. They usually get stuck in writting UML docs and deliverables and forget about the problem. UML should be seen as a tool to express yourself, to communicate and to document. There's little point in documenting a little-bit of a software-design. You don't usually need the details. A higher level vision is usually enough to be understood. You can let the details for later. There's a nice article titled UML Fever everybody should read. I usually read it and verify I'm not suffering UML fever.

When people gets confused about J2EE they tend to overdo it too. Over J2EE-ing I call it. Then you see architecures that do not fit the problem, such as using web interfaces when rich clients would be a better solution. Or using EJBs for everything, even when not needed at all. You don't need to use *all* J2EE components to build a J2EE compliant application. Rich client applications are J2EE too. Applications without EJBs are J2EE too.

Law of conservation of energy. Law of minimum effort. The KISS principle.

Relax. You don't have to use all the features!

Open-minded

lunes junio 14, 2004 | General | Permalink |

I have been travelling a lot these last years. I have spent two, very nice, years in Portugal, some months in the UK, some others in USA, and several weeks all around Spain.

Travelling is a great learning opportunity if you have a chance to stay longer. On long stays you have time enough to learn the idiosincrasies, learn what people think and why, and how they react to things.

The fact is the more you stay abroad the more open-minded you become.

And the more open-minded you become the better the solutions you give to problems. Both professionally and personally.

And then, as a consequence, the better the solutions you give to problems the longer the customers want you to stay!

It happens to me as well that the more open-minded I get the more radical and fanatical some solutions appear to me. There's lot of open-source, closed-minded people. And as well some closed-source, closed-minded people. Lots. On the following days I'll be posting on this, giving my opinion on why some well-known topics seem to be closed-minded to me. Stay tuned.

Being open-minded is most important to have a good health. Here at Sun there's lots of open-minded people. That's great!. Lots of open-minded, enthusiastic people. Few closed-minded, radical or fanatical people.

A Galician swinger ;-)

jueves junio 10, 2004 | Personal | Permalink | Comentarios [1]

As a native Spanish and Galician speaker I have trouble with english from time to time. It gets worse with slang (and with my age ;-) ).

I've been speaking english for quite a long time now (more than 15 years: I'm getting old); but anyway I get stuck with english from time to time.

As I like Swing decided that Swinger was a good nickname for blogging.

Cool.

Now I happened to do some more research at Google and found the definition not to be as good as expected.

Well, I think it's quite funny. Isn't it? :-D

Impressive SMIL authoring tool

miércoles junio 09, 2004 | Java Swing | Permalink |

Looking for SMIL authoring tools I happened to meet LimSee2. Wow. That's Swing. And it rocks!

About me

martes junio 08, 2004 | Who is this guy, anyway? | Permalink | Comentarios [1]

My name is Antonio Vieiro and I work as a Software Consultant at Sun Microsystems. My base office is in Madrid, Spain, although I usually travel a lot.

As a Software Consultant I help customers to take software solutions to the limit, mainly Java centric software. All sorts of Java flavours: from J2ME to J2EE. And that is fun!

I must admit I'm a swing fan: I love Java Swing. I'm a Swing fanatic. So although I'll be posting about lots of different Java areas I'll focus on Swing. Keep tuned!

Feel free to send me an email.


Categories


Search


Recent entries


Sites I find interesing

Aggregators
Swing focused
Software architecture related @ blogs.sun.com

Calendar

junio 2004 »
lunmarmiéjueviesábdom
 
1
2
3
4
5
6
7
11
12
13
17
19
21
22
23
24
26
27
28
29
30
    
       
Hoy

Navigation


Visits

Locations of visitors to this page