views:

394

answers:

8

I'm writing an application that is largely javascript based. The javascript uses a java applet on the page to work as a socket bridge. However, if someone was to steal the javascript code I have written, would that infringe on copyright laws? What if I attached a license at the top of the .js file?

I was thinking of writing the application in Flash, but would rather not - is there any other way to have a closed source web application (java applets can be decompiled so that doesn't count). I don't want to have to use server-side PHP to accomplish this either.

+13  A: 

Under the Berne convention, copyright is attached to something when you author it. So yes, your JavaScript code is copyrighted (everywhere that the Berne Convention is adopted).

A license is (usually) used to grant people more rights than they have under copyright. It cannot take rights away (unless by mutual consent, but I'm not a lawyer so take what I say with a pinch of salt), all it can do is prevent someone from using the copyrighted work if they don't accept the conditions of the license.

But that's not the license taking rights away, it's the license not conferring extra rights, in which case standard copyright rights are still in control.

Of course, no amount of copyright or licensing will stop your code from being stolen. Nor will any technological solution keep out those who are determined. You have to ask yourself, is your code truly so valuable that you want to do battle with the forces of evil.

I don't worry about anyone stealing my code. I make a living by servicing my clients, the software is really just one way of doing that. And, if I am being brutally honest, I don't doubt someone could write better versions of the applications I produce. Good luck to them. I'd rather spend my time keeping my clients happy.

paxdiablo
I strongly agree with pax!!!,Someone could write better codes than you have produced. Spend time keeping clients happy.
jerjer
pax is right, and I'd like to add: you have no other chance. You may insist on your copyright law, but in practice insisting on your law - even if you have a good reason to - will cost you a lot of money and a lot of your valuable time (which you'd like to invest in producing...).
frunsi
Please note, that until 1989 US copyright law was seriously flawed, and then the Berne convention succeeded and lead to major changes in US copyright law: http://en.wikipedia.org/wiki/Berne_Convention_Implementation_Act_of_1988Though I still hope, that the rights of the authors will still be improved in future. Maybe the "Open Source" movement should never even be required, if US copyright law was not so flawed... IMHO!
frunsi
A: 

There is nothing called not copyrightable thing. If you really did it, then its yours and you can hold the copyright.

Chathuranga Chandrasekara
A: 

Legally speaking you can get it copyrighted, but that's not going to stop someone from ganking the file off your web site if they want to take a look at it, which I think is what you're more concerned about.

Because of the nature of how javascript is deployed in a web environment, it makes it difficult to obscure it from the end user, should they want to acquire it.

Joseph
ganking? Should that be yanking?
paxdiablo
@Pax lol no I meant gank, but it may not have been the best choice =P http://www.urbandictionary.com/define.php?term=gank
Joseph
+1  A: 

Any code you write regardless of which language (whether it is Java or JavaScript) can be covered by a license.

However, given that JavaScript is distributed in plain-text form via the web, you may have a difficult time enforcing the license. Basically, it's almost an honor system.

notnoop
A: 

Chances are, no javascript you or I will ever write will be worth stealing. If it is worth stealing, someone will figure out how to steal it anyway.

The only way is to keep private data/algorithms on the server, but if it's that good, people will reverse engineer it anyway.

Put a license at the top of your script and if you ever catch someone using your code you're covered legally.

secoif
I'd like to think at least *some* of my code was worth stealing :-) But if you actually catch someone using your code, it'll cost a bucketload of money to get them to stop. It's a civil matter which means you'll be funding the legal costs yourself, not your local DA.
paxdiablo
+1  A: 

You automatically hold the copyright to anything you create, including code.

The difference between this automatic copyright and going and filing a copyright with the government is all about proof. If someone steals your code and you sue, you're going to have a difficult time proving it to be your own unless you have a legitimate filed copyright.

In my own opinion though, unless you're a large corporation, it's not at all worth it to file any type of patent or copyright for code. It's costly and we're still in a stage where it's difficult to claim a right to software innovations anyway.

James Skidmore
A: 

At least in german law, you will hold and keep the copyright on your javascript for a lifetime. You don't even have to add a copyright notice.

But without any notice a bad or unmolested guy may steal your source code and may not mention you as the original copyright owner.

IMHO german law is different here, e.g. you can never "sell" your copyright to another person or institution! But then the term "copyright" may not be the perfect match of what I mean. I speak about the so called "Urheberrecht" - which means, you are the person who created that thing, and you will never be able to say that another person created it! You may sell licenses to other people that allow them to use that thing, but you can never ever - really never ever - transfer the original "Urheberrecht" to another entity. This means, you will be the one who created that thing.

And this is good!

In practice you add a copyright notice anyway (we all do this...), and you will hope, that no bad guy will violate it.

However, if anyone tries to violate it, and you will notice it, and you want to combat the case, then this will cost you a lot of money. If you win, then you may get this money back, but in practice you will pay and and pay and acquire new credits and pay and pay and pay.. and you know... pay, and pay... until you are either bankruptcy (even with all the credits you took) .. or until you have won that copyright war.

So, to get to the heart of this topic: don't try it. Just hope, that you don't have to mess with the big guys.

Sorry, but this is it.

EDIT: The "new world" may still learn something new from the old european world! This may sound ridiculous - I don't know how it feels exactly - but, well, copyright law and its enforcement is one of the oldest arts of mankind. As long as US law feels like a term like "may provide otherwise" (http://en.wikipedia.org/wiki/Rule_of_the_shorter_term#Berne_Convention) may be a good fit for legal decisions. as long as this term is base to legal decisions, as long as THIS TERM is legal, in that time span I am away for a long time on holidays :( And I do not even hesitate to come back soon. Democracy is lost. The law is weak, flawed, just face it.

Democracy may be a good thing, but it should be fair. BEING FAIR should be the base of all democratic decisions!!! 111 one one one eins eins eins ... I can not stress it more than that! Democrary is pure fairness. Do not do anything to any other other person, that you would not do to yourself .. and learn to reason, reason, reason, rationality, sanity, whatever word fits best). Be real and true!

Wealth (where wealth means, that you may not tweak the law to you own benefit) should be the privilege of the ones that work hard.

frunsi
A: 

Anything that is cool and great and you have created/developed/authored can definitely be copyrighted.

Sarfraz