Alternatives to JavaScript

前端 未结 18 1750
迷失自我
迷失自我 2020-12-04 07:11

At the moment, the only fully supported language, and the de-facto standard for DOM tree manipulation in the browser is JavaScript. It looks like it has deep design issues t

相关标签:
18条回答
  • 2020-12-04 08:02

    Maybe something like haxe (see haxe.org) could help you. It is a language which seems cleaner than JavaScript and can be compiled down to JavaScript, so it can be run inside a browser.

    I know that this is not a direct answer to your question, but I thought it might be interesting for you, nevertheless.

    0 讨论(0)
  • 2020-12-04 08:04

    Jquery (still javascript but) it will really help you they have support for almost all the browsers and it isn't really that hard to learn :)

    0 讨论(0)
  • 2020-12-04 08:10

    Many people understand that Javascript isn't best and prettiest language ever. However, it is currently supported by browsers, and thus it will be extremely hard to introduce a different language. We simply don't need another browser war.

    This explains why I know of no plans of switching to a different client-side language.

    But I think Javascript isn't so bad if you start thinking about DOM model and how would one work with it. Many things that are messy with JS are the result of the way DOM model works.

    0 讨论(0)
  • 2020-12-04 08:12

    In terms of client side Javascript is the only way to manipulate the DOM. In terms of server side there are a multitude of ways.

    0 讨论(0)
  • 2020-12-04 08:13

    If you're willing to restrict your customers/visitors to specific browsers, and possibly willing to require them to install a plug-in, you could look at MS Silverlight -- a readable overview is on wikipedia. With Silverlight 2, you can run, client-side, code you've written in C#, IronPython, IronRuby, VB.NET, etc; the free Moonlight clone of Silverlight, from the Mono project, promises to bring the same functionality to Linux.

    In practice, most developers of web apps and sites prefer to reach wider audiences than Silverlight (and eventually Moonlight) can currently deliver -- which means sticking with Javascript, or possibly Flash (which uses a similar programming language, Actionscript).

    So, gaining substantial mindshare, adoption and traction for anything else is proving to be an uphill fight even for Microsoft with its large groups of engineers and marketing budgets and a free-software project on the side (to possibly ease worries about proprietary lock-in) -- which may help explain why there's very little interest, e.g. on the part of the Mozilla Foundation, in pushing towards such a goal. "Apart from interoperability", you say: but clearly the issue of interoperability is THE biggie here, given what we observe wrt Silverlight's progress...

    0 讨论(0)
  • 2020-12-04 08:15

    No. JavaScript is it, but it will evolve. The next version is "JavaScript Harmony," and you can learn more if you Google that.

    Now and then someone suggests putting a byte code interpreter into the browsers alongside JavaScript. Probably won't happen, at least for awhile.

    I happen to love JavaScript. But there are other solutions, including GWT, which compiles Java to JavaScript and Script#, which compiles C# to JavaScript.

    0 讨论(0)
提交回复
热议问题