tag:blogger.com,1999:blog-3191291.post5777817704763848082..comments2024-02-05T22:23:32.443-08:00Comments on Coding In Paradise: How Flash Can Integrate With The Open WebBrad Neuberghttp://www.blogger.com/profile/03274020042497854648noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-3191291.post-51955696229854083222008-11-19T20:20:00.000-08:002008-11-19T20:20:00.000-08:00I forgot to add something to the list:* Use the Fu...I forgot to add something to the list:<BR/><BR/>* Use the Full DOM<BR/><BR/>The DOM tree when working with MXML should be the DOM standard, including the new HTML 5 querySelector and querySelectorAll syntax that JQuery pioneered.Brad Neuberghttps://www.blogger.com/profile/03436380878044525337noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-19704707711495891562008-11-19T20:16:00.000-08:002008-11-19T20:16:00.000-08:00@Matthew: Hi there. I know about SWFAddress. What ...@Matthew: Hi there. I know about SWFAddress. What I'm asking for is for Flash to integrate natively into the browser environment better, including having bookmarking and history support baked into its core across most apps, rather than an add-in.<BR/><BR/>I'm also aware of how the MXML process currently works today, with the Java based compiler that turns into ActionScript files that produce a final SWF final. I disagree that the performance would be bad to have MXML directly rendered -- in fact, HTML, CSS, SVG, etc. all currently render at runtime. Perhaps the render-on-demand model of the web is broken, but I don't believe it is and don't see why MXML can't be done in this way. Also, the compilation process is probably doing many optimizations, compiling it down into a simpler form that the Flash plugin can deal with. Rendering MXML at runtime would not necessarily slow, and I'm definently not arguing for that. Performance is extremely important, and I definently don't want Flash to become like Java, with a slow startup time. What I'm arguing for should be made to be fast -- MXML can definently be made to be fast at runtime.<BR/><BR/>In terms of REST, yes, it can be layered on, but Adobe made a choice when they chose the binary-based AMF protocol as their foundation and layered everything else over it. The work around getting AMF working in PHP is very cool, but again it reminds me of Samba: binary protocols are a pain in the butt, and aren't easy to work with from a library level.<BR/><BR/>Around Flash 10 and text reflowing, that's good to hear. Back in the day when I first heard about the Apollo project (what became AIR), I thought what they were trying to produce would be something that had the text reflowing abilities of PDF coupled with the animation abilities of Flash.<BR/><BR/>In terms of video codecs, yes, those are a big problem and can't currently be open sourced due to all the patent issues. I'd be okay with having everything else open source and in an open community, with a commitment to H.264 as the video codec. The video portion could be a binary drop-in component by necessity because of the patent situation.Brad Neuberghttps://www.blogger.com/profile/03436380878044525337noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-8530891330248907822008-11-19T18:46:00.000-08:002008-11-19T18:46:00.000-08:00To those who complain about how Flash cannot do de...To those who complain about how Flash cannot do deeplinking and bookmarking, it can quite easily with the open source solution SWFAddress (http://www.asual.com/swfaddress/). It's been around for a couple of years now and is a really good solution having worked out the bugs on a wide vareity of browsers. If developers do not use this or other existing solutions, it's not the fault of the tool.<BR/><BR/>Also those who think MXML could be translated by either the browser or by the Flash Player at run time don't understand how Flex and MXML works. A single MXML file is compiled by the Java based Flex compiler into many ActionScript files, which are then compiled into a SWF. If you are interested in seeing these ActionScript files, you can set a flag to see all the code that Flex generates.<BR/><BR/>However, my point is having that process running in the Flash Player or the browser would be painfully slow even for small Flex applications. Large Flex applications can take many minutes to compile, which would doom the technology on the client.<BR/><BR/>Also the article complains about Flash embracing REST, when some of the main Flex examples use REST:<BR/>http://www.adobe.com/devnet/flex/samples/restaurant/<BR/>Not to mention, the Zend framework for PHP is working on intergrating AMF into their framework, so PHP developers will be able to very easily the format. It would be great if things went the other way and browsers began to incorporate AMF (which is now an open standard so any browser could use it if they wanted) so that JavaScript could take advantage of the efficiency of the protocol.<BR/><BR/>As for making friends with HTML5 video tag, Mike Chambers from Adobe already put together a proof of concept using the video tag with and FLV file:<BR/>http://www.mikechambers.com/blog/2008/05/27/poc-implementing-html-5-video-element-using-javascript-and-flash/<BR/><BR/>As for documents, Adobe really improved the text engine in Flash Player 10. Flash developers and designers now have a lot more control over the way the text is formated and looks that far exceeds HTML in the browser. It was recently announced that the New York Times was working on an AIR application that would display articles in the exact same look, format and font as their real newspaper. The demos they have shown really looks incredible and we are likely going to see more of this as Flash Player 10 gets a higher installation base.Matthew Fabbhttps://www.blogger.com/profile/04899632962527875690noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-63486822778848348032008-11-19T16:22:00.000-08:002008-11-19T16:22:00.000-08:00Good article. I'm a big fan of flash as well, but ...Good article. I'm a big fan of flash as well, but would love to see Adobe open up the platform a little more. <BR/>In a open source flash world, it would be interesting to see the development of both ActonScript and Javascript.Aaron Moodiehttps://www.blogger.com/profile/18090876027397898203noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-72055770902063405242008-11-19T12:26:00.000-08:002008-11-19T12:26:00.000-08:00Hi Brad,Long time reader, first time poster :-) Fo...Hi Brad,<BR/><BR/>Long time reader, first time poster :-) For a long time (since a little before Flex 2) I wondered the same thing-wouldn't it be great if you could mix HTML and MXML and just use AS the same way you use JS (by using script tags). What I consider a bright future for application development on the web was killed the day Harmony was ratified. This all but abolished the idea of ever getting an AS like language to run outside of Flash. I don't have any intention of getting into a 'static vs. dynamic' language war, but I've been working with JS since it was LiveScript and let me just say I think it leaves something to be desired as far as enterprise level application development goes. ECMAScript 4 would have been nice.<BR/><BR/>I also think some of your criticism's of Flash are somewhat misguided when you say that it doesn't integrate well with history,linking, searches, mashups, etc. This is all pretty much the case despite attempts by Adobe to overcome these issues. However, this is not really the fault of Flash, but more the fault of conflicting paradigms of what the web should be: for applications or for documents. <BR/><BR/>Most of the above afflicts your run of the mill AJAX enabled Web 2.0 application as well. Instead of trying to make applications into documents, which they clearly aren't-maybe people should get used to the idea that many popular concepts were designed around the idea of the web as a collection of documents(which it was invented as) and not for applications. Applications as the vast majority of users think of them will never fit the 'mashable' 'linkable' web that we have today and attempts to do so are like trying to put a round peg into a square hole. We need to recognize that applications require a different way of thinking and not try to force them into a document-based paradigm.<BR/><BR/>Its also difficult for me to envision text based protocols replacing binary in all instances. There are still times when transmission bloat does matter(even in this supposed age of broadband everywhere). Perhaps one day this will be a reality, but I don't think we're quite there yet.<BR/><BR/>Lastly, I agree completely with the idea that 'View Source' was probably critical in the popularization of the web(that and the simplicity of HTML). But while making a feature like this built into the Flash player by default might have a similar effect on the Flash ecosphere, I truly don't think this is what many content-authors want. Right now Adobe provides a way for this feature as an option, but if they made it mandatory I'm sure they would be blasted by their current customer base. If the ability to turn off view source was available now for HTML/JS pages to content authors, I'm all but certain it would be taken advantage of by many, many people (not everyone, but likely a sizable percentage).HUWebDevhttps://www.blogger.com/profile/04222422833791224335noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-38357621690305815172008-11-19T12:16:00.000-08:002008-11-19T12:16:00.000-08:00@Brad: Having thought about it, I agree that there...@Brad: Having thought about it, I agree that there's no real difference between the flash platform and the html platform, and adobe could deliver plain text to the client. On the other hand, I disagree that it's a solved problem on the ajax side of things, as the larger ajax apps use minimization, aggregation and on-demand loading, all of which make it too difficult to view the source. Ever tried to "view source" on gmail? It's just as difficult to figure out as your typical swf.<BR/><BR/>As far as linking goes, while I could conceivably see a toolkit implementing such a scheme generically, there isn't any one I know that actually does it. I'm going to cut adobe some slack here, because from my perspective flash is not actually any worse at deep linking than your typical dojo or extjs app.Joerihttps://www.blogger.com/profile/17500278865823313342noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-46044717898872714522008-11-19T09:43:00.000-08:002008-11-19T09:43:00.000-08:00@Joeri: The reason I don't accept this argument is...@Joeri: The reason I don't accept this argument is HTML, JavaScript, and CSS already do this and it's worked out fine even in bandwidth constrained environments! I don't see why Flash can't just render the MXML and ActionScript directly, with View Source always turned on just like the web itself. If you make View Source an option no one will select it.<BR/><BR/>I agree too about the DOM; I forgot to mention that. They should just provide the standard DOM, plus the new querySelector type interfaces that JQuery and Dojo have.<BR/><BR/>In terms of making things linkable by default, I thought the very simple scheme I provided should help; 99% of the time you want to link to some text (like a section of a document), and the scheme I provided does that with very little implementation overhead and a spec that can be described in about two paragraphs.Brad Neuberghttps://www.blogger.com/profile/03436380878044525337noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-63069596174851782072008-11-19T07:37:00.000-08:002008-11-19T07:37:00.000-08:00When asked why Adobe have not completely open sour...When asked why Adobe have not completely open source Flash (since the Flash Player VM is already open sourced), they have brought up the video and audio patents issues. So an open source version of Flash Player could not include most of the audio and video codecs, which would result very incompatible version of the Flash Player. This would kill one of the main strengths of Flash and so I'm not sure if Adobe would ever make the Flash Player completely open source. Too much of Flash is now built up around video. Also Adobe included the h.264 codex in Flash because it had become such an industry standard and it was what their customers were asking for. So even if Adobe introduce open source video and audio codex, they cannot abandon old codecs that have strong support in the video industry.<BR/><BR/>Over time Adobe has been become more and more open source friendly, contributing to open source projects and opening up their own products. However, these decisions have always been good business decisions and open sourcing Flash right now is a really bad business decision.Matthew Fabbhttps://www.blogger.com/profile/04899632962527875690noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-41563329636964092712008-11-19T04:24:00.000-08:002008-11-19T04:24:00.000-08:00Half the internet population is still on dial-up, ...Half the internet population is still on dial-up, the bandwidth problem is not as solved as you think it is. Sending all the actionscript as plain text is not an option imho. AFAIK, developers can integrate a view source feature in flex apps if they want, and it doesn't require sending everything as plain text. Adobe could make an effort to make this a feature that's enabled by default.<BR/><BR/>Flash's display model is hierarchical, and it already supports styling with CSS, so maybe all we need to do is get adobe to provide the display model via a DOM api and to allow styling that DOM via in-page CSS. The timeline is a big question mark here, because you need a different DOM for every frame, but I think this is a surmountable obstacle.<BR/><BR/>Making things linkable by default doesn't happen for the same reason it doesn't happen for ajax apps. Nobody really has a good idea for how to go about it.Joerihttps://www.blogger.com/profile/17500278865823313342noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-14238683897781540752008-11-18T12:31:00.001-08:002008-11-18T12:31:00.001-08:00A very minor correction to ossguy's post above:I j...A very minor correction to ossguy's post above:<BR/><BR/>I just found out that Flash 10 supports Speex for low bitrate voice (record and playback), a free codec which is under the Xiph umbrella. See http://www.speex.org/<BR/><BR/>I think previously they used NellyMoser Asoa codec for these purposes: http://en.wikipedia.org/wiki/Nellymoser_Asao_Codec<BR/><BR/>Another small step towards openness.davehttps://www.blogger.com/profile/12818596351896427249noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-19563681215001580042008-11-18T12:31:00.000-08:002008-11-18T12:31:00.000-08:00@Niall and Ossguy: Thanks for the further info on ...@Niall and Ossguy: Thanks for the further info on Flash video. Yeah, patents around video codecs is _the_ issue when it comes to the multimedia web these days. We really need a solution (it's a legal problem not a technical problem at this point, possibly a financial problem if some white knight came around and simply donated the patents to the community).Brad Neuberghttps://www.blogger.com/profile/03436380878044525337noreply@blogger.comtag:blogger.com,1999:blog-3191291.post-53179257871308445272008-11-18T06:35:00.000-08:002008-11-18T06:35:00.000-08:00@Niall The HTML5 video element does not guarantee...@Niall The HTML5 video element does not guarantee that any specific codec will exist. Theora will be supported in many browsers, but not IE. For more details, see:<BR/><BR/>http://www.whatwg.org/specs/web-apps/current-work/#video-and-audio-codecs-for-video-elements<BR/><BR/>Theora is not based on VP6. It is based on VP3 (http://en.wikipedia.org/wiki/Theora). VP6 is not free and unlicensed uses of it are actively litigated (http://en.wikipedia.org/wiki/VP6).<BR/><BR/>Adobe Flash Player does not support any royalty-free video codecs and it does not support any reasonably-compressed royalty-free audio codecs (it supports ADPCM and raw, but they have little or no compression). This is a major roadblock for open implementations of Flash.<BR/><BR/>Flash Player supports HE-AAC v2, MP3, AAC, Speech, ADPCM, and raw for audio. All but ADPCM and raw are patent-encumbered. Flash Player supports Sorenson Spark, On2 VP6, and H.264 for video. All of these are patent-encumbered. Sources:<BR/><BR/>http://www.adobe.com/products/hdvideo/supported_technologies/<BR/>http://www.adobe.com/products/hdvideo/supported_technologies/continued_support.html<BR/><BR/>Not only are all the useful formats supported by Flash Player patent-encumbered, but Adobe can't make any of them royalty-free because they don't own any of them. We need support for new formats in Flash if we are to have a freely-redistributable open source version of Flash. Unfortunately, all the big companies complain of possible submarine patents with the popular free codecs (Vorbis, Theora, and Dirac). Hopefully the use of Dirac and Vorbis by the BBC (who are driving the development of Dirac) will change this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3191291.post-32869865918245206592008-11-17T19:29:00.000-08:002008-11-17T19:29:00.000-08:00I'm pretty sure the Ogg Theora codec used in HTML5...I'm pretty sure the Ogg Theora codec used in HTML5 video implementations is based on the VP6 video codec from On2 Technologies. That's the same codec from FLV.<BR/><BR/><A HREF="http://www.niallkennedy.com/blog/2007/08/flash-player-h264-aac.html" REL="nofollow">Flash 9 Update 3 and above support H.264</A>, an ISO standard. H.264 still carries a license fee, which led China to create AVS for free choice.<BR/><BR/>Multimedia is just one of the spaces where the threat of torpedo patents has stifled innovation.Niall Kennedyhttps://www.blogger.com/profile/17489810046447337524noreply@blogger.com