Over a million developers have joined DZone.

MVEL 2.0 Beta 1: Expression Language for Java-Based Applications

DZone's Guide to

MVEL 2.0 Beta 1: Expression Language for Java-Based Applications

Free Resource

I am pleased to announce the release of the first public beta of MVEL 2.0, after nearly a year of work.  MVEL 2.0 is a significantly improved in terms of performance, flexibility and integrate-ability. 

Many new features have been added in direct response to feedback from the community, particularly in terms of scripting abilities.

  • New Dynamic JIT Optimizer, which now selectively engages the JIT only for performance sensitive expressions and scripts, reducing overall memory usage through less class generation in production environments. 

  • Faster Parser greatly improves compile-speed and interpreted performance, setting a new benchmark in expression evaluation performance.   Unlike other EL’s and embeddable scripting languages, MVEL does not bootstrap its compiler for interpreted execution, but rather relies on a completely separate real-time interpreter which provides performance on par or in excess of other implementations which use cached ASTs and factory caching.

  • Optional Statically Typed Compiler and Generics Support.  MVEL now supports type-safe compilation of expressions, which can be used in concert with annotation processors for compile-time error detection of problems.  For a functional example of this, see Dhanji Prasanna’s excellent Warp Widgets (http://code.google.com/p/warp-core/) framework, built on top of Guice and MVEL, and JBoss Drools (http://www.jboss.org/drools/) which uses MVEL as an alternative to Java in it’s Rule Language.

  • Better Error Reporting with Line and Column Information.  MVEL 2.0’s error reporting is now far more advanced and informative, giving not just error information but providing information on where in an expression or script the problem is.

  • New Scripting Language Features.  MVEL 2.0 introduces function definition with closures, lambda definition, standard looping (for, while, do-while, do-until, etc.) constructs, null-safe navigation operator, inline with context operator, variable existence (isdef) test operator, and more.

  • Improved Integration.  By popular demand, MVEL 2.0 now supports type-based custom property resolvers, with support to hook into the JIT.

  • New Template Engine. For those who use MVEL Templating, I am pleased to announce a completely re-written template engine which now supports pre-compilation, pluggable tagbsupport, inline template definition, and more.  Not to mention: it’s fast!

  • New interactive shell (MVELSH)!

  • And more…

Come check it out at http://mvel.codehaus.org/.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}