哪种跨平台语言更好?
如果您想将程序分发到尽可能多的操作系统,那么最好使用什么语言?
我在这里考虑的是用户的便利性。例如,如果他们没有 java 运行时、flash 或 .net 框架,则无需下载。而且,一旦他们下载了它,他们就不需要自己编译它。
我还考虑到开发人员的便利性,因为在一次编译时,程序会为您编译不同版本的操作系统,并且您不需要安装不同的操作系统来编译它。
以下是我认为该计划的特点: 将文本和图像存储到数据库 使用关键字 可以通过xml浏览web服务器中的信息 可以通过xml从Web服务器共享(上传和下载)信息 可以通过关键字编译和编辑相关文章
就像一个具有高级功能的博客,可以在线和离线存在
If you wanted to distribute a program to as many OS as much as possible what's the best language to use?
I'm considering user's convenience here. For example, they don't need to download java run time, flash or .net framework if they don't have it. Also once they download it, they don't need to compile it themselves.
I'm also considering developer's convenience, in that on one compile, the program compiles different version of OS for you and you don't need to install different os to compile it.
Here are the features of the program I'm thinking:
Stores text and image to database
Uses keywords
Can browse information in the webserver via xml
Can share(upload and download) information from the web server via xml
Can compile and edit related articles via keywords
It's something like a blog with advance features and can exist on and offline
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使其成为一个 Web 应用程序,所有计算均在服务器端完成。这应该是非常广泛的。
Make it a web application with all the computation done server side. That should be very broad.
Java 和 Python 都可以完成这项工作。恕我直言,Python 会以更好的方式做到这一点,并且会让你更快乐,特别是如果你来自类似 C 的语言。 Java 可能会更快,除非你做了一些糟糕的编程。
有一些工具(例如 JSmooth)可以毫不费力地将 Java 应用程序转换为 Windows 可执行文件,甚至包括 JRE。您的用户只需双击即可。还有几个应用程序可以从 Jar 文件创建 Mac 可执行文件,但我忘记了名字。最近一位同事在工作中就这么做了。
对于 Python 来说也是如此。
Both Java and Python would do the job. IMHO, Python would do it in a nicer way and would make you happier, especially if you are coming from a C-like language. Java would probably be faster, unless you do some horrible programming.
There are tools (e.g. JSmooth) which will quite effortlessly convert a Java app to a Windows executable, and would even include JRE. Your user would just have to double-click. There are also several applications for creating Mac executables from a Jar file, the name slipped my mind. A colleague did that at work recently.
The same holds for Python too.
如果你想在 Java、Python 和 Flex(你的标签列表)之间开发一个丰富的桌面应用程序,我强烈建议你使用 Java。
Flex 非常适合富互联网应用程序。在桌面端,Adobe Air 有点差(没有线程,socket 慢......)
If you want to develop a rich desktop application, between Java, Python and Flex (your tags list), I suggest warmly Java.
Flex is good for Rich Internet Application. On the desktop side, Adobe Air, is a bit poor (no thread, slow socket...)
要独立分发应用程序平台,您几乎可以在任何 Web 服务器上运行它。所有操作系统和平台都有某种类型的网络浏览器,因此网络应用程序将支持它。大多数操作系统都有支持 AJAX 等技术的浏览器,即使在移动平台上,您也可以使您的应用程序变得非常流畅。
我肯定会走这条使用网络应用程序的路线。但是,如果您想要在多个平台上运行独立的应用程序,Java 是一个不错的选择,但如果操作系统本身不支持,则必须在操作系统上加载运行时组件。
To distribute an app platform independent you can run it off of virtually any web server. All OS's and platforms have a web browser of some sort, so with a web app it'll be supported. Most OS's have browsers that'll support technologies such as AJAX and you can make your app pretty slick, even in mobile platforms.
I'd definitely go this route of employing a web app. But if you want a stand alone application on multiple platforms, Java is a good option, but you'll have to load the runtime components on the OS if it's not inherently supported.
我不相信有一个完美的解决方案。
您可以使用独立于硬件/操作系统的“平台”(Java、Flash、HTML + Javascript),并将安装平台的问题留给用户;例如插件、JRE、正确的浏览器等。对于 Java,有一些工具允许您将 JRE 嵌入安装程序中,这样最终用户就不必执行单独的安装。但这样做也有缺点。
您可以使用某种语言/框架为各种平台生成二进制文件,但您会发现一些重要的平台被遗漏了,和/或 UI 的外观在某种程度上受到了影响。
您可以在较低级别进行编码并自行处理所有平台问题;即通过为每个平台编写和维护不同的版本/端口。但这需要付出很多努力。
I don't believe that there is a perfect solution to this.
You can use a hardware/os independent "platform" (Java, Flash, HTML + Javascript) and leave the user with the problem of installing the platform; e.g. a plugin, a JRE, the right browser, etc. In the case of Java, there are tools that allow you to embed a JRE inside an installer so that the end user doesn't have to perform a separate install. But there are downsides to doing that.
You can use some language / framework that produces binaries for a variety of platforms, but you will find that some significant platforms are left out, and/or that the look-and-feel of the UI is somewhat compromised.
You can code at a lower level and take care of all of the platform issues yourself; i.e. by writing and maintaining different versions / ports for each platform. But that's a lot of effort.