views:

130

answers:

5

If you use either Sproutcore or Cappuccino for your frontend, doesn't it mean that everyone could see your javascript and copy it?

If so, they'll have your whole frontend code.

Am I right or wrong?

+3  A: 

You are right. Also, this is true of plain javascript.

cobbal
+3  A: 

You are right. The javascript in your web pages runs on the client - so it needs to be downloadable by the client. By definition, clients have 'your whole frontent code'.

The usual process of trying to make your javascript hard to read (and therefore copy) is called obfuscation. Obfuscated javascript is the same as non-obfuscated javascript to the browser - so it will work equally well with any javascript framework.

sje397
Obfuscation is fairly useless. A minifier will obfuscate your code as a side effect, but minified code is just less pleasant to read, not any more protected.
Chuck
@Chuck: That's absolutely false. It's not just less pleasant to read; it's a lot harder. That is a deterrent and a form of protection. It's not perfect by any means, and may not deter everyone, but it certainly works on me and I'm sure many other people.
sje397
+7  A: 

On the web, if you don't give your frontend code to your user, it's not frontend code. There is no reason at all to worry about that though - the web has been like that since day one and it has been doing just fine. Focus on making a good product and getting noticed.

Alexander Ljungberg
+2  A: 

Keep in mind that the "compiled" Cappuccino / Objective-J code is very different to the original code so it's not really easy for anyone to copy parts from your Cappuccino app and reuse it.

Elias
+2  A: 

Ultimately, this isn't really a big issue of concern. In most cases it's far easier to just rewrite the code than to try to copy the packed code from the source. The fact that Apple uses SproutCore for their MobileMe tools would imply that they've found the risk to be minimal. We all know how much Apple likes to keep things to themselves :)

Peter Wagenet