.NET 中的 Java 小程序相当于什么?
.NET 中的 Java 小程序相当于什么?是银光吗? Java applet 还在广泛使用吗?
What is the equivalent of a Java applet in .NET? Is it Silverlight? Is Java applet still widely in use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
1997 年,当 Java 1.0 发布时,Java 小程序是“新的热门事物”。几年后,它们变得越来越不受欢迎,主要是因为在计算机上安装 Java 对许多人来说是一个很大的障碍(你必须下载整个 JRE,它很大,安装需要很长时间,而且 Java 并不当时那么快——很多人认为它是一个缓慢、臃肿的东西)。
Macromedia Flash(当然,后来变成了 Adobe Flash)在这方面比 Java applet 有优势 - 该插件安装快捷且容易,因此它成为网络上交互式多媒体内容的主导。
Microsoft 的Silverlight 旨在成为Flash 和Sun 的JavaFX 的竞争对手。
JavaFX 是 Sun 的技术,可以让您在 Java 虚拟机上轻松执行类似 Flash 的操作。如果 JavaFX 取得成功,那么使用 JavaFX 的 Java 小程序可能会再次流行。
请注意,今年早些时候,Sun 发布了一个完全重写的 Java 浏览器插件,它比旧插件安装更快、更容易。 Sun 正在致力于使安装Java 插件与安装Flash 插件一样简单。
Java applets were "the new hot thing" in 1997, when Java 1.0 came out. After a few years, they became less and less popular, mainly because installing Java on a computer was a big hurdle for many people (you had to download the whole JRE, which was big, it took a long time to install and Java was not that fast at that time - so many people saw it as a slow, bloated thing).
Macromedia Flash (which became Adobe Flash later, ofcourse) had advantages over Java applets in this regard - the plug-in was quick and easy to install, and so it became the dominant thing for interactive multimedia stuff on the web.
Microsoft's Silverlight is meant to be a competitor for Flash and Sun's JavaFX.
JavaFX is Sun's technology that should make it easy to do Flash-like things on the Java virtual machine. If JavaFX becomes a success, then Java applets using JavaFX might become popular again.
Note that earlier this year, Sun released a completely rewritten Java browser plug-in which is quicker and easier to install than the old plug-in. On of the things Sun is working on is making it just as easy to install the Java plug-in as it is to install the Flash plug-in.
Silverlight 类似于 Java 小程序,但并不完全等同。根据我的经验,Java 小程序的使用越来越少。
Silverlight is analagous to Java applets, but not really equivalent. In my experience, Java applets are being used less and less.
Java 小程序现在已经严重过时了——我已经很多年没有听说有任何新的应用程序使用它们了。 .NET 有 silverlight,它更多的是对 Flash 的响应,而不是对 Java applet 的响应。
在当今时代,有了 JQuery 和 Mootools、MVC 架构以及 Chrome 的 V8 引擎,实际上用 Javascript 编写应用程序可能会更好。
Java applets are seriously out of vogue now - I haven't heard of any new apps using them in years. .NET has silverlight, which is more of a response to Flash than to Java applets.
In this day and age with JQuery and Mootools, MVC architecture, and Chrome's V8 engine, it might actually be better to just write your application in Javascript.
银光。
然而,虽然 Silverlight 可能成为新的热点,但 Java 小程序仍然更受欢迎……大多数人都有 JVM,但大多数人不喜欢仅仅为了查看网页而大量安装 Silverlight。
现在,许多只能在 Java 或 ActiveX 中合理完成的事情都可以使用新的 AJAX/DHTML 库(如 JQuery 和 Ext JS)在普通的旧 JavaScript 中完成。示例:谷歌地图。除非您要制作精美的图形,否则请先尝试 JavaScript。
从语言的角度来看,.NET 中有一种类似 Java 的语言,称为 J#,如果您要将 Java 代码翻译到 .NET 平台,它可以减轻您的痛苦。它不模拟 Java GUI 库等,但至少模拟语法。
Silverlight.
However, while Silverlight may be the new hotness, Java applets are still a lot more popular... most people have a JVM, but most do not appreciate a massive Silverlight install just to see your web page.
Now, many things that could only be reasonably done in Java or ActiveX are done in plain old JavaScript using new AJAX/DHTML libraries like JQuery and Ext JS. Example: Google Maps. Unless you're doing fancy graphics, try JavaScript first.
From a language perspective, there is a Java-like language available in .NET called J#, which can ease your pain if you are translating Java code to the .NET platform. It doesn't emulate the Java GUI libraries, etc. but at least emulates the syntax.
Silverlight 或 XBAP。有关差异,请参阅常见问题解答。
基本上,XBAP 应用程序仅在 Windows 上工作并在完整的 .NET Framework 上运行。另一方面,Silverlight 使用不同的核心和库集,并且被设计为跨平台的。
Silverlight or XBAP. See the FAQ for differences.
Basically XBAP applications work on Windows only and run on the full .NET Framework. Silverlight on the other hand uses different core and set of libraries and is designed to be cross-platform.
SilverLight 或 ActiveX 控件(某些网站仍在使用)。仅当客户端计算机上安装了 JVM 时,Java 小程序才会工作。
Either SilverLight, or an ActiveX control (still in use on some sites). Java applet will work only if a JVM is installed on the client machine.
您将看到小应用程序在对已安装的 Java 版本和浏览器(即执行环境受到限制)保持严格控制的企业中得到更多使用。
然而,即使在这些环境中,我也看到越来越少的小程序解决方案,尤其是随着 RIA 的兴起。
You'll see applets in use more in enterprises where tight control is maintained over installed Java versions and the browsers i.e. where the execution environment is constrained.
However I'm seeing fewer and fewer applet solutions even in these environments, especially with the rise of RIAs.