为什么使用 Flex 而不是 HTML/AJAX/PHP 框架?

发布于 2024-09-11 08:41:33 字数 404 浏览 6 评论 0原文

我有一些使用 Cairngorm 框架在 Flex/Actionscript 中进行开发的经验。当时我之前没有 ActionScript/Flex 的经验,我花了 3 个月的时间才开始认真开发应用程序。那一次,我也对开发基于 Flash 的应用程序持怀疑态度,该应用程序无法在所有 PC 浏览器上查看(除非更新 Flash),更不用说 iphone/ipad 了。但我想看看使用 Flex 可以构建什么样的应用程序,所以接受了挑战。

但现在我又开始想知道为什么我要混入Flex,当我有jquery/ajax,各种快速的php框架(与ActionScript/Flex不同,我对它很满意)。

如果我决定这样做,我应该如何说服我的客户,Flex 中的网站比 HTML/php 等构建的网站要好得多。

有人可以对此做出一些说明吗?

问候

I have some experience of developing in Flex/Actionscript using Cairngorm framework. At that time I had no prior experience of ActionScript/Flex and it took me some good 3 months to get started with seriously developing an application. That time too, I was skeptical developing an app based in Flash, which won't be viewable on all the PC browsers(not without updating flash), leave alone iphone/ipad. But I want to see what kind to application can be built using Flex, so took the challenge.

But now I am again starting to wonder why should I muddle into Flex, when I have jquery/ajax, various fast php frameworks(which I am comfortable with unlike ActionScript/Flex).

How, if I decide to, should I convince my clients that website in Flex can be much better than ones built in HTML/php etc.

Can somebody throw some light on this?

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

多情癖 2024-09-18 08:41:33

原因不止这些,但主要有:

运维成本: 大多数“工程师”对此不以为然,因为他们以开发为中心,但事实是到目前为止,运维是运行 IT 系统的主要成本。使用 Flex(或 Silverlight 或 JavaFX)等 VM 方法,您不必担心每次新浏览器出现时更新库、测试、应用修复等问题。使用难以维持日常运行的遗留技术会直接损害客户的利润。

性能: Flash (Flex) 是 JIT 编译的(如果 SL 也是这样,也不会感到惊讶),Java 也是如此。解释型 JavaScript 相关库(例如 GWT)根本无法与编译后的 VM 客户端获得的性能相提并论——甚至无法进行密切的比较。 “AJAX”(尤其是使用 XML 时)并不“快”。 (只要注意一下 Gmail 通常加载的速度有多慢——一个非常简单的支持 AJAX 的脚本。)证据就在基准测试中。

一致性/可靠性:每个人都知道,当您使用 JavaScript 或 HTML 编写任何内容时,必须在每个浏览器中对其进行测试(如果您真的想安全,包括一些旧版本)。当您针对 VM 平台时,就不存在这样的问题。使用 AJAX:每当发布新的浏览器或浏览器版本时都要担心。如果出现问题,它就会为你创造工作。

更丰富的组件和更好的用户体验:这是 Adob​​e 的一大卖点,但确实如此。虽然纯粹使用浏览器脚本 (JavaScript) 完成的一些工作令人印象深刻,但 Flex 或 Silverlight 组件更好。当您不需要编写(和维护!)跨浏览器 JavaScript 魔法时,创建您自己的自定义组件也容易

Flex 特定的,但值得一提的 - AMF:这是 Flex 数据服务二进制协议,可用于与服务器通信。基准测试(询问 Google)已证明该协议比 AJAX 框架使用的协议更快、带宽效率更高。在当今世界,网络正在成为主要瓶颈(如果还不是很明显的话),这是一个相当大的胜利。

对于许多人来说这是一个敏感话题。大多数 AJAX/DHTML/JavaScript“工程师”或任何他们自称的东西,只要有人认为他们花了数年时间成为专家的 1990 年代技术已经过时且有缺陷(坦率地说,他们会失去很多),他们就会大喊大叫并扔粪便。但基于纯粹的技术优势,与任何成熟的基于虚拟机的解决方案相比,即使是 HTML5 也是一种适得其反的浪费时间。我相信很快就会有一些人通过投票否决来捍卫他们的否认主义。但很难阻止未来。

AJAX/DHTML 框架本质上都依赖于遗留的 hack 和复杂、缓慢、脆弱、不断维护的库,以保持它们在多个浏览器中良好地运行。 HTML5,当它最终在 2022 年“完成”时(!!!),在功能方面甚至不会赶上 Silverlight 2——更不用说届时 Flex 将会拥有大量的东西。基本上,AJAX 是一个维护泥潭和一个脆弱的开发环境,您可以通过使用 Flex、Silverlight 或 JavaFX 等 VM 解决方案来完全避免。

There are more reasons than just these, but some major ones are:

O&M costs: Most "engineers" don't give a rats A about this because they are development-centric, but the fact is that O&M is by far the leading cost of running IT systems. With a VM approach like Flex (or Silverlight, or JavaFX) you don't have to worry about updating libraries, testing, applying fixes, and so on every time a new browser comes out. Using legacy technologies which are harder to keep running day-to-day directly hurts your clients' bottom line.

Performance: Flash (Flex) is JIT compiled, (wouldn't be surprised if SL is too), and Java is as well. Interpreted JavaScript dependent libraries such as GWT simply cannot hold a candle to the performance you get out of a compiled VM client--it's not even a close comparison. "AJAX" (esp when using XML) is not "fast". (Just look pay attention to how slow Gmail typically loads--a very simple AJAX-enabled script.) The proof is in the benchmarks.

Consistency/Reliability: Everyone knows that when you write anything using JavaScript or HTML, it has to be tested in every browser (including some older versions if you really want to be safe). No such problem when you're targeting a VM platform. With AJAX: worry whenever a new browser or version of a browser is released. If there's problems, it'll create work for you.

Richer components and a better user experience: This is one of Adobe's big selling points, but it's true. While some of the stuff that has been done purely with browser scripting (JavaScript) is impressive, Flex or Silverlight components are just better. It's also easy to create your own custom components when you don't need to write (and maintain!) cross-browser JavaScript magic.

Flex specific, but worthy of mention--AMF: This is the Flex Data Services binary protocol which can be used to talk to servers. Benchmarks (ask Google) have demonstrated this protocol to be much faster and more bandwidth efficient than protocols used by AJAX frameworks. In today's world where networks are becoming the major bottleneck (if not clearly already), this is quite a big win.

It's a sensitive topic for many. Most AJAX/DHTML/JavaScript 'engineers' or whatever they call themselves will howl and throw feces at the mere suggestion that this 1990's technology they have spent years becoming an expert in is outdated and flawed (quite frankly they have a lot to lose). But based on pure technical merit, even HTML5 is a counter productive waste of time compared to any mature VM based solution. I'm sure some will show up shortly to defend their cult of denial by voting this down. But it's hard holding back the future.

AJAX/DHTML frameworks all rely essentially on legacy hacks and complex, slow, fragile, constantly maintained libraries to keep them running reasonably well in multiple browsers. HTML5, when it's finally "complete" in 2022 (!!!) won't even be caught up to Silverlight 2 in terms of features--never mind the huge amount of stuff Flex will have out there by then. Basically the AJAX stuff is a maintenance quagmire and a fragile development environment that you can completely avoid by using a VM solution like Flex, Silverlight, or JavaFX.

折戟 2024-09-18 08:41:33

与使用 Flex 的 HTML/AJAX/JavaScript 相比,您不会遇到跨浏览器问题而头疼,您可以获得精美的动画和滤镜效果、非常方便的 IDE(Flash 构建器)、ActionSctipt 3(恕我直言,非常方便,更像 Java,然后是 JavaScript)。

而且您应该忘记让应用程序在移动平台上运行。)

Comparing to HTML/AJAX/JavaScript with using Flex you get no headache with cross-browser problems, you get fancy animation and filter effects, very handy IDE (Flash builder), ActionSctipt 3 (IMHO much handy and more like Java then JavaScript).

And you should forget making app work on mobile platforms.)

葬心 2024-09-18 08:41:33

在我看来,Flex 中的组件以及创建适合您的确切需求的自定义组件的能力(所有这一切都是通过完全面向对象的方法完成的)是 AJAX 框架无法比拟的。 AMF 协议也是一个很大的优势,因为它速度惊人。动画很容易创建,可以给每个组件一种增强用户体验的感觉,并可以给您的界面带来自己的生命。我的帖子之前提到的所有内容也应该考虑。

开源解决方案可以在合适的时候使用它们,如果我想用一些服务器端代码构建一个简单的网站,我也会使用它。

但是,当您从“网站”进入“网络应用程序”时,我认为为了取得成功,您必须创建脱颖而出的材料。 Flex 正是为此而生。

如果你可以在没有它的情况下建立相同的体验,那就继续做吧,这对你有好处。 :)

The way I see it, the components in Flex and the ability to create a custom component that fits your exact needs (and all of this is done by a fully object oriented approach) cant be matched by the AJAX frameworks. The AMF protocol is also a big advantage since its amazingly fast. The animations are easily created to give each component a feeling that enhances the user experience and can give to your interface a life of its own. Everything mentioned before my post also should be considered.

The open source solutions are there to use them whenever its right, and I would also use it if I wanted to build a simple site with some server side code perhaps.

But when you pass from the "website" and get to the "web application" then I think that in order to be successful you have to create material that stands out. Flex is there exactly for that.

If you can build the same experience without it go ahead and do it, good for you. :)

胡渣熟男 2024-09-18 08:41:33

你应该问自己为什么需要使用 flex。您正在开发游戏吗? Web 上的 3D 图形应用程序? HTML 确实无法实现的东西?

如果没有,就没有理由使用 flex 来代替 HTML。 HTML是一个开放的标准规范,你不需要插件,你的应用程序将运行在任何有支持html的浏览器的平台上,并且速度更快,资源消耗更少。不要犯在 flash/flex 中开发一些可以用 HTML/AJAX 完美完成的东西的错误。我看到一些开发人员使用 Flex 或 silverlight 创建仅包含一系列表单的应用程序,这是对时间和资源的荒谬浪费。

因此,说服客户使用 Flex 的唯一方法应该是找到一些 HTML 无法做到的事情。并且考虑到 HTML5 即将到来,硬件加速的 HTML5 浏览器将在今年年底推出。 .,很难说服人们使用 flash/flex! :)

You should ask yourself why you need to use flex. Are you developing a game? A 3D graphics application on the web? Something that actually cannot be achieved with HTML?

If not, there is no reason of using flex instead of HTML. HTML is an open and standard specification, you don't need plugins, your application will run on any platform with a browser supporting html, and it will be faster and less resource-consuming. Don't fall in the error of developing in flash/flex something that can be done perfectly with HTML/AJAX. I saw some developers creating applications with flex or silverlight that consisted in just a series of forms, and it was a ridicolous waste of time and resources.

So the only way to convince your clients to use flex should be finding something you actually can't do with HTML.. and having in account that HTML5 is almost here and hardware-accelerated HTML5 browsers will be launched at the end of this year.., it will be difficult to convince people to get tied to flash/flex! :)

暗地喜欢 2024-09-18 08:41:33

项目不应该由您使用的工具来定义,相反,定义您的项目并选择最合适的工具来实现您的目标。

也许好的第一步(当您决定“混入 Flex”时似乎已经采取了)是更好地了解这些工具。

为什么要将 PHP 框架与 AS3/Flex 进行比较?
更新flash有什么问题吗?或者如果您愿意,更新有什么问题吗?!

有选择的感觉真好,没有必要的时候就不要设置不必要的限制。为什么不根据每个项目来决定;)

A project shouldn't be defined by the tools you use, rather the opposite, define your project and choose the most appropriate tools to achieve your objectives.

maybe a first good step ( which you seem to have taken when you decided to "muddle into Flex" ) is to have a better understanding of these tools.

why would you compare Php frameworks with AS3/Flex?
what's wrong about updating flash? or if you prefer, what's wrong about updating?!

it's great to have choice, let's not put unnecessary limitations when there's no need to do so. why not decide on a per project basis ;)

大海や 2024-09-18 08:41:33

这不是一个非此即彼的决定。 Flex 组件应该被视为页面的一部分,但事实并非如此——我再说一遍,不要犯在 Flex 中构建单一应用程序的错误。我刚刚完成了一个构建大型 Flex 应用程序的项目。永远不会再这样做了。它有它的用途,但同样,Flex 小部件应该补充 html 框架。反之则不然。

Its not an either or decision. Flex components should be viewed as part of a page but do not - I repeat DO NOT make the mistake of building a monolithic app in flex. I just got off a project building a massive flex app. Will never do it again. It has its uses but again, flex widgets should complement an html framework. Not the other way around.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文