将现有 Flex/Java/Hibernate/MySQL 应用程序迁移到便携式发行版 CD 上的最佳路径?
我有一个典型的基于 Flex 的应用程序,它是为使用 Java/Hibernate/MySQL 后端而编写的。客户更改了要求 - 现在他们希望将其分发到 CD 上,用户可以在其中运行该应用程序,而无需任何安装或网络连接。
针对这种情况建议的迁移路径是什么?
为此,我当然需要消除 Web 服务器和数据库服务器,并使我的应用程序(当然,更改尽可能少)适应适合 CD/DVD 的独立应用程序。
我已经设法将数据导出到 XML 并将其读入 Flex,但我想知道是否有一种方法可以在 Flex 中重新创建 Hibernate 数据结构,以便我可以更改尽可能少的代码。如果做不到这一点,是否有任何方法可以将现有的 Java/Hibernate 保留在 Flex 代码之外,但无需安装 Apache Tomcat 或 MySQL 即可检索?还存在哪些其他选择?
I have a typical Flex-based application that was written to use a Java/Hibernate/MySQL backend. The client changed the requirements - now they want to distribute it on a CD where the user can just run the app without any installation or a network connection.
What is the recommended migration path for this situation?
To do this, I certainly need to eliminate the web server and the database server and adapt my application (with as few changes as possible, of course) to a stand-alone application that will fit on a CD/DVD.
I've managed to export the data to XML and read it into Flex, but I'm wondering if there's a way to recreate the Hibernate data structures in Flex so I could change as little code as possible. Failing that, is there any way to keep the existing Java/Hibernate external to the Flex code but retrievable without installing Apache Tomcat or MySQL? What other options exist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您想要最简单的方法来完成这项工作,您可能希望保留服务层(即 Java/Hibernate/mySQL),因为切换到 AIR 意味着您将不得不再次在 Flex 中重写该逻辑。我建议直接在客户端计算机上运行 Jetty(假设它们有 Java)并使用 HSQLDB 作为后备数据存储(它支持仅在内存中拥有一个数据库)。也从 Jetty 提供 flash 文件,并将客户端的浏览器指向本地 URL。更好的是,有一个包含嵌入式浏览器的简单 java 应用程序,这样当用户关闭应用程序时,jetty 实例就会被终止。
除了在java端配置所有内容之外,重写的代码量应该是最少的。
请参阅:
If you want the simplest way to make this work, you probably want to keep the service tier (i.e. Java/Hibernate/mySQL) since switching to AIR means you will have to rewrite that logic in flex again. I would suggest running Jetty directly on the client machine (assuming that they have Java) and using HSQLDB as the backing datastore (which supports just having a database in-memory). Serve the flash file from Jetty as well and point the client's browser at a local URL. Better yet, have a simple java app that includes an embedded browser so the jetty instance would be killed when the user closes the app.
Apart from configuring everything on the java-end, the amount of code to rewrite should be minimal.
See:
我还想使用 AIR 应用程序。
使用 SQLite 数据库。我也在一些项目中使用它并且效果很好。有从 mysql 到 sqlite (meastro) 的导入工具,如果我对 google 的查找是正确的,那么 hibernate 中有一种 sqlite 的方言。
所以我认为,你可以保留你的后端。
=======
ups,抱歉,现在我读到,你不能安装空气发动机。所以我的想法很糟糕。
========
但我不明白的是:它允许安装flashplayer,显示你的内容,但它不允许安装air播放器。脱胎者在哪里。世界上有很多电脑没有flashplayer。您不能假设在第一种情况下安装了 fp。然后会发生什么?
======
另一个想法可以是 exe 文件。
我从未尝试过,但请查看链接
I also would like use an AIR application.
Use the SQLite-Database. I use it also for some projects and it works fine. There are import-tools from mysql to sqlite (meastro) and if my lookup to google was correct, there is a dialect for sqlite in hibernate.
so i think, you can kept your backend.
=======
ups, sorry, now i read, that you can't install the air engine. So my idea is a bad.
========
But what i can't understand is: Its allowed to install the flashplayer, to display your content, but its not allowed to install the air player. Where is the deiiferent. And there are many computers in the world without the flashplayer. You cannot assume, that the fp isinstalled in first case. What happens then?
======
Another idea can be an exe file.
I never tried it, but check this out link
对于独立应用程序,您需要将其编译为 AIR 应用程序而不是 Flex。
我的建议:
现在在 AIR 中,您将拥有文件系统访问权限以从 SQL 导出读取 XML/CSV 数据
For a standalone application, you'll want to compile it as an AIR application instead of Flex.
My suggestion:
Now in AIR you'll have filesystem access to read in your XML/CSV data from SQL Exports