function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
creemejcreemej 

Is javascript code protected against copying?

Hi,

 

What must I do to protect my javascript code against copying.

How is this organised in a salesforce app?

Where can I find some info on this?

 

thanks for your help,

 

Jan

RyanGuestRyanGuest

By the nature of the Internet, there is no way to hide your javascript code from clients who may be using it.

 

You may want to look into obfuscating it. Try YUI compressor: http://developer.yahoo.com/yui/compressor/

creemejcreemej

Is that also true for javascript files, defined as static resources?

I thaught that these maybe could be protected in a framework like salesforce, in the viewstate of the form or some other construct.

 

 

RyanGuestRyanGuest

Yes, that's also true for static resources.

creemejcreemej

Thanks ... but what should be the best way to publish an app (with 90% javascript), like an opensource application.

Is this possible within the salesforce framework?

RyanGuestRyanGuest

I'm confused by your question. Are you asking how you can publish an open source application, but hide the javascript source code?

creemejcreemej

No, I mean:

Is it possible to publish a free app in salesforce, just like an opensource application.

With one of the opensource licenses and is that not in conflict with the salesforce rules or the opensource rules.

It seems to me that this is not obvious, because salesforce is a commercial business, or is that not important.

 

 

RyanGuestRyanGuest

Publishing something under an open source license (like the GPL or MIT License) can be done. Your open sourcing your code, not the platform.

 

I believe that there are a couple examples on Google code share of open source applications built using apex, visuaforce and javascript.

creemejcreemej

Thanks, that's the way to go, I will look to these examples.

 

But, that's what I mean, why are these Google Share applications (with apex).

Is it not possible to just publish as a salesforce application.

 

Anyway, I will look at these.

 

Oh... there is also a Force.com Code Share. I didn't know that!