レベルエンター山本大のブログ

面白いプログラミング教育を若い人たちに

BLOCKVROCKリファレンス目次はこちら

Wicket Examples ■Wicket Features

Wicketの特徴

※ 最近Guiceと共に気に入ってるWicketの公式サンプル解説を訳します。
Wicket (http://wicket.sourceforge.net)


Swing-like OO Component Model Swingによく似たオブジェクト指向コンポーネント
Pages and Components in Wicket are real Java objects that support encapsulation, inheritance and events.

Wicketのページやコンポーネントは、カプセル化、継承、そしてイベントをサポートした真のJavaオブジェクトです。


Ease of Development 開発容易性(Ease of Development)
Because Wicket is Java and HTML, you can leverage what you know about Java or your favorite HTML editor to write Wicket applications.

WicketJavaとHTMLだけで作れるので、Wicketアプリケーションを作るのに今までのJavaの知識やお好きなHTMLエディターが利用できます。


Separation of Concerns 関心事の分離
Wicket does not mix markup with Java code and adds no special syntax to your markup files.
The worlds of HTML and Java are parallel and associated only by Wicket ids, which are attributes in HTML and Component properties in Java. Since Wicket HTML is just HTML and Wicket Java is just Java, coders and designers can work independently to a large degree and without relying on any special tools.


Wicketは、JavaCodeに混ぜ物を含みません。それに特別な構文のマークアップファイル(XMLJSPなど)を追加する必要もありません。
HTMLの言語とJava言語は、WicketのIDであるHTMLの属性とコンポーネントJavaプロパティーのみによって、互いに協調動作し合います。
WicketHTMLはただのHTMLであり、WicketJavaはただのJavaコードです。そのためデザイナーは特別なツールを一切使わずに、非常に自由に(大幅に独立して)仕事をすることができます。


Secure 安全
Wicket is secure by default. URLs do not expose sensitive information and all component paths are session-relative.
Explicit steps must be taken to share information between sessions.
There are plans for the next version of Wicket to add URL encryption to support highly secure web sites.


Wicketは、はじめから安全です。URLに機密情報を表示することはありませんし、すべてのコンポーネントパスは、セッションに紐付けられています。
Sessionをまたいで情報を共有するには明示的な方法をとる必要があります。
より高い安全性を持つWebサイトをサポートするために、次のバージョンのWicketで「URLの暗号化機能」を追加する計画があります。


Transparent, Scalable Clustering Support 透過的でスケーラブルなクラスタリングのサポート
All Wicket applications will work on a cluster automatically and without additional work.
Once bottlenecks are understood, Wicket enables tuning of page state replication. The next version of Wicket will support client-side models for zero-state scalability.


すべてのWicketのアプリケーションは、追加作業なしで自動的にクラスタリング環境で動作します。
一度ボトルネックを理解すれば、Wicketはページの状態を複製を調整可能にします。
Wicketの次のバージョンは、スケーラビリティーが全く必要ないアプリケーションのためにクライアントサイドモデルをサポートする予定です。


Transparent Back Button Support 透過的な「戻る」ボタンのサポート
Wicket supports configurable page version management.
When users submit a form or follow a link from a page they accessed with the back button in their browser,
Wicket is able to revert the page object to the state it was in when the page was originally rendered.
This means you can write web applications that support the back button with very little work.


Wicketは設定可能なページVersionの管理をサポートしています。
ユーザーがフォームをサブミットしたり、リンクによってページを遷移したりした後で、ブラウザの戻るボタンを押すと、
Wicketは、ページオブジェクトの状態を、ページが初めに表示されたときの状態に戻せるようにしています。
これによって、Webアプリケーションの戻るボタンをとても簡単に作ることができます。


Reusable Components 再利用可能なコンポーネント
Reusable components in Wicket are particularly easy to create.
Not only can you extend existing components with the Java extends keyword,
but you can also create Panel components which associate a group of components as a reusable unit.


Wicketの再利用可能なコンポーネントは、特別に簡単に作れます。
既存のコンポーネントJavaの「extend」キーワードによって拡張することができるだけではなく、
再利用可能なユニットとして、複数のコンポーネントを関連づけた「パネルコンポーネント」を作ることもできます。


Simple, Flexible, Localizable Form Validation シンプルで、自由度の高い、多言語に対応したフォームのバリデーション

It is trivial to write and use validators in Wicket. It is also quite easy to customize and localize the display and content of validation error messages.

Wicketでバリデータを利用するのはほんの少しの記述ですみます。
それに、とっても簡単にカスタマイズでき、とっても簡単に表示やバリデーションのエラーメッセージの内容を多言語化できます。


Typesafe Sessions タイプセーフなセッション
Wicket eliminates the need to manage HttpSession attributes by hand.
Page and component objects are transparently stored in the session and your application can create a custom session subclass with typesafe properties as well.
All objects stored in the session can automatically participate in clustering replication.


Wicketでは、HttpSessionの属性を手動で管理する必要がありません。
ページとコンポーネントオブジェクトは、透過的にセッションに保存されます。また、おまけにタイプセーフなプロパティーをもった、セッションのカスタムサブクラスを作ることもできます。
セッションに保存されたすべてのオブジェクトは、自動的にクラスタリングレプリケーションに参加させることができます。


Factory Customizable カスタマイズ可能なファクトリー
Wicket is very extensible. Most operations are customizable through factories or factory methods.

Wicketは、とても拡張性に富んでいます。ほとんどの操作は、ファクトリーやファクトリーメソッドによってカスタマイズすることができます。


Detachable Models 取り外し可能なモデル
Model objects in Wicket can be very lightweight in terms of memory and network use in a cluster.
When a model is used, it can "attach", populating itself with information from persistent storage.
When the model is no longer in use, transient information can be reset, reducing the size of the object.


Wicketでのモデルオブジェクトは、クラスタリングでメモリーとネットワークを利用する場合には、とても軽量なものにすることができます。
モデルが使われているとき、永続化ストレージからの情報でそれ自身の設定して、”接続”することができます。
モデルが使われなくなったとき、一時的な情報はリセットして、オブジェクトのサイズを削減できます


Border Components 境界線のコンポーネント
Wicket Border components enable the decoration of pages in a reusable fashion. This is especially useful for inheritance of common navigational structures or layout.

Wicketの境界線コンポーネントは、再利用可能なはやりのページの見栄えにすることができます。
これは、共通のナビゲーションの構造やデザインの継承をするときには、特に使えます。


Support for All Basic HTML Features すべての基本的なHTMLの機能をサポートする
Wicket supports image tags, links, forms and everything else that you're used to using in your web application development.

Wicketはイメージタグ、リンク、フォーム、それからすべての過去に見かけたすべてのタグをサポートしています。


Programmatic Manipulation of Attributes プログラム可能な属性の操作
Wicket Components can programmatically change any HTML tag attribute.

Wicketコンポーネントは、どのようなHTMLタグ属性でもプログラミングで書き換えることができます。


Automatic Conversions 自動変換
Once a Form validates, the model can be updated using Wicket converters.
Most ordinary conversions are built-in and it is easy to write new converters.


フォームのバリデーターを一度作ると、モデルはWicketコンバーターをつかって更新できます。
もっとも標準的な変換は組み込まれており、あたらしいコンバーターを書くのも簡単です。


Dynamic Images 動的イメージ
Wicket makes image use, sharing and generation very easy. Dynamic images can be created by simply implementing a paint method.

Wicketでは、イメージを使ったり共有したり生成したりするのがとても簡単です。
動的なイメージは、実装が簡単なペイントメソッドをつかって作ることができます。


Pageable ListView ページ遷移が可能なリストビュー
ListViews in Wicket are extremely powerful. You can nest any kind of component in a ListView row, even other ListViews.
PageableListView supports navigation links for large lists.


Wicketのリストビューは、とてもパワフルです。リストビューの行にはどんな種類のコンポーネントでもネストすることができます。他のリストビューでさえネストできます。
数の多いリストのためにページング可能なリストビューは、ナビゲーションリンクをサポートしています。


Tree Component ツリーコンポーネント
Out of the box tree component for navigating and selecting nodes.

ナビゲートやノード選択のための独創的なツリーコンポーネントがあります


Localization ローカライゼーション
HTML pages, images and resource strings can all be localized.

HTMLページ、イメージやリソースの文字列は全てローカライズが可能です。


Examples サンプル
Wicket has numerous examples showcasing all of the above features.

Wicketは、上記の全ての機能を試すことができる沢山のサンプルがあります