With all the hype around Flash’s ability to communicate with servers to build “Rich Internet Applications”, many people seem to have forgotten some of Flash’s native abilities. Sadly, new developers are unable to think outside the box as they try to figure out how to perform unctions using a technology like ASP, when Flash can handle the problem all by itself. Knowing what Flash can do by itself, and where Flash will need help from a server, is imperative for planning and developing projects.
围绕Flash与服务器通信以构建“丰富的Internet应用程序”的能力大肆宣传,许多人似乎已经忘记了Flash的某些本机功能。 令人遗憾的是,当Flash能够独自解决所有问题时,新的开发人员在尝试找出如何使用ASP之类的技术来执行功能时无法思考。 计划和开发项目时,必须了解Flash本身可以做什么以及Flash在服务器上需要帮助的地方。
Flash started out simply as a way to deliver vector animation over the Internet. Many would-be competitors came and went, but Flash clearly stayed on top as animation platform of choice for most developers and designers. No one was capable of predicting what we’d be doing with Flash today. As new versions were released, new features emerged that opened up whole new worlds for developers. Audio, ActionScript, streaming video, and remoting have made today’s Flash Player the most diverse platform available on the Internet.
Flash只是作为一种通过Internet传递矢量动画的方式而开始的。 许多潜在的竞争对手来来往往,但Flash显然仍然是大多数开发人员和设计师首选的动画平台,处于领先地位。 没有人能够预测我们今天使用Flash会做什么。 随着新版本的发布,出现了新功能,为开发人员打开了全新的世界。 音频 ,ActionScript, 流视频和远程处理已使当今的Flash Player成为Internet上最多样化的平台。
The latest selling point is the ability to build applications in Flash. Macromedia wants the world to know that Flash is no longer just a simple marketing tool. This baby can now save data, calculate complex equations, and stream up-to-date information without the need for users to refresh your browser.
最新的卖点是能够在Flash中构建应用程序。 Macromedia希望全世界都知道Flash不再只是一个简单的营销工具。 这个婴儿现在可以保存数据,计算复杂的方程式和流式传输最新信息,而无需用户刷新浏览器。
Data can now be saved and retrieved from remote databases. This has opened possibly the largest source of revenue for Flash development to date, as companies are constantly looking for new ways to build dynamic applications on top of their databases. To top it all off, developers can now build and reuse components to dramatically reduce development time.
现在可以保存数据并从远程数据库中检索数据。 由于公司一直在寻找在其数据库之上构建动态应用程序的新方法,这可能为迄今为止的Flash开发创造了最大的收入来源。 最重要的是,开发人员现在可以构建和重用组件,以大大减少开发时间。
With all these new features, developers can build what Macromedia calls “Rich Internet Applications”. Basically, this means that developers can build in Flash useful programs that can be applied to practical tasks, and part of this description involves using Flash with a server side language like Cold Fusion MX. Macromedia has provided several samples of RIAs in action, including a mortgage calculator, an address book, and the ever popular Pet Market Blueprint Application. Although each of these samples are very diverse in nature, all of them have one thing in common: a server is required.
利用所有这些新功能,开发人员可以构建Macromedia所谓的“丰富的Internet应用程序”。 基本上,这意味着开发人员可以在Flash中构建可应用于实际任务的有用程序,并且此说明的一部分涉及将Flash与服务器端语言(如Cold Fusion MX)一起使用。 Macromedia提供了一些RIA的实际示例 ,包括抵押计算器 , 地址簿以及广受欢迎的Pet Market Blueprint Application 。 尽管每个样本本质上都非常不同,但是它们都有一个共同点:需要一台服务器。
In Macromedia’s push to sell more copies of Cold Fusion MX and advertise Flash’s new remoting capabilities, Flash’s native features have been neglected. In these samples, tasks that could have been handled within Flash are instead achieved using Cold Fusion MX, which makes the task much more complicated. If you, as a developer, wanted to recreate the power of Flash in any of these samples, you’d need a server, as well as whatever language was involved.
在Macromedia推销更多Cold Cold MX副本并宣传Flash的新远程处理功能的努力中,Flash的本机功能被忽略了。 在这些示例中,本来可以在Flash中处理的任务是使用Cold Fusion MX来完成的,这使任务更加复杂。 如果您以开发人员的身份想要在上述任何示例中重新创建Flash的功能,则需要一台服务器以及所涉及的任何语言。
One of the many attractive features of Flash is the ability to create a self contained movie that requires no additional tools – not a server, nor JavaScript, or even a browser. That means a Flash movie can be played from within a browser, or on a user’s desktop. Where are these application samples on the Macromedia site? Well, using Flash with the server ties the movie to that server permanently, so it should only be done when absolutely necessary.
Flash的众多吸引人的功能之一是能够创建自包含电影的功能,该电影不需要其他工具-服务器,JavaScript甚至浏览器都不需要。 这意味着可以从浏览器或用户桌面上播放Flash电影。 这些应用程序示例在Macromedia网站上位于哪里? 好吧,在服务器上使用Flash会将影片永久绑定到该服务器,因此仅在绝对必要时才应执行。
The list of items that Flash can handle by itself is large. The more obvious capabilities include animation, audio, key framing, loading and streaming MP3 and JPEG files, and tweening (shape and motion).
Flash本身可以处理的项目列表很大。 更明显的功能包括动画,音频,关键帧,加载和流式传输MP3和JPEG文件以及补间(形状和运动)。
But, among the capabilities many developers erroneously think necessitate the use of a server, are:
但是,许多开发人员错误地认为必须使用服务器的功能包括:
1. Calculations
1.计算
There is not a single equation out there that Flash cannot handle. Using ActionScript, Flash can calculate everything from simple addition equations, all the way through to complex calculus equations that you might not have used since High School.
没有一个Flash无法处理的方程式。 使用ActionScript,Flash可以计算从简单的加法方程式到复杂的微积分方程式的所有内容,而自高中以来您可能就从未使用过。
2. Client-Side Data Storage
2.客户端数据存储
Instead of making life complicated with cookies and JavaScript, Flash’s Shared Object has the ability to save variables to a user’s computer. That means a Flash movie can remember things like preferences, usernames, and passwords.
Flash的Shared Object不会使Cookie和JavaScript使生活变得复杂,而是能够将变量保存到用户的计算机。 这意味着Flash电影可以记住诸如首选项,用户名和密码之类的内容。
3. Client-Side Validation
3.客户端验证
When users enter data into Flash, Flash can handle all validation, including email addresses, required fields, phone numbers, and more. Instead of the typical browser refresh telling the server to check a database, find invalid data, and then use the browser to tell a user that he or she did something wrong, Flash can determine a problem immediately.
当用户向Flash中输入数据时,Flash可以处理所有验证 ,包括电子邮件地址,必填字段,电话号码等。 Flash可以立即确定问题,而不是通常的浏览器刷新来告诉服务器检查数据库,查找无效数据,然后使用浏览器来告诉用户他或她做错了什么,而Flash可以立即确定问题。
With all the magic Flash can perform, it can’t do everything. There are two incidences where help from a server is needed:
有了Flash可以执行的所有神奇功能,它无法完成所有事情。 需要服务器帮助的情况有两种:
1. Remote Storage
1.远程存储
On any occasion when Flash needs to connect to a remote database in order to save or retrieve information, a server must be involved. Although the Shared Object can save information locally, this data can only be accessed on the user’s local computer.
在任何时候Flash需要连接到远程数据库以保存或检索信息时,都必须使用服务器。 尽管共享对象可以在本地保存信息,但是只能在用户的本地计算机上访问此数据。
2. Multi-Client Communication
2.多客户端通信
In the event that one user needs to communicate to another user via Flash, a server must be involved. Whether it is video, audio, or text, Flash cannot act as a server to pass the communication back and forth. All of these multi-client communication features are handled in Macromedia’s Flash Comm Server.
如果一个用户需要通过Flash与另一用户通信,则必须使用服务器。 无论是视频,音频还是文本,Flash都不能充当服务器来回传递通信。 所有这些多客户端通信功能都在Macromedia的Flash Comm Server中处理。
There you have it — a complete overview of what Flash can and can’t do on its own. Now that you know the difference, remember these aspects when planning your next Flash project. It will save you a lot of unnecessary time and money.
在那里,您可以轻松了解Flash可以做什么和不能做什么。 既然已经知道了区别,那么在计划下一个Flash项目时请记住这些方面。 这将为您节省很多不必要的时间和金钱。
If you’re after more information on this technology, try:
如果您想了解有关此技术的更多信息,请尝试:
ActionScript.com (Flash news)
ActionScript.com(Flash新闻)
http://www.actionscript.com/
http://www.actionscript.com/
The History of Flash
Flash的历史
http://www.flashmagazine.com/html/413.htm
http://www.flashmagazine.com/html/413.htm
翻译自: https://www.sitepoint.com/can-flash-achieve-alone/