如何将 Flex 在线应用程序转变为桌面应用程序?

发布于 2024-11-15 09:14:09 字数 409 浏览 7 评论 0原文

我已经在 flex (cairgorn)+spring+blazeDataservice 应用程序中工作了几年,使用 blazeDataservice 连接到后端,现在它变得很大并且需要太多时间加载,而使用它的人通常需要定期使用它。

我国的互联网带宽并没有变得更好,实际上还变得更糟,因此应用程序变得更大,带宽也变得更差,因此加载它的速度一天比一天慢。

我想知道如何才能将客户端安装在人们的计算机上,我可以将灵活的在线应用程序转变为桌面应用程序,而无需重写它。我只需要有人给我指明正确的方向,我正在考虑两个选择:

1.-它可以变成 adobe air 吗?不是 adobe air 桌面吗?

2.- 也许是在人们桌面上运行的闪存?

我需要一切来针对主机 spring 后端工作,就像今天一样,

非常感谢!

I we have been working for some years in a flex (cairgorn)+spring+blazeDataservice application using blazeDataservice to connect to the back end, now its getting kind of big and takes too much time too load, and people who use it, normally need it to use it regulary.

My country's internet bandwith is not getting better, actually it´s getting worse, so the app gets bigger and bandwith gets worse so loading it it's getting slower by the day.

I was wondering how could I get the client to be installed on peoples computers, I would be turning a flex online app into a desktop app WITHOUT REWRITING IT. I only need someone to point me in the right direction, i was thinking about 2 options:

1.- Can it be turned into adobe air ? is in´t adobe air desktop ?

2.- Maybe a flash that runs in peoples desktop ?

I need everything to work against the host spring backend just like it does today

Thank you very much!

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

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

发布评论

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

评论(2

风追烟花雨 2024-11-22 09:14:09

需要明确的是:

如果是应用程序 (SWF) 本身的大小,而不是正在执行的查询,则在不构建桌面 (AIR) 版本的情况下加快速度的另一种替代方法是使用 Flex 所谓的模块。

基本上,您会将应用程序分成更小的部分,仅在必要时加载。

如果您确实选择桌面 (AIR) 路线,您可能还需要探索本地 SQLite 数据库,该数据库仅在需要时与您的服务器同步,从而进一步减少互联网连接问题。

这当然会增加您的开发时间,但考虑到您所描述的情况,这似乎是一个不错的选择。

至于从哪里开始,从 Web 应用程序切换到桌面 (AIR) 应用程序非常简单,只需将主 MXML 标记从(在 Flex 3 中)mx:Application 更改为 mx:WindowedApplication 并启动您的应用程序即可。

针对后续问题的更新:

在不知道您的代码当前结构的情况下,很难说会涉及多少重写,但怀疑这是否会是一次重大重写。

作为实验,我建议如下:

  1. 创建一个新的 Flex 应用程序。
  2. 创建一个新模块。
  3. 将一些简单的 MXML 和 Actionscript 添加到模块中。
  4. 将模块的实例添加到主视图中。
  5. 运行/编译。

您应该看到的是,从功能或编码的角度来看,您可能根本没有将其包装在模块中,但该模块将被编译为单独的 SWF,并且 Flex 将根据需要处理加载它。

如果这一切都有效并且有意义,我将开始将您的代码片段分解为模块,看看这是否可以解决您的问题。

Just to be clear:

If it is the size of the app (SWF) itself, rather than the queries being performed, an another alternative to speed things up, without building a Desktop (AIR) version, would be to use what Flex calls Modules.

Basically you would be breaking your app into smaller pieces that get loaded only as necessary.

If you do go the Desktop (AIR) route, you may also want to explore a local SQLite database that Syncs with your server only as needed, thus further reducing the internet connectivity issues.

This would of course add to your development time, but it seems like it might be a good bet given the situation you describe.

As for where to start, switching from a Web to a Desktop (AIR) app can be as simple as changing the main MXML tag from (in Flex 3) mx:Application to mx:WindowedApplication and launching your app.

UPDATE in response to follow up question:

Hard to say how much rewriting would be involved without knowing how your code is currently structured, but doubtful it would be a major rewrite.

As an experiment, I would suggest the following:

  1. Create a new Flex application.
  2. Create a new Module.
  3. Add some simple MXML and Actionscript to the Module.
  4. Add an instance of the Module to your Main view.
  5. Run/Compile.

What you should see is that you might as well have not wrapped it in a Module at all, from a functionality or coding perspective, but the Module will have been compiled into a separate SWF, and Flex will handle loading it as needed.

If that all works and makes sense, I would start breaking up pieces of your code into Modules and see if that begins to solve your problem.

策马西风 2024-11-22 09:14:09

Adobe AIR 是正确的选择。它本质上是#2,通常您几乎可以直接将您拥有的内容直接发布到 AIR 而不是 Web,而且它就可以正常工作。想要!

Adobe AIR is the right way to go. It is essentially #2, and often you can pretty much just publish exactly what you have straight to AIR instead of the web, and it just works. Fancy!

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