views:

136

answers:

5

I've been writing software in Java for many years now, but it was always for internal applications that would be deployed to a server. I'd like to get into writing desktop applications now but I don't know where to start. I've written a few Java/Swing applications but again they were for internal use.

My understanding is that Java and other semi-compiled and interpreted languages are too easy to reverse engineer, making them unsuitable for commercial software. I am aware that there are compilers for Java and some other interpreted language, but I've also heard that they are pricey and/or unreliable.

Assuming I start a microISV and wish to develop and sell applications to a broad audience, what's my best bet? I would prefer something that can be written close to once, and compiled for different operating systems but I am not opposed to .NET and a Windows-only audience if other languages would compromise the experience (installation ease & user experience) in Windows. My only issue there is that I don't have a large starting budget and paying out the wazoo for the required development tools is not really in the cards.

A: 

Well, if you're trying to be an Independent Service Vendor -- and not a Software Vendor -- then in a sense it doesn't matter if you use a language like Java which can be decompiled. Because you'd be selling yourself as the best person to integrate and customize the software for your clients. The software is the delivery mechanism for the thing that will actually make you the money: you and your skills. Plenty of companies make a profit by giving away their software for free and contracting their services to set it up for their clients. You can mitigate the Java decompiling issue somewhat by using an obfuscator, but it's kind of fighting the wrong battle.

If you intent to make your money selling software and not service, then Java would be a relatively risky route to take.

It all depends on your business plan.

Shaggy Frog
Selling a service seems no different to me than working a regular job for a traditional employer.
Wal
A: 

If you are starting a one-man company, then you are selling your personal expertise. So the language you use must be the one (or maybe two) that you are most familiar with and expert in. I'm surprised you felt it necessary to ask this.

anon
Since I intend to sell a program rather than support, I'd prefer it if some kid who googled "Java Decompiler" couldn't compete against me after I've done all the work.
Wal
@Wal Code has no value these days, and can always be ripped off. Business knowledge in the market you are addressing does.
anon
@Neil Since ISVs target niches, and if repeat business for a particular application is not applicable, I don't see how anything but source code is of value. Besides marketing, word of mouth, etc. If two vendors sell the exact same code with two different names, how would a consumer know that vendor A has the business knowledge while B is a thief?
Wal
@Wal Good luck selling a program. I've tried to do this in the past and made perhaps $3000 or so. Selling my expertise has made me vastly more money, though admittedly not at present :-( And any sensible buyer will know the difference between the originator and the thief. In over 30 years in the business I've never come across an instance of stolen code, where a thief could make a proffit.
anon
@Neil There's no saying you can't do both with a single piece of software. I've contributed to several open source projects and I love open source software. However, I have a utility application that doesn't require support or training of any kind, and I don't see how offering up my source code to everybody will help me as I attempt to make a meager living.
Wal
@Wal I have a utility too - see http://code.google.com/p/csvfix. The point is that anyone could write this - it just so happened I did. If there is any value in it (which is arguable) it is in the idea, not the code.
anon
@Neil In my experience ideas are worthless; few people pursue all but the lowest hanging fruit. That's why even something which several people describe as basic, such as not giving out the source code to your commercial application, seems to deter most thieves.
Wal
@Wal We will have to agree to disagree then.
anon
@Neil That's fine... but I wish more people would have answered my questions rather than judging my business model.
Wal
@Wal Well, to address that, write in C++ - free high-quality compilers available on all platforms - for example http://tdragon.net/recentgcc. Also, the code generated cannot realistically be uncompiled.
anon
+3  A: 

Why would people want to reverse engineer your software? They might pirate it, but you can't prevent pirating no matter what language you use. I doubt you have a top-secret algorithm that you're trying to hide either, in which case reverse-engineering might be an issue.

You should go with whatever you know best, and Java can work just fine.

If you are intent on switching to another language, I recommend taking a look at Qt. Qt is a free and open-source cross-platform toolkit for C++ that allows you to write applications in that will compile and run on Windows, Mac, and Linux with minimal effort. You CAN write commercial software for free with Qt with its LGPL license.

Edit: GCJ compiles Java to native code, but only supports Java 1.4.

erjiang
I'm surprised that everybody thus far is absolutely dismissing the value of source code. What's the point of writing a program from scratch if one could go out and find a competing program they like and reverse engineer the difficult parts?
Wal
Source code is the least valuable part of any business.
bmargulies
@bmargulies I agree with that statement. However, source code is the most valuable part of a particular application.
Wal
I think the issue here isn't that we're not concerned with source code, but that you're overestimating the risk of reverse-engineering source code. Have you ever tried using one of those Java decompilers on your own application?
erjiang
To clarify, in my mind, your software's worth probably isn't the top-secret algorithms (which I doubt you have), it's the time you put into combining elements into something usable and useful. That time-value isn't something that can be stolen so easily with a decompiler. I think anybody with the skills to reverse-engineer your source code could probably produce an equally functional application from scratch in the same amount of time.
erjiang
A: 

Any code can be decompiled to some degree. I think you can obfuscate Java to a degree that will deter the casual user... but I think the other people hit the nail on the head. Of all the reasons not to use Java, the ease of decompiling should be very very low on your list. If that is all that is stopping you, go for it! Google Java obfuscater and you will find something.

bwawok
A: 

I'm skeptical about the risk of reverse engineering a complex piece of software written in Java, but for purposes of your question I'm willing to stipulate it. I assume the same issues rule out any other language that is implemented only on the JVM.

The most salient aspects of Java are

  • Static type system
  • Class-based object system
  • Automatic memory management
  • No freestanding functions or modules outside the class/interface system
  • Generics

This combination could be replicated in a language like C#, but I assume the same objections you have about distributing JVM bytecode also apply to MSIL bytecodes.

I'm having a hard time coming up with a language that has all these features. Here are some nearby languages:

  • C++ has everything except automatic memory management, plus it allows freestanding functions. However the C++ generic mechanism (templates) is not for the faint of heart, and it doesn't (yet) support modular typechecking. Lots more flexibility than Java but also lots more ways to shoot your foot off. Use with caution.

  • Modula-3 has all of the above but it's essentially a dead language, plus like C++ there's no modular type checking for the generics.

  • I'm not familiar enough with Eiffel to be able to make good comparisons, but I think it's worth looking into.

  • Delphi may also be worth looking into. It seems to have everything above except generics. It's primarily a proprietary Windows environment (formerly known as Object Pascal), but there seems to exist an open-source 'Free Pascal' compiler that supports Delphi.

  • There are many object-oriented languages with automatic memory management and dynamic typing, among which one might highlight ruby, Python, and Smalltalk. None of these really compiles well and reliably to standalone native machine code, although all push toward some form of experimental compilation. And they are all dynamically typed, which is quite different from what you're used to.

If I were in your position I would probably go ahead an use Java and accept some risk of reverse engineering. Decompilers aren't as wonderful as you might think, and they don't produce wildly maintainable code, either. But if you really want to be able to produce native machine code, I would investigate Delphi and Eiffel. (I myself would use Modula-3, but that's because I once invested substantial effort in learning it. It's a very well designed language for its niche, but the user community is about gone and I think it's a dead letter. Pity.)

Norman Ramsey