473,789 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Closed Javascript source code

Hi all,

This might sound a bit weird but anyways here I go. Recently after
witnessing the popularity of AJAX/DHTML, and after enjoying Gmail's
fairly cool UI, I'm left wondering...is there going to be a point in
the future when Javascript developers would like to hide their
sourcecode from prying eyes because they think they'd put in enough
efforts into coding and they wouldn't want to give up the commercial
value in their code for nothing? You spend a few nights creating a good
looking web interface with AJAX, and then some guy just steals it and
uses it for his purpose. Is that fine? (I do understand that something
like this would be deemed as copyright violation; but are you gonna
rely just on copyright law to protect your source code?)

This brings to my next question...Why don't we have clients executing
javascript binaries instead of interpreting javascript sourcecode? Are
there any architectural reasons why this is not possible?

Cheers,
Harish

Jul 23 '05 #1
7 2279
On 11 Jul 2005 12:17:48 -0700, ha************* **@gmail.com wrote:
Is that fine?
It's part of the contract that users allow you to run code on their
system, as long as they can read the code. I can't see it ever going
away.
This brings to my next question...Why don't we have clients executing
javascript binaries instead of interpreting javascript sourcecode? Are
there any architectural reasons why this is not possible?


Nope, there's nothing architectural, but it would be every bit as
successful as java applets...

Jim.
Jul 23 '05 #2
<ha************ ***@gmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .

This brings to my next question...Why don't we have clients executing
javascript binaries instead of interpreting javascript sourcecode? Are
there any architectural reasons why this is not possible?


Any "binary" executable containing JavaScript would still have to be
downloaded to the client to be executed. That binary would be trivial to
decompile, resulting in the source code.

Not to mention the security implications of arbitrary binary code
obtained from an untrusted Web site executing on your local PC.

The term "binary" code be replaced by "bytecode" and we could run the
JavaScript in a sandboxed virtual machine, but then we'd pretty much
have ... Java. And decompiling source code from the bytecode is still
trivial.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #3
ha************* **@gmail.com wrote:
Hi all,

This might sound a bit weird but anyways here I go. Recently after
witnessing the popularity of AJAX/DHTML, and after enjoying Gmail's
fairly cool UI, I'm left wondering...is there going to be a point in
the future when Javascript developers would like to hide their
sourcecode from prying eyes because they think they'd put in enough
efforts into coding and they wouldn't want to give up the commercial
value in their code for nothing? You spend a few nights creating a good
That presumes that there is commercial value in good code. Does the
best code always win, or even get a reasonable return? (must be the
cynic in me).
looking web interface with AJAX, and then some guy just steals it and
uses it for his purpose. Is that fine? (I do understand that something
like this would be deemed as copyright violation; but are you gonna
rely just on copyright law to protect your source code?)
The reality is that any web site can be 'stolen' regardless of whether
the underlying source can be accessed or not.

Look back on some computer history - various GUIs were around before
Apple finally hit on a winner whose functionality continues to be widely
copied. Despite years of litigation, they never managed to protect a
single UI feature or function, despite the whole thing being created in
compiled binaries (originally Pascal).

It is still much easier, IMHO, to copy the UI of a web site rather than
stealing the underlying code. Invariably you want only some of the
ideas or some of the functionality to integrate it with your own ideas.
Implementing someone else's site when you can only see the UI means
guessing at the back-end functionality, so you have a significant design
task anyway.

Just look through the archives of this news group for the number of
posts that start with "I got this code from a web site...", followed by
some code which is at best ordinary and generally awful.
This brings to my next question...Why don't we have clients executing
javascript binaries instead of interpreting javascript sourcecode? Are
there any architectural reasons why this is not possible?


Because the ultimate in cross-platform compatibility is interpreted
ASCII text, i.e. scripting languages. They have been around for nearly
as long as computers have - there are lots of them other than
JavaScript. Cross-platform binaries have never lived up to expectation
- e.g. Java.

If you want cross-platform binaries, use Java. The reason most web
applications don't use use Java is the same reason why JavaScript isn't
compiled.
--
Rob
Jul 23 '05 #4


Well, what you call 'prying' is actually 'learning', as to hiding
material, sounds paranoid, reminds me of the White House confidential
papers criteria, who decides what is or what isn't confidential-worthy?
are you counted in the process? You can make copyrighted issues of
certain material and enforce it and also write some and not do so, is up
to you, as for js, you can make the same claim for any postprocessor
langauge, or any that is not binary-executed. Binary format isn't used as
means to 'hide' or obfuscate, just a lower-level set over an API to access
the objects, on some cases, you may not need it binary at all and require
the flexibility of a script. I mean, Perl uses .cgi or .pl, it really
depends on the needs and scenario but the .cgi is not compiled as means to
'hide' anything, which is what you assume.

We all learned from one another, noone was born taught as much as some
may presume of some speciality, so, You yourself as much as us have been
'prying' at others material, it be a writer's book, your Mom's recipe or
your Dads way to fix the car transmission, but the intermingling it of it
is what makes it improved. By the way, ASCII format goes quicker over a
network connection than binary, and you asked here due to AJAX, and the
nice gmail UIs, well, the intermingling made those 'nice gmail UIs' for
your liking, so, the intermingling worked.
On Mon, 11 Jul 2005 12:17:48 -0700, <ha************ ***@gmail.com> wrote:

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #5
> That binary would be trivial to decompile, resulting in the source code.

I don't think it is as trivial as you seem to think it is going to be :)

Jul 23 '05 #6
I agree with your argument over the cross-platform compatibility of js.
I didn't think about it before :)

Thanks,
Harish

Jul 23 '05 #7
<ha************ ***@gmail.com> wrote in message
news:11******** ************@g4 7g2000cwa.googl egroups.com...
That binary would be trivial to decompile, resulting in the source
code.


I don't think it is as trivial as you seem to think it is going to be
:)


I do.

Java decompiler: <url: http://kpdus.tripod.com/jad.html />
C# decompiler: <url: http://www.saurik.com/net/exemplar/ />
C decompiler: <url: http://www.backerstreet.com/rec/rec.htm />
Delphi decompiler: <url:
http://delphi.about.com/od/devutilit...ecompiling.htm />

I could go on.

Any compiled JavaScript would almost certainly not be compiled into a
platform specific binary, but instead some form of bytecode or IL. As
shown from Jad and the C# decompilers, it's trivial to recover the
source code from the compiled IL.

If designed today, this fictional JavaScript IL would also almost
certainly contain a wealth of metadata which would probably not only
give you the original source code, but all the correct method and
variable names as well.

Even if JavaScript were compiled as a platform specific binary, it would
never be as complicated as C++ and so would be easy to reverse engineer.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2520
by: Kiki | last post by:
Hello, i wonder if anyone can help.. Is there a way of knowing from the parent window (var window;) that the child window (var newWindow) has been closed? i can't touch the child window's closed as this will be populated and managed by a client.. i need to know when this will be closed though to reload the parent window.. thanks
6
5242
by: hb | last post by:
Hi, Would you please tell me how to detect if the client's browser is closed? I need such event to trigger a database modification. Thank you hb
9
2284
by: Daniel Walzenbach | last post by:
Hi I am faced with the following problem: I have a page (let’s call this page page1.aspx) containing some TextBoxes and a hyperlink which opens another page (let’s call this page page2.aspx) as a popup using either window.open or window.showModalDialog. Since I want to warn the users of my application when they try to close page1.aspx and have changed the values in the meantime I thought about using the “onbeforeunload” event of the...
26
16527
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On Win2K3/IIS6.0), do we still need this patch? 2) Does it specifically solve only this error: The underlying connection was closed. An unexpected error
21
18178
by: alistair_henderson | last post by:
Morning All, I have some code for a website which uses 'window.open' to simulate modal dialog boxes. I use the window.closed property to decide if the window object exists at various points. This has been fine until last week when I started getting javascript 'Permission Denied' errors when I try to access this property. I suspect that a windows update has caused this somehow, as this code has not changed for a very long time. Can...
4
11104
by: Eddie | last post by:
I am opening a windows (well, technically a greybox() call GB_show() which shows a nicer window than normal), and want to wait until that window is closed before moving to the next command. However, when I open the window, JavaScript immediately issues the next command statement. How can I get JavaScript to wait until the window is closed before continuing? Here's visually what I'm trying to do: statement1; GB_show('mycaption,...
29
3911
Frinavale
by: Frinavale | last post by:
I have 2 FireFox (version 2) browser windows opened. One is the child of the other. When the user is finished with the child window, a method in the parent window is called to refresh a section of the page. This is the JavaScript code that I'm using to refresh the content in the parent page: <script type="text/javascript"> function UpdateList() {
0
9665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3697
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.