Home > Development > blogs
Wow, I'm on vacation but I can't resist writing an article.
A great conversation has been taking place on another post here on InsideRIA. The conversation has been about the history of programming languages and why certain languages have strangely survived and seen quite widespread adoption and appreciation. The key language of discussion is Javascript.
In the comments I try to attribute Javascript's success to it's ease of copyability. I draw a metaphor between programming languages and genetics, proposing that Javascript's success has been due to nothing more than the ease in which it can be evolved into other projects by nothing more than viewing source and copying out the relevant behavior. I point out the fact that where the final product is the "Phenotype", the "Genotype" (the source) is accessible to anyone that desires to know it's secrets by viewing source. Compiled languages, while often more powerful and full featured, suffer from the lack of virility that javascript in the browser comes with.
Related, but on another tip, the previous discussion has led to me to think harder about the current state of the "View Source" option that the web has so radically benefited from. With the Flash Player and it's radical success over the last ten years, it may be time to ask why we are so ready to part with the "View Source" command that we have become used to in the browser. For years we have all been focused on our creations in Flash, so stunning, and compelling has the work been that it's need to be freely available to the masses as source has certainly fallen to the wayside.
It is true that Flex Builder provides an opt-in mechanism for bundling source with a project, but who really uses that? I have seen it used (and used it) on projects meant to be educational, but those projects often don't feature the type of breakthrough implementation that many commercial projects feature. Unfortunately, the most interesting commercial projects that are really worth learning from never come with an option to view source. I find myself asking "What do we have to hide here?"
It is a little bit of a challenge to try and determine whether we are creating a better environment by keeping the most mysterious work of our peers a beautiful secret, or are we actually neutering the web by removing it's reproductive organs. The ones that have facilitated so much learning and innovation in the past.
I wonder if the RIA industry would be different if "View Source" was mandatory. Obviously AJAX projects still must carry that option since they are based on Javascript, and they do, but that leads to another question which is: "Is the declarative markup that is meant to be human readable, still human readable?" That issue is something I will look at in detail in another post. First, I am curious about projects built on top of the Flash Player in which the source is compiled into the "phenotype".
If "View Source" was by default a command of the Flash Player, would that have an effect on apps that we are coming to know and love? Would Aviary and their suite of applications be bargain-basement outlets for some of the most innovative code written for the Flash Player? , would Buzzword? I am unsure of how much of the intellectual property of these applications reside on the client-side. At first glance though, it would seem that the majority of the code that makes these companies tick would reside there. If not then fine, then it would seem to make sense that these applications would have nothing to lose by publishing source for all of the community to learn from.
Do you feel yourself cringing a little? I do. Many of the clients I have worked for would never really be in favor of opting into making the source for their apps and widgets available, and if I did it on my own accord I am sure at some point I would be reprimanded. The strange thing though is that this is a concept that has made the web the success it is, why divert from that success?
It may be a stretch, but everytime we publish an application without source we may as a result be robbing some avid learner of their ability to learn from what we have done. Sure they can turn to the learning resources we have set up (that often cost money), and feature content that is nothing but a fraction of what a real implementation would look like.I can remember learning from javascript source as I started to unravel the mysteries of the web early in my career. I certainly took the time to inspect the work of the sites that inspired me, and used it to teach myself how to do it too. I was lucky though, I got to do it before "Human readable" markup became unreadable by most humans.
Why does the industry (especially developers) expect Adobe to be so "Open" with the source of all their products including the Flash Player (which won't happen anytime soon), yet the moment most developers gain the ability to walk away from "View Source" they take it? What is holding everyone back?, why not publish source with everything?
I realize this is a loaded question, but take a moment to load the gun with me. Humor me, why don't we publish source with everything? Drop a comment and be honest. Is all of this just a silly oversight, or are we intentionally walking away from the fundamentals of the open web? Think of your most current project, and post a comment on why you didn't publish source with it, or challenge my call if you think I am off base.
swfs can be decompiled.
Flash is open source and so is Flex...
I don't like javascript because even though it is "standardized" it's still messy as hell.
There is only one flash, no mess - no unexpected browser behavior. This cannot be said for javascript, although IE8 will reduce a lot of headaches.
Yes SWF files can be decompiled, no doubt. But that ability is not free. Most decompilers cost money, and require that you know that you need a decompiler to see the source in the first place.These are tools of the elite, people that already know what they are dealing with. I am putting forward the argument that this barrier to learning is against the spirit of the web.
Also, Flash is not open source. The Flash Player and the Flash IDE are both closed. The SWF file format is open however.
I would argue that the Flash platform community is extremely open source and willing to share, especially as opposed to other languages/platforms. Flash has one of the best user communities, and has thrived in sharing of code and learnings despite not having a 'view source' option.
For instance, check out http://www.osflash.org, Papervision3D, or all of the useful open source projects on Google Code (BulkLoader, SWFAddress, and many more by searching "actionscript" at code.google.com). These are all provided for free to the community, and used daily in commercial projects.
I do agree, however, that it'll be a long time before you see commercial sites allowing their source code to the be freely available. In fact, I'd argue that the only reason HTML and JavaScript are freely available is because they were developed before most of the internet became commercialized... and before there was much intellectual property to protect.
I agree with Jon. The decision of the browser-makers in the early days of the web to have the "View source" button came at a time, where commerce was quite low on the web. If that button would have been optional there, almost nobody would have used it.
I personally am not so sure, if the true success of HTML and Javascript can be related to "View source", because there was no alternative to HTML/Javascript. For building websites, you have to use HTML, there is nothing else (you can do flash websites, but they still have some minimal html around it, right?!). Also for building interaction, there is nothing else but javascript, that runs in all browsers.
So i think, these factors are far more relevant, than the fact, that you can copy code so easily. One more factor, that drove the success of HTML and javascript in my opinion was the wish of people to express themselves. The web is the only place, where you can easily have your voice heard, you just need some knowledge of html and javascript (sometimes not even that, looking at the smart tools, that exist). So, this wave of interest in "being part of it" also had a big influence on people wanting to learn how to do it.
And lastly, HTML and Javascript are very easy to understand. I think the failure of Java Applets was also due to the quite long learning curve for a beginner. And besides the language itself, you had to learn how to use a compiler, where to put files etc. For javascript, all this is very easy. You don't even need a .js file. Simply put some lines of code into an HTML and there you go.
I think these factors are far more important than the "View source" button.
And additionally, Flash in its history never had a "View source" button, but was and is extremely successfull nevertheless. And again i think it has to do with the wish of people to express themselves and Flash was and is a tool, with which they can. THAT, together with an optimal learning curve is the key, not "View source".
A few responses to the comments here:
I would argue that Flash's learning curve was not that optimal. I have taught Flash classes for years at Algonquin College in Ottawa, and I can tell you that many more failed to grasp it than those that did get it. Anyone surely can do simple animations on the main timeline, but creating interactive experiences was not simple to that many people.
Flash built up steam in 2000 primarily because it introduced a scripting language modeled on ECMAscript (javascript), this allowed more people to get into it with more familiarity at the start. You would often see people that had previous web experience (javascript especially) pick it up very fast. In that regard, Actionscript 1.0 really aligned and benefited from Javascript's success There was little difference between the two.
Eventually Flex was born because many developer types did not understand working with timelines and symbols. Flex came in as another approach to SWF development, admitting the fact that the Flash IDE was for "designer types", not developers.
Regarding Flash as a success, I think it offered the ability to create rich experiences beyond that of HTML and javascript at a time when the browser wars crippled any real forward movement towards richness.
I think that people have been expressing themselves since the beginning of society, and the arrival of Flash was not something that brought about self-expression, it brought the ability to execute rich experience, consistently cross-browser.
The most unfortunate thing is that there seems to be a consensus here that the commercialization of the web has brought about the demise of "View Source". By that I guessing that people mean:
"My clients (or my company) are paying me to develop these rich internet applications. Part of that money they are paying is for intellectual property rights over the source. Keeping it closed just seems natural."
Is this what everyone means by commercialized?
My reason is that I don't want to give everything that I've paid and spent months and more months for someone to have just the work to do the "Ctrl + C & Ctrl + V".
If we have to be good people and start giving our own private effort to anyone, why not start giving other things too? Things that really matters.
Our food to starving kids. Our money to the ones that don't know what it is, etc... I would give this things before giving my source code.
Of course I agree in the educational part, but the "avid learner", if he's really avid, he will learn anyway (and there is many ways). My hard work and everything that I've "lost" on it (time, money, fun) is not the way. I won't give it to someone I don't even know.
There is people that sell Flex apps without source code, I said sell. And that is no money in the world that could make this people sell it (of course that is). I don't agree with it, but it's just to illustrate how far this goes.
Sure if you wanna do this, there is no problem. As this really helps the community and won't do no harm to you. But that was just my own opinion and hope not be misunderstood :)
The problem is that the HTML and javascript "view source" stuff only allows you to see the front-end processing. The way the site looks and sometimes behaves. The actual meat of the application is processed server side, with php, .net, etc. You cannot currently separate the code that applies to the visual side of flash, from the part that processes the data. Protecting that portion of the code, especially in regards to applications like aviary, sliderocket, buzzword, etc. is very important in protecting their business and their market. What's more important to you, an open, view and learn (copy and paste), web, or the protection of the months of hard work that developers have put into creating the applications that push the limits of what you expect flash/flex to do?
I would say scale is an issue here too. I think Buzzword could plausibly open up the "View Source" button. It has a good position in the marketplace and a strong corporate backing. Plus it's owned by Adobe and would serve as another opportunity to help people learn Adobe products.
Something newer and smaller however would have a very low rip-off barrier and could easily be abused by view-source. This may be happening in the JavaScript world and we're just not aware of it.
If a small startup with a revolutionary idea, product and codebase released it's source it's hard to think that none of the bigger boys would be tempted to 'borrow' the code and come up with a bigger, more marketed offering leaving the little start up for dust. I'm sure a quick search in the lawsuit archives would reveal plenty of cases in JS and other open languages where this has happened. I haven't done this search however and am just exercising pessimistic speculation, maybe it wouldn't happen...
Tony,
Its a funny thought coming to your mind on vacation. I dare say, however that it has strategic importance, and has the potency to shapen the things to expect in the nearest future.
I pretty much think everybody that has commented so far are in the intermediate to advanced developer skill level range, and all seem to have forgotten the often adventurous nightmare of picking up things from the scratch.
There is so much going on right now in the development world. There are so many techs, by different companies. All in all, its a very interesting time to be a developer.
For a newbie starting off: you can imagine putting them through html, and they seem to be having headache when you show them the html content of yahoo home page. You now start pittying them and shaking your head, knowing that html is even not anything yet. How about css,javascript, xml, sql(t-sql/pl-sql), IDEs, ajax, different tools, workflow, web 1.0 versus web 2.0, blogs, webservices, com, activex, or flash, actionscript, cairngorm, puremvc, silverlight....etc.
Honestly it can be very daunting. Most people that started development like some 10-20 years ago really dont have much of a problem, cause they grew with the tech, and were swift to shifting base when confronted with the obvious benefit of the new tech; and the inevitable task of relearning almost everyweek wasn't really an issue.
In the 80s people were writing assemblies, and it moved to OOP languages like c, c++ and java(the order is not the emphasis here) and the likes. I can imagine what it will look like build gmail with assembly language or some of those oldies....? can anyone?
Of course, a lot of the old techs have pretty much been abstracted, and what we build now, still get to work on them, but the details are handled by the compiler/vm or some other handlers as the case may be.
If you wondering what my point is, here it is: I just have this strong feeling, and its something i evangelise often, that if we can pay the somewhat ultimate price of making the new generation of young newbies start off at a level a little below our present best points, and give them so much of support as to make things easy to grasp and expand upon, we would experience so far rapid growth in the nearest future that some of the things we see in science fiction films might start to come through soon than later in our lives.
Imagine, the first tutorial you read on flex, was a full documentation of how buzzword was built from ground up, source codes, code explanation/illustatration, snap shots, architectures, best practices, whys n hows, everything...; and the second one was that of Scrapbook....the third Yahoo Maps Application (the flex version) are you coughing...are you imagining anything...and from all that inspiration,knowledge, exposure, and confidence you plunged into the development world...help me with this quizzer: given you years of experience now, how do you think that will have impacted your career, your thought line, and everything about you thats connected with the passion for development if you start off that way? Think about it!!!?
These are just my own thoughts and submission...may be its just another babbling, may be you agree only in part or maybe you agree with me but dare not say it out, which ever one you have your qualified opinion.
Quite frankly, one would start off another talk-shop when one attempts to flag on a debate on open source or not, view source or not, as many people from their own experiences are click-ready for defence with so much much googleholic references.
But for what its worth, I particularly salute the
thought-leadership of a company like Adobe that invests so heavily in making their technology easy to adapt(cross-platform/device, steep learning curve), work with(workflow/process integration), learn(user groups,
expert-bloggers, cookbook, devNet, evangelism, events, tour) by developers of all skill level. Honestly, its not just enough to just provide access to some boring, overkill, non-interactive, non-illustrative technology documentation. I particularly enjoy the devNet section, where different experts get to talk on an issue of so much relevance, and just get to discuss it in details, often with fictional examples, source codes, and inline-explanation. Its very wonderful. Newbies, thats the section. Hmmm... Even the power users know that the source of inspiration for some of their much-talked-about tricks. So while trying to agree on a firm standpoint on openability or codeviewing(with often far strategic "omen"), the liberality of such thought-leadership still makes it possible for newbies to get started and build some great apps, afterall the builders of Buzzword only started learning flex just for the project...are you surprised? yes! thats what the former ceo of company(taken over by Adobe) said!?
Ahhh! Its really being a long one....
Summarily, open source and view source is really very good...its get newbies start on time...it breeds innovation and expansion. If you can open source completely, at least instantiate some process other process of still making things not exactly very boring...
All in all, nice one Tony; nice thought!
Let me feel your pulses.............
Flex has a built in "view source" option - you set a flag at compile time - and it works quite nicely. Maybe more people should start using it? I think most developers are just afraid that their "secret sauce" will get stolen.
This is my Favorit Blog. Greatfull Report. Best Regards Autoversicherung