跨平台应用程序开发
我已经用 C 语言创建了一个应用程序,它的可执行文件在 Windows 机器上运行良好。现在我希望这个应用程序应该在其他平台上运行,例如 linux、mac 以及移动操作系统(iphone、androide、blackberry、symbian等)。
我不想为所有这些平台再次重新编码。
我发现 flex 为替代方案,因为它在浏览器上工作,所以它是独立于平台的,但我是没有找到通过actionscript 3管理视频编码和此类事情的方法。它说我们可以通过Native Processes
实现一些东西,但它不会真正的跨平台。
我希望我的应用程序可以在所有可用平台上运行,并且只需最少的努力即可再次编写代码。
例如一次编写代码。
实现此目标的方法是什么?我见过许多应用程序在不同的平台上运行,他们是否为每个平台都进行了重新编码?
我听说有一个软件可以转换不同语言的代码。如果有人知道的话,对我也会有帮助。
任何帮助将不胜感激。
I have created an application in c language and its executable file works fine in windows machine. Now i want that this application should work in other platforms like linux,mac and also on mobile OSs (iphone,androide,blackberry,symbian,etc..).
I don't want to recode it whole again for all these platforms.
I had found flex as alternative as it works on browser so it is platform independent but i am not finding the way of managing video encoding and such kind of things through actionscript 3. It says that some stuffs we can achieve through Native Processes
but then it will not true cross platform.
I want my application run on all available platforms with minimal effort to write code again.
e.g. Write code once for all.
What Is the way to achieve this ? I had seen many applications running on different platforms does they have done re-coding for every platform ?
I had heard that there is a software that converts code in different languages. If anyone knows about it, it will also helpful to me.
Any help will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信这里唯一明智的答案是使用某种 Web 应用程序,因为 HTML 相对来说是最通用/跨平台友好的表示方法。
我要做的是首先创建一个前端(假设使用 ASP .NET),它在您感兴趣的所有平台上看起来都很相似,然后我会将您的 C 代码编译为 dll,然后将此 dll 连接到您的前端公开其选定的功能。或者,您可以使用该 dll 创建一个 Web 服务,公开您的代码所需的功能。
我见过一些这样的 100% 跨平台应用程序,说实话,它们都只是不错。我相信您将投入的全部精力使您的应用程序真正平台友好,您可以更好地投资于创建一个 Web 服务来统一所有这些服务的业务逻辑并为每个环境创建本机 UI,以便该应用程序对各种用户来说都很友好。
I believe the only sensible answer here is to use some kind of a web application as HTML is relatively the most universal/cross platform-friendly presentation method.
What I would do is I would create a front end first (let's say using ASP .NET) which would look similar on all platforms you're interested in, then I would compile your c code to a dll and just hook up this dll to your front end exposing its selected functions. Alternatively you can use that dll to create a web service exposing desired functions of your code.
I've seen a few such 100% cross platform applications and to be honest none of them was something more than just decent. I believe the whole effort you're going to put in making your app really platform friendly you could invest better in creating a web service unifying the business logic for all of them and creating native UI for each environment so the app feels friendly for all kinds of users.