﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-Thaughy Tau - 十年一剑</title><link>http://www.blogjava.net/bravet/</link><description>做人之道，一张一弛
(专注J2EE领域)</description><language>zh-cn</language><lastBuildDate>Wed, 08 Apr 2026 20:29:16 GMT</lastBuildDate><pubDate>Wed, 08 Apr 2026 20:29:16 GMT</pubDate><ttl>60</ttl><item><title>Flash or AJAX: Choosing a platform for your web application</title><link>http://www.blogjava.net/bravet/archive/2006/05/24/47864.html</link><dc:creator>Brave Tao</dc:creator><author>Brave Tao</author><pubDate>Wed, 24 May 2006 10:11:00 GMT</pubDate><guid>http://www.blogjava.net/bravet/archive/2006/05/24/47864.html</guid><wfw:comment>http://www.blogjava.net/bravet/comments/47864.html</wfw:comment><comments>http://www.blogjava.net/bravet/archive/2006/05/24/47864.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bravet/comments/commentRss/47864.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bravet/services/trackbacks/47864.html</trackback:ping><description><![CDATA[
		<h5>
				<strong>Author: </strong>Jonathan Boutelle</h5>
		<p>
				<strong>Topic: </strong>
				<a title="View all posts in AJAX and Flash" href="http://www.uzanto.com/uz/article/ajax-and-flash/" rel="category tag">AJAX and Flash</a>
		</p>
		<p>On Dec 14th, 05</p>
		<br />
		<p>
		</p>
		<p>
				<a href="http://www.adaptivepath.com/publications/essays/archives/000385.php">AJAX</a> and Flash are different ways of making a web application more dynamic and interactive. When should a project use Flash, and when should it use AJAX? We look at the problem from 1)The capabilities of the technology (what you “can” do), 2)The affordances of the technology (What is “easy” to do), and 3)Business constraints of the technology (including recruiting issues, price, and vendor lock-in). </p>
		<p>When considering Flash, we will include the capabilities of the FLEX development environment. When considering AJAX, we will discuss both proprietary and open-source AJAX APIs.</p>
		<p>
				<strong>Cost to start using</strong>
				<br />AJAX is much easier to add incrementally to an existing web application. This is perhaps it’s single biggest advantage. No tools or software need to be purchased, existing web developer skillsets can often be leveraged, and a pilot project can be done in a few days or weeks. A Flash-based solution requires purchasing software, integrating disparate technologies, and possibly acquiring new skillsets. It is therefore a bigger commitment to try Flash relative to AJAX.</p>
		<p>
				<strong>Download Size</strong>
				<br />DHTML pages typically end up being smaller (on average) than Flash SWF files or Java applets. However, this is at least partly a side-effect of the fact that many AJAX applications only use a small amount of dynamic behavior. </p>
		<p>For equivalent full-blown applications (e.g. google maps vs. yahoo maps), file size is generally roughly dependent on functionality and the engineering prowess of the team building the application.</p>
		<p>If your client may be using a slow internet connection, AJAX may be a better choice, since it can provide a lower “minimum footprint”.</p>
		<p>
				<strong>Staffing</strong>
				<br />UI programming has been considered less “technical” than back-end coding since the shift to web-based software. This has historically meant that the people who knew the UI technology best tended to be the “creatives”, and the technical work on the front-end was of widely varying quality (top sins: copy-pasted javascript files for AJAX, graphics-heavy spaghetti-code for Flash). </p>
		<p>However, this has changed big-time with the rise in popularity of AJAX. Very technical people are eager to learn AJAX, and there’s a groundswell of open-source APIs that they can use. It’s still hard to hire excellent JavaScript hackers, but there are plenty of bright people willing to devote themselves to learning AJAX now. </p>
		<p>This is slightly less true for Flash/Flex. While FLEX is an appealing paradigm for developers (xml-based programming), it hasn’t quite lit a fire under developers the way AJAX has. As a result, hiring “experienced FLEX developers” is still quite difficult, and hiring bright engineers to learn FLEX still takes work.</p>
		<p>
				<stong>Community and Momentum<br />AJAX came out of nowhere, and belongs to nobody. The fact that it’s become the hot technology du jour without any marketing budget speaks for itself. This is an approach to web development that has remarkable momentum, and a thriving community of practice.</stong>
		</p>
		<p>The Macromedia developer community is thriving and cohesive, and the tools available to the community (meaning both FLEX and the Flash player) continue to improve at a rapid rate. But from a pure momentum perspective, it’s hard to beat the raw excitement coalescing around AJAX right now. This means we can expect rapid improvement in AJAX toolkits and rapid growth in the number of experienced AJAX developers over the next few years.</p>
		<p>
				<strong>Politics and Vendor Lock-in</strong>
				<br />XMLHttpRequest (the foundation of AJAX) is an API that belongs to Microsoft and is not part of the JavaScript standard. Given that Microsoft is NOT interested in open web-based standards becoming more powerful, there is a risk that the next version of IE will somehow break XMLHttpRequest. </p>
		<p>Our personal opinion is that Microsoft would be wary of “breaking the web” by changing XMLHttpRequest. It would certainly be a public-relations disaster for them if they tried. But given their past behavior, it’s still a possibility that cannot be discounted. </p>
		<p>It goes without saying that if you develop with a proprietary AJAX toolkit, you are also getting locked into a relationship with that vendor. Open-source AJAX toolkits do not have this disadvantage: you are typically free to edit the code of the framework, and swapping one framework for another is an exercise in engineering but not an inherently difficult task.</p>
		<p>On the flip side, if you do Flash development, your destiny is tied to the whims of Adobe, and whatever capabilities they add to their platform. You are locked into a proprietary programming world, with a single vendor providing your tools and the platform your code runs on.</p>
		<p>If vendor lockin is important to you, then AJAX, using open-source tools, is the best approach. But be aware that you’re still dependent on the browser vendors, including Microsoft!</p>
		<p>
				<strong>Availability of APIs and third-party Components</strong>
				<br />Along with the community of AJAX developers there has been an explosion in the number of AJAX APIs and frameworks. The best of these are quite good and getting better fast. These APIs do such things as :<br />abstract out the differences between different browser implementations of Javascript<br />add new functionality useful to developers<br />provide new UI components that developers can use. (note: this is still an area of weakness, but is rapidly being addressed. For example, the “higher level” widgets like data grids and tree views are not as mature as their flash counterparts. Lower-level widgets like “accordions” are easily available)</p>
		<p>There is a thriving component marketplace in the Flash world as well. Most good components are proprietary, and are UI widgets of various kinds. APIs that provide other functionality are less available, but also less necessary (since the core capabilities of Flash are greater than the core capabilities of JavaScript). </p>
		<p>
				<strong>IDEs and Rapid Application Development frameworks</strong>
				<br />Here the advantage goes to Flash. The FLEX IDE is superb, and allows developers to rapidly author data-entry-type applications. The equivalent for AJAX would be tools like Tibco IG or JackBe. Typically, these third-party tools require a commitment to their programming environment and toolset, which removes one of the biggest advantages of AJAX (the ability to add it incrementally to existing solutions with low initial commitment).</p>
		<p>For a soup-to-nuts rich client development solution, there’s really nothing better than Flash, authored with FLEX.</p>
		<p>
				<strong>Sockets (“pushing” data from the server to the client)</strong>
		</p>
		<p>This capability is only needed for applications where real-time data is of vital importance: for example, trading applications, or multi-player online games. If this capability is required, than Flash is your only option. There is no equivalent in the DHTML world.</p>
		<p>
				<strong>Integration with client microphone / webcam. </strong>
		</p>
		<p>This capability (needed for communication applications) is similarly available only from Flash.</p>
		<p>
				<strong>Integration with multimedia</strong>
				<br />One of the big advantages of Flash is that it natively supports streaming audio and video, something that obviously isn’t a part of DHTML. If you’re working with streaming multimedia, Flash is definitely the RIA platform to build your application on.</p>
		<p>
				<strong>Graphical Capabilities</strong>
				<br />Flash is a vector-graphics based platform, which means that it can easily display arbitrary geometric shapes. AJAX relies on html/css for display, which means that it’s shapes are limited to rectangles. Any application that needs charting or graphing capabilities, or needs to display complex geometry, should be built on Flash rather than AJAX. This means that AJAX is a very poor choice for data visualization / executive dashboard type applications. It also means AJAX is a bad fit for (most) games.</p>
		<p>
				<strong>Maintainable Code</strong>
				<br />Javascript development in general requires writing code that runs on different browsers (which implement Javascript differently). Writing this kind of code (in order to work on all browsers and degrade gracefully, everything is implemented two or three times) is annoying. Maintaining this kind of code is a real nightmare. </p>
		<p>Fortunately, AJAX APIs that abstract away the differences between different browsers are becoming mature. Therefore, maintainable Javascript code is much easier to write than it was six months ago. </p>
		<p>Flash coding (if it is done with FLEX) is <em>very maintainable</em>. If it is not done with FLEX, it is often quite difficult to maintain. </p>
		<p>For both Flash and AJAX, if you use a reasonable engineering approach, you will have maintainable code. If you just start hacking, you will quickly create an unmaintainable, difficult to troubleshoot mess.</p>
		<p>
				<strong>Cost</strong>
				<br />Flash and FLEX cost serious money, making them out of reach for many small startups. Proprietary AJAX frameworks are also quite expensive. The open-source world of AJAX + open source APIs provides lowest initial cost. Total cost of ownership, however, will vary widely with the type of project, skillsets of your developers, etc.</p>
		<p>
				<strong>Conclusion</strong>
				<br />I hope this article provides a beginning framework for deciding whether to implement your next RIA in JavaScript or Flash. The two technologies have very different profiles, and in many ways compliment each other, so both are likely to be quite important to web developers for the conceivable future. so there should be room for both approaches. The important thing is to pick the right tool for the job.</p>
<img src ="http://www.blogjava.net/bravet/aggbug/47864.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bravet/" target="_blank">Brave Tao</a> 2006-05-24 18:11 <a href="http://www.blogjava.net/bravet/archive/2006/05/24/47864.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>当你发现，自己已经慢慢迷失在工作中的时候</title><link>http://www.blogjava.net/bravet/archive/2006/05/24/47734.html</link><dc:creator>Brave Tao</dc:creator><author>Brave Tao</author><pubDate>Tue, 23 May 2006 16:21:00 GMT</pubDate><guid>http://www.blogjava.net/bravet/archive/2006/05/24/47734.html</guid><wfw:comment>http://www.blogjava.net/bravet/comments/47734.html</wfw:comment><comments>http://www.blogjava.net/bravet/archive/2006/05/24/47734.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bravet/comments/commentRss/47734.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bravet/services/trackbacks/47734.html</trackback:ping><description><![CDATA[一是老了，没有当年意气风发，无所畏惧的精气神了。<br />二是翅膀硬了，准备单飞了。<br /><br />人就是这样，爬到一个高度后，就发现自己的还是那么的矮小。无法控制自己的生活，无法实现自己内心的想法。<br /><br />这个时候，需要将自己解放出来，通过他人的审视，发现自己的新目标，这就是为什么我在这里开篇的原因了。<br /><br />架构师如果不分享自己的经验和知识，那么，他永远只是在独自摸索。开源这么红火，思想也需要开源。<br /><br />要坚持。<img src ="http://www.blogjava.net/bravet/aggbug/47734.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bravet/" target="_blank">Brave Tao</a> 2006-05-24 00:21 <a href="http://www.blogjava.net/bravet/archive/2006/05/24/47734.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>