Fog Creek Software
Discussion Board




Java. Good for client apps?

Hi,

I am about to embark on writing a database app in Java using swing on the client.

Are there any pitfalls I should be aware of e.g. JDBC etc..
or is java a joy to use.

I am looking to the future and I see that Cross platform apps will become very important as more companies switch to linux to save money.

And that basically cuts out .NET at the moment. (I am aware of the mono project, but I am not confident that microsoft will allow it fully i.e. windows forms ).


Is java still a sound tool to invest time and money into?

Mike
Wednesday, January 01, 2003

Java is great for database connectivity. But I still get turned off by swing guis. I guess it does depend on how complex your interface is though, and how much time is spent with it? Is it for config and setup only, or is it for day to day use?

I guess Python + WxWindows could be an option. Delphi/Kylix could be an option too if you got the money.

Eric DeBois
Wednesday, January 01, 2003

Java is good for enterprise consultants. If you're doing client apps python/wxwindows is simple and fast to develop in. The enduser doesn't care what the app is written in.


Wednesday, January 01, 2003

The app will be day to day use, for my company and our customers.

Mike
Thursday, January 02, 2003

Well, it has been done, but be prepared for a certain amount of dissapointment. Why dont you download some free java swing apps and see for yourself?

Eric DeBois
Thursday, January 02, 2003

I develop a massive, shrink-wrapped client-side Swing Java application. I don't like Swing much, but if you spend the time to tweak it, performance is not a big issue. Ugliness can be fixed with a nice look and feel.

So far nobody has complained about being moved from a native Windows version to a Java Swing version. In fact, the Java version is faster, mostly due to internal changes, better file formats, and things like that.  The Mac users that can now run our software especially don't complain.

Super
Thursday, January 02, 2003

"The Mac users that can now run our software especially don't complain. "

Wow! Cool!

In the days we did Java, the Mac platform had both the most demanding users ("Is this a Microsoft program? This is not how we do things on the Mac!"), and was the most difficult to program for due to especially poor JVM's.

Just me (Sir to you)
Thursday, January 02, 2003

I've always kept this link in mind for mac dev using Swing, since I'm not much of a mac user:
http://www.macdevcenter.com/pub/a/mac/2002/09/06/osx_java.html

I agree that the orig poster should just dl a few Swing apps and see.  In particular, is mem usage important?  And I notice that under stressful situations, like 7 apps being open and the Swing program being up for a while, the Swing app becomes noticably less responsive until used for a while.

Tj
Thursday, January 02, 2003

You may want to check out the Eclipse project at http://www.eclipse.org.  It is a complete IDE for java, but they have also implemented a much faster set of UI components than either Swing or AWT.  The UI packages are JFace and SWT. 

Here is a link to the latest documentation so you can read more about it:  http://dev.eclipse.org:8080/help/help.jsp

I personally haven't written any UI apps using this framework, but I plan to as they seem much better than what Java provides by default.

Good luck.

Tom Davies
Thursday, January 02, 2003

I haven't seen too many Java client apps that ever got much use.

pb
Thursday, January 02, 2003

in reply to those that mentioned Python+WxWindows, there's also PyQT, which has a lot of the same advantages.

Alex Russell
Thursday, January 02, 2003

I am intrigued by the SWT for Java.  But it seems like if you deploy an app that uses SWT, you also have to deploy the specific SWT library written for the underlying OS.  That might be acceptable for an in-house application, but could be a problem if you are distributing an app over the Internet.  How do you deal with the cross-platform deployment issues with SWT?  Or is it not an issue?

T. Norman
Friday, January 03, 2003

T.Norman,

I too realize that is a potential issue.... but I don't think it is a show stopper.  It would probably just require a bit more creative project building and deploying procedures. 

Now, I don't really know the specifics, but since eclipse is open source and they use Ant, they may have already performed the majority of the work in terms of building for the different platforms.  I do know in the brief bit of documentation I read they do provide examples of building your own app using SWT without building it on top of Eclipse.  Unfortunately I have yet to read it :)

Tom Davies
Friday, January 03, 2003

I read the docs on the eclipse.org site and it wasn't clear how an app with SWT is to be deployed ... whether it requires the end-user to have the appropriate SWT library for their OS already on their system, or whether it is only necessary to bundle the various flavors of the library along with your app and the SWT will automatically use the correct one based on the OS, or the user will have to specify which one based on a command-line parameter, or whether you have to code anything differently to account for the different libraries.

If it is as simple as bundling the various flavors with your app, that shouldn't be a problem.  But unless it is an in-house app where you have some control over the configuration of the users' machines, the other options could be quite problematic.

T. Norman
Saturday, January 04, 2003

I've bundled the jre with a Java app.  The team didn't want to see why their code wouldn't run on jdk1.4, so I just ended up bundling it in the app's dir.  No system-wide installation needed.  And plus I'm not a great fan of dependencies, though in this case the team would have really benefitted from writing code portable across versions...

Granted, you're talking about Eclipse, but Sun gives this feeling that things need to be installed system-wide.

anon
Saturday, January 04, 2003

I found out more about the SWT.  It turns out that you have to bundle the native SWT library with the Java classes of your application, and the user has to ensure that the library is in the system's path.  For Windows it is a dll, for Linux it is a shared library.

T. Norman
Sunday, January 05, 2003

Thanks for the update T. Norman.  That is good to know.

Tom Davies
Monday, January 06, 2003

*  Recent Topics

*  Fog Creek Home