Discussions

News: MVEL 1.3.0 Released, with performance improvements, revised runtime

  1. MVEL 1.3.0 has been released, featuring a revised runtime, improvements to the type system, performance improvements and more. MVEL is a general purpose expression language for Java, providing dynamically typed scripting. It is used extensively in many OSS projects for everything from data-binding, processing validation constraints, lightweight scripting, and more. We like to think of MVEL as the "swiss army knife" of Java Scripting. This latest version represents a mostly incremental upgrade over 1.2, and is 100% API and language compatible with MVEL 1.2, so this is nothing more than a drop-in upgrade. For more information, visit the MVEL website at The Codehaus: http://mvel.codehaus.org/
  2. well the home page doesnt seem to point to those OSS projects where MVEL is used Also I couldn't find a short features list And finally, the obvious question on many people's mind, how does this compared to groovy? why not just contribute your efforts to groovy? Why groovy? mainly because of Grails. Grails is project with great potentials.
  3. well the home page doesnt seem to point to those OSS projects where MVEL is used

    Also I couldn't find a short features list

    And finally, the obvious question on many people's mind, how does this compared to groovy? why not just contribute your efforts to groovy?

    Why groovy? mainly because of Grails. Grails is project with great potentials.
    Maybe Im missing something, but this isnt a general purpose programming language like Groovy but rather just an expression language (like JSTL of JSF expression languages).
  4. MVEL is a general purpose expression language for Java, providing dynamically typed scripting.
    in that case what does this line exactly means?

  5. MVEL is a general purpose expression language for Java, providing dynamically typed scripting.


    in that case what does this line exactly means?
    Im not sure what you are asking here. I think the key term is "expression language". Expression languages are used to evaluate an expression and resolve to a value. Of course he muddies the waters with control statements. Im not sure why those would be nessisary for the scope of the technology, so you have a point at that level.

  6. MVEL is a general purpose expression language for Java, providing dynamically typed scripting.


    in that case what does this line exactly means?
    It means that MVEL is a language for creating "expressions" which take pre-existing java objects (especially beans) and allow you to retrieve and set their properties and invoke their methods. OGNL and JSTL are comparable. An expression language generally offers: * Property expressions * Boolean expressions * Method invocations * Variable assignments "Dynamically typed scripting" means that the constructs above can be bundled up with flow control, collections, macros, and variables. MVEL is an expression language with scripting, not a scripting language per se. You do not write classes and methods in MVEL the way you do with groovy. Instead, you expose pre-existing object instances to MVEL and then manipulate them. Oh, and since MVEL is java code, it could be used very easily from groovy. MVEL also has all the capabilities of a template language like velocity or freemarker, but it does not exist solely to render text. You can also write as well as read. I'm pretty sure MVEL expressions are a LOT faster than groovy, veloicty, or freemarker.
  7. "Dynamically typed scripting" means that the constructs above can be bundled up with flow control, collections, macros, and variables. MVEL is an expression language with scripting, not a scripting language per se. You do not write classes and methods in MVEL the way you do with groovy. Instead, you expose pre-existing object instances to MVEL and then manipulate them.
    I couldn't have said it better myself. There's no doubt that MVEL has higher-level scripting capabilities. In fact, MVEL 2.0 will implement function definition. But even that is not designed to make MVEL a stand-alone scripting environment. It's designed to help projects that want to use MVEL for orchestration and for templating to deal with boilerplate. We've made a conscious effort to avoid being yet-another-JVM-language. We don't think we are, and we don't think we'll ever be. MVEL is lightweight. Very light weight. In fact it outperforms the competition without the use of sessions, or complex caching. In addition, the runtime contains transparent optimization and bytecode-generating JIT, which allows pre-compiled statements to be further optimized for even better performance. We do this without the use of tedious APIs, and we provide completely consistent behavior between our interpreted and pre-compiled runtime systems. We think we've reached a level of processing-cycle efficiency that the priority for 1.3 and the upcoming 2.0 has been to bring the memory footprint of MVEL down even further. I can proudly say that MVEL's memory footprint versus alternatives like OGNL, JEXL, etc. is on a completely different level. As I said, MVEL has the advantage of having a "flat runtime" that doesn't require the establishment of sessions, that in turn, need to be cached and managed. We either match or exceed the performance of others without doing this. Here are some real world performance comparisons, showing how MVELs lack-of-session caching *still* outperforms the competition *with* session caching: http://artexpressive.blogspot.com/2007/11/juel-vs-mvel.html http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html The real secret sauce of MVEL's performance, is that architecturally, it systematically avoids String creation. Most of what happens in MVEL's interpreted runtime (and this applies to the templating system too) functions purely by using range markers against arrays, using sliding windows in order to tokenize expressions as they are parsed, as opposed to outputting pretty, easy-to-work with, tokenized trees with pretty descriptive nodes with pretty APIs. Rather, MVEL tokenizes and parses in a single pass, passing instructions directly to the stack. This method may be a maintenance nightmare, as we don't have the luxury of an ANTLR grammar file to just tweak, but we buy back that lack of luxury with our tiny processor and memory profile.
  8. When does 2.0 come out. Until it would pretty useful to me with functions.
  9. When does 2.0 come out. Until it would pretty useful to me with functions.
    Translated to english, this is supposed to read: When does 2.0 come out? It would pretty useful to me with functions.
  10. When does 2.0 come out? It would pretty useful to me with functions.
    Regular snapshots are available in the Maven snapshot repository at codehaus. Functions are currently implemented in the builds. You can see some basic documentation on the changes in 2.0 here: http://mvel.codehaus.org/MVEL+2.0+Changes
  11. I embedded this into my project in about ten minutes including download time. Nicely done and works like a charm.