<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    jinfeng_wang

    G-G-S,D-D-U!

    BlogJava 首頁 新隨筆 聯系 聚合 管理
      400 Posts :: 0 Stories :: 296 Comments :: 0 Trackbacks
    http://www.javaworld.com/javaworld/jw-03-2005/jw-0314-scripting-p4.html

    最重要的信息:“目前有so多的Java scripting language”, :-)

    轉一張評測圖:
                   

    作者的final thoughts還是挺有意義的:

    Final thoughts
    If you need to integrate scripting support code into your Java application, my advice is to pick a single scripting interpreter and standardize on it. Costs are associated with each scripting language you support in your product, so don't make more work for yourself by trying to hook more than one scripting interpreter into your application. When adding scripting support, you can further simplify things by using an interpreter written in Java instead of a native interpreter such as Python or Tcl. That will make your solution more portable and simplify the integration task between your Java program and the interpreter.

    If your developers or customers are already familiar with a particular scripting language like Tcl, Python, Ruby, or JavaScript, obviously you'll want to look seriously at the interpreter that supports that language (Jacl, Jython, JRuby, or Rhino, respectively). If you don't have that constraint, you will have a harder choice. In some ways, it's a bit like going to a new car lot. All of the choices will work, so you are left with balancing the differences between the alternatives, such as performance or options.

    Some of these interpreters perform simple tasks faster than others. Some are updated and released more often, or have better documentation or debugging facilities than others. Some support compilation of scripts to bytecode. Some have language syntaxes that will either appeal to a developer or not, depending on preference, programming background, and the specific task at hand. As with most engineering tasks, you have to define your requirements and then investigate some to come up with the right answer.

    If I had to distill what I learned from working with the different interpreters down to a bare minimum, here's what I'd say:

    Jacl eases your entrance into scripting. Integration is simple, and if you need your scripts to be written in Tcl, it works well. If speed is your top priority, you may want to consider other choices.

    Jython is one of the fastest scripting interpreters. From looking at the Website, it seems that Jython development is about to renew, which is good news. There are several good books on Jython. If you like the Python language, Jython is a solid choice.

    BeanShell is not as fast as the quickest of the interpreters, but the 2.0 release supports loading of ordinary Java source, which is a strong selling point. I tried loading and running several Java source programs as scripts and found BeanShell to work fine, which is impressive. The libraries are well-organized and make integration simple. If performance is not the single most important criteria for your scripting interpreter and you want to write Java scripts, look at BeanShell.

    Rhino is the winner of the performance benchmarking test and also supports Java-like syntax in its scripting. There are plenty of books on JavaScript available. Rhino appears to be well supported, and the distribution includes a useful debugger.

    Pnuts is one of the fastest scripting interpreters. I am impressed with the completeness of the documentation, the simple usability of the debugger, and how straightforward it is to get things working with Pnuts. If the Pnuts syntax is a good fit for your needs, this interpreter deserves a good look.

    JudoScript is in the middle of the pack for the performance benchmark, but supports a JavaScript-like syntax that is easy to learn. The documentation seems to be thorough and well organized, and the distribution includes lots of script examples. I ran version 0.9, which seemed to work well.

    JRuby brings the feature set of Ruby to the table. It isn't the fastest of the interpreters, but if Ruby syntax and functionality is important to you, take a look at this interpreter. I ran version 0.8, which seemed to work just fine for my simple tests.

    Groovy has attracted quite a bit of attention and development effort in the Java community. It is one of the fastest interpreters on the benchmarking tests, even without compiling the scripts down to classfiles. The syntax is Java-like and supports some powerful features that Java doesn't. This is an interesting addition to the programmer's toolkit that has a lot of potential.

    posted on 2005-03-15 08:47 jinfeng_wang 閱讀(297) 評論(0)  編輯  收藏 所屬分類: javaZZ
    主站蜘蛛池模板: 亚洲中文字幕久久精品无码APP| 国产一区在线观看免费| 亚洲中文字幕无码一去台湾 | a级毛片在线视频免费观看| 色欲A∨无码蜜臀AV免费播| 国产成人亚洲综合色影视| 亚洲成a人片在线不卡一二三区 | 亚洲精品中文字幕无乱码麻豆| 日本人的色道免费网站| 免费国产成人高清在线观看麻豆| 亚洲国产精品99久久久久久| 国产成人精品免费视频软件| 欧美亚洲精品一区二区| 亚洲国产高清精品线久久| 中文字幕免费在线播放| 亚洲免费在线视频| 亚洲GV天堂GV无码男同| 免费人成网站在线播放| 中文字幕一区二区免费| 婷婷久久久亚洲欧洲日产国码AV| 一级特黄色毛片免费看| 永久黄网站色视频免费| 羞羞视频免费观看| 亚洲色无码专区在线观看| 每天更新的免费av片在线观看| 亚洲一区二区三区成人网站 | 国产亚洲3p无码一区二区| 久久久久高潮毛片免费全部播放 | 国产小视频免费观看| 你懂得的在线观看免费视频| 中文字幕亚洲综合久久2| 免费黄色一级毛片| 你是我的城池营垒免费看| 亚洲丝袜中文字幕| 国产成人亚洲精品91专区手机| 亚洲熟妇无码AV| 亚洲另类激情综合偷自拍图| 91麻豆最新在线人成免费观看| 爱情岛论坛免费视频| 中文字幕亚洲综合精品一区| 亚洲国产精品成人一区|