0

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?

never_had_a_name
  • 90,630
  • 105
  • 267
  • 383

5 Answers5

8

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
  • 6,302
  • 4
  • 31
  • 37
4

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.

Community
  • 1
  • 1
sje397
  • 41,293
  • 8
  • 87
  • 103
  • 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 Sep 17 '10 at 00:55
  • 3
    @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 Sep 17 '10 at 03:23
3

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

cobbal
  • 69,903
  • 20
  • 143
  • 156
3

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
  • 3,300
  • 4
  • 34
  • 38
3

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
  • 4,976
  • 22
  • 26