JS vs others

Hey guys,

Need your advise, thoughts and suggestions.

I had this question on my mind that if we have JS code it is as good as being open to the world.

I was wondering if there is some thing else may be Java, .net, Flash or any other technology that would make it possible to hide the code or make it unavailable for download.

Basically I was thinking of the following scenario: front end validations,

If we are doing a check for proper date format through javascript, then if the end users right clicks, he has the source.
Is it possible to do the same validation on client side and hide the implementation details from the world???

well, javascript can talk with a flash movie, so I suppose you could let javascript pass the data to a 1x1 transparent flash movie, process the data in said movie and return the result somehow.
To make it completely secure you’d also need to secure your flash in some way as that can also quite easily be decompiled.

The big question is, why would you want to do that?
I mean, javascript is more common than java, flash, or anything else, so why would you want to rely on something that is less common and probably heavier to load for the end user as well?

Also - no matter what you include in the web page to run client side, your visiitors still need to download it in order to be able to run it.

The only way to do it that keeps the code to be run on the server is to use Ajax.

hey gurus,

The idea is to make code not available for humans to read.

My current situation:

I am creating a web application primarily on JS and ajax. So the problem is the whole source code will be available for users to download.
So I want something which does not allow to access the source code.

So I guess flash is also ruled out as the swf file or video file can be decompiled?
So what else can I do to save my intellectual property???

Hey,

I just observed the swf does not get downloaded to client machine.

So in that case the code is not available to the users. Just that the swf file gets loaded and perform the functionality

Please help I am going mad.

How can the client machine execute the code in the swf file if the swf file doesn’t get downloaded? How is it supposed to know what to do?

If a client machine needs to execute something from the internet, it has to be downloaded. It’s as simple as that :slight_smile:

If protecting the code is so important, perhaps just settle for back-end validations (with PHP or something similar).