Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selling Javascript Code [closed]

Tags:

javascript

I am planning to sell a javascript code that I have written. Given the current state of browsers its quite possible to write complex code. I think I will face a couple of problems/have a couple of questions:

  1. Javascript being client-side can be easily copied as soon as I show someone a demo
  2. Are there any companies selling javascript code? Not dual licensed like ExtJS.
  3. Should I obfuscate my code? Should I hard-code the website on which it will run and pack it etc.?
  4. How do I go about this?

Thank you for your time.

like image 1000
Alec Smart Avatar asked May 28 '09 13:05

Alec Smart


3 Answers

To be honest, with any software, no method of protection is 100% safe from being misused. Think, for example, with even large-scale commercial pieces of software, such as Photoshop, Windows or OS X. All have methods in place to try and prevent people from misusing or pirating their software, and to the average user, this is fine, and prevents people from simply copying their software and distributing it illegally.

However, if people really want to use software illegally, they'll find a way - they may reverse-engineer it, and then create keygens or remove piracy mechanisms completely, for example.

Of course, being a scripting language, applications written using JavaScript is more susceptible to misuse, since, as you pointed out, as the JavaScript runs client-side, anyone can view your JavaScript quite easily. However, for many of your customers, this shouldn't be a problem, and it is quite common nowadays for companies to software of this nature commercially, which use JavaScript as the main method of their implementation.

There may be a few people who try and misuse your software, but as I pointed out above, this occurs in all walks of software development, and all you can do is your best to prevent this from happening. As you suggested, JavaScript obfuscation is a good way to make the source less readable, (but there are some limitations, for example with stripping some legitimate lines of code that the obfuscator believes to be unnecessary), but at the end of the day, you just have to remember that most people are likely to legitimately use your software in the correct manner, and that over-protecting your software will only cause your legitimate users annoyance, to try to deter a small minority of people who are likely to provide a workaround to any mechanisms anyway.

like image 154
Alex Rozanski Avatar answered Oct 18 '22 23:10

Alex Rozanski


Companies that normally sell JavaScript components are really selling support for those components. Guaranteed bug fixes, prompt response to questions, etc.

like image 43
epascarello Avatar answered Oct 19 '22 00:10

epascarello


The easiest thing to do to obfuscate it would be to use the Online YUI minifier.

Basically, the effort required to de-obfuscate it, is pretty similar to having to rewrite it. That won't necessarily stop someone from stealing it, but again, it just depends on what kind of market you are in. Most people are honest.

Pretty much all JavaScript is open source by design. Seems that plenty of people are making money in open source. I wouldn't sweat it too much. Sell on the value or the service.

like image 40
cgp Avatar answered Oct 19 '22 01:10

cgp