views:

284

answers:

5

Unlike Flash, if you develop an application in HTML5 using Canvas, since it uses JavaScript, doesn't that mean the code is wide open? Does using HTML5 mean the end of closed code on the web browser? Am I correct that a Flash application has a closed source?

I know that HTML and JavaScript has been open for a while (just view source right) but I thought really rich applications like in Flash had hidden source code. For those creating in Canvas and HTML5, doesn't that mean the end of hidden code for "rich" applications? And maybe losing money because of it?

edit: not trying to argue but hacking the code by decompiling or reverse engineering it is not what I mean. That code is not open by default. The person that makes something with HTML5 and canvas and JavaScript knows their code will be open. Perhaps this is a reason for many to stick with closed apps like Flash, Silverlight, etc. I don't know.

+3  A: 

Flash code can be decompiled. It's a way to hack the code hidden in the swf file, so it's not so "closed".

Guillaume Lebourgeois
But it's not open like "view source" which is what I meant. Open by default.
johnny
@jonny - And as a consequence, Flash is nowhere near as popular as HTML/JavaScript. Open is good.
Coronatus
@coronatus This is your second repsonse on this. I did not say that all open is good or that all open is bad. There is a time however for a non-open piece of software. I do not agree that all software should be shared with the world..anymore than every company should divulge company secrets, if it doesn't want to.
johnny
@johnny - What does it matter if I've wrote two comments? They were about two different things. Actually *your* comment above is completely irrelevant to mine.
Coronatus
@cotonatus - they are not personal attacks, firstly. Second, your comments look the same to me...it's as if it's wrong to hide your property and make money off of it and keep others out of it.
johnny
@johnny - First, nobody said anything about personal attacks. Second, hidden source does not prevent copycats -- Google, Microsoft, Yahoo, and dozens of others all have similar products, usually with closed source.
Coronatus
+5  A: 

Open/closed source is not a difference in the architecture or techniques used, but in the license. You can still distribute applications that have their source code in plain sight and have them licensed as closed-source software. It doesn't change a thing form the legal point of view.

Radomir Dopieralski
Yes, you can but someone can still see your "technique." something that may have eluded a company's best programmer until you showed them the light.
johnny
If it's that important, you should patent it -- copyright doesn't protect techniques very well anyways. You can't copyright-protect a mathematical formula or an algorithm.
Radomir Dopieralski
To extrapolate: The fact that your code is visible makes it more likely to be pirated. Legally, your code is still yours. The burden of protecting your property, however, still rests on you. Given the size of the internet, this is no easy task. The moral of the story: If you're lazy, open source it. (I'm lazy).
Ryan Kinal
@Johnny - So? Nobody would know anything about any programming language if the language's creators and first implementors hadn't helped others learn. It's how the world works.
Coronatus
@johnny There are no such "secret techniques" in programming. Given any user interface, a half-decent programmer can implement the code required to duplicate that interface. If your company's best programmer can't, then he is in the wrong job.
meagar
@meagar - Although that may be true (I agree that it is), the result may not be as fast, secure, robust, extensible, portable, etc. So, while I think that "secret techniques" is maybe an overstatement, I would say that many businesses would not necessarily want the competition to see how they do what they do. Programmers do differ in talent and experience. All that said, I believe in the "standing on the shoulders of giants" nature of progress and am a big fan of open Source.
Justin
@coronatus - not all software should be open. I simply disagree with that premise or that it's how the world works.
johnny
@meagar I am a big fan of open-source too but not for everything (not saying you said that.)
johnny
@johnny Nobody said that all software should be open-source. Your code belongs to you (or your employer, depending on the contract) and there are laws that guarantee you that. You are not required to apply complicated cryptographic solutions to keep your program closed-source -- actually you don't need to do anything, it's closed-source by default if you don't say otherwise.
Radomir Dopieralski
@johnny - Then you should erase your memory of everything you have ever been taught by other people (how to read and write, etc) and teach yourself. Either that or you are wrong.
Coronatus
@coronatus - then you should pay a dollar to everyone you have learned from and we'll be even.
johnny
@johnny - I'm not the one complaining about visible source, you are. I've pointed people who ask me questions to the Javascript I write.
Coronatus
+4  A: 

I am assuming that by "closed source" you mean that the source is not visible using "view source" rather than that is is not "open source licensed". If you meant the latter, you can let other people see your commercially licensed (closed source) code if you like. See Microsoft's Shared Source for example.

Just like JavaScript, I would expect a lot of real world HTML5 to rely on server side data and processing.

If you look at any of my pages, you can see all the JavaScript code but you will notice that a great deal of it is just making AJAX (or AJAJ) calls to somewhere else. Everything else is just display magic like turning buttons of class 'linkbutton' into links. If I wrote a chess app in HTML5 canvas, you could see the UX work but you would still not know how my AI engine worked.

That said, I am sure a lot more code will end up visible. Just not by people who do not want it seen.

As noted elsewhere, things like Flash and Silverlight can be decompiled.

UX = User experience

AI = Artificial intelligence

Justin
I meant you can see it via open source and therefore anyone can copy it even though you wish they wouldn't.
johnny
@johnny - I still understand you to mean 'visible source'. When you say, 'open source' my brain understands something completely different - http://www.opensource.org/
Justin
A: 

I'd say it technically becomes "open source", but in fact it is not. You can only get the client side code "for free", but you can only guess what happens at the server side. Hence, you cannot take the system as a whole and use it somewhere else, since you have to rebuild all server side components.

naivists
I guess I envision most all of it happening in javascript.
johnny
+1  A: 

It really makes no difference. Flash, Silverlight or Java can be decompiled, and rebuilt with modifications; a piece of client-side Javascript can also.

At most, writing it in Javascript makes it slightly easier (at worst, it's about the same; try reverse engineering some of Google's minified Javascript!).

All your assets (graphics, sound, video, fonts etc) are going to be steal-able anyway, in any of these cases; the browser will need to download them separately, or in an archive file which can be unpacked and have the files ripped off.

It's a losing battle trying to stop people from copyright theft of things which they can get access to anyway. You really just have to make them not WANT to.

MarkR