LoginSignup
11
13

More than 5 years have passed since last update.

EL式の歴史

Last updated at Posted at 2015-09-30

EL式の勉強してて stackoverflow の良い記事を見つけたので翻訳メモ(意訳あり、誤訳の可能性あり)。

Difference between JSP EL, JSF EL and Unified EL - Stack Overflow

Jun 2002: JSTL 1.0 was introduced with EL for first time. It were those ${} things which works in JSTL tags only. It is designed to call Javabean get methods.

2002 年 6 月、 JSTL 1.0 が EL 式とともに初めて発表された。
${} は、 JSTL のタグでだけ動作するもので、 Java Beans の Get メソッドを呼び出すために設計されていた。

Nov 2003: JSP 2.0 was introduced and EL was moved from JSTL 1.0 to JSP 2.0 in javax.servlet.jsp.el package and it became standard EL as part of J2EE 1.4 standard. JSTL 1.1 was shipped without EL. Now ${} works outside JSTL tags in JSP template text as well.

2003 年 11 月、 JSP 2.0 が発表され、 EL 式が JSTL 1.0 から JSP 2.0 の javax.servlet.jsp.el パッケージに移動になり、 EL 式は J2EE 1.4 の仕様の一部となった。
JSTL 1.1 は、 EL 式から独立して動き出した。
${} は、 JSP テンプレートの JSTL タグ外でも動くようになった。

Mar 2004: JSF 1.0 was introduced with deferred EL in javax.faces.el package. It were those #{} things which works inside JSF tags only. The difference with standard JSP EL ${} is that it doesn't only do get, but can also do set. This was mandatory for managed bean auto-creation and setting the values of input components. The standard EL ${} works in JSF output tags as well, but they won't auto-create beans if they don't exist in scope yet and they won't set input values.

2004 年 3 月、 JSF 1.0 が、 javax.faces.el パッケージで定義された遅延 EL 式とともに発表された。
#{} は、 JSF のタグの中でだけ動作した。
#{} は、 get だけでなく set も呼び出せるという点で JSP の EL 式 ${} と違っていた。
これは、マネージドビーンを自動生成して、入力コンポーネントの値をセットするために必須のものでした。
標準 EL 式 ${} は、 JSF の出力タグとして動作しました。しかし、スコープ内にビーンが存在しないと、ビーンを自動生成せず、入力値のセットも行われませんでした。

May 2005: While still preparing for new JSP 2.1 which should be released May 2006, deferred EL #{} was extracted from JSF and combined with standard EL ${} in the javax.el package. At that point, it became unified EL which was introduced with JSF 1.2 and became later part of JSP 2.1 and Java EE 5 standard. The #{} can now also be used in JSP tags to get values, but not to set values..

2005 年 5 月、 2006 年 5 月にリリース予定の新たな JSP 2.1 が準備されているなか、遅延 EL 式 #{} が JSF から分離され、標準 EL 式 ${} と共に javax.el パッケージに統合されました。その時点で、統一 EL 式が JSF 1.2 と共に発表され、後の JSP 2.1 や Java EE 5 の標準仕様の一部となりました。
#{} は、 JSP タグの中でも値の取得に使えるようになりました。しかし、値の設定はできません。。。

Nov 2006: Facelets was introduced as successor of JSP. It allowed for use of #{} in template text outside JSF tags, as substitute for <h:outputText> without any attributes. It also treats ${} as #{}, so they both behave the same in Facelets.

2006 年 11 月、 Facelets が JSP の後継として発表されました。 Facelets では、 #{} を JSF のタグの外で、 <h:outputText> の代わりに属性の指定などなく使えるようになりました。
${} は、 #{} と同じように扱われます。つまり、 Facelets では両者は同じ振る舞いをします

Dec 2009: EL was extracted from JSP specification and became a standalone specification which will be maintained independently from JSP, the first version being EL 2.2 (JSR-245), analogous with JSP 2.2. Main new feature is calling parameterized methods instead of only calling Javabean getters/setters inside #{} syntax, e.g. #{bean.method(argument)}. Furthermore, Facelets became part of Java EE 6 standard.

2009 年 12 月、 EL 式は JSP の仕様から取り除かれ、単独の仕様として JSP から独立してメンテナンスされるようになりました。最初のバージョンは EL 2.2 (JSR-245) で、 JSP 2.2 と似ています(訳注:なんか訳が変?)。
主だった新しい機能は、 Java Beans の getter/setter を呼ぶ代わりに、パラメータ化されたメソッドの呼び出しが #{} の中でできるようになったことです。例えば、 #{bean.method(argument)} といった感じです。
さらに、 Facelets は Java EE 6 の仕様の一部となりました。

Jun 2013: EL 3.0 was introduced which comes with a standalone EL processor, allowing usage in a plain Java SE application. Other main new features are the new string concatenation operator +=, new operations for collection objects, including streams and Lambda expressions -> (even on Java 6/7!) and importing constants into EL scope.

2013 年 6 月、 EL 3.0 では、独立した EL 式のプロセッサが登場することが発表されました。それは、 Java SE アプリケーションでも EL 式を使えるようになることを意味します。
他の主だった新規機能としては、文字列の連結に += 演算子が使えるようになったこと、コレクションオブジェクトのための新しい演算子が追加されたこと、 Stream とラムダ式 -> が追加されたこと(Java 6 または 7 で)、そしてクラスをインポートする仕組みが追加されたことなどがあります。

11
13
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
13