<?xml version="1.0" encoding="Shift_JIS" ?>

<document>

 <properties>
  <title>Velocity Design</title>
  <author email="jvanzyl@locus.apache.org">Velocity Documentation Team</author>
  <translator>熊坂祐二</translator>
  <translator>高橋達男</translator>
  <translator>吉岡朋子</translator>
  <original>design</original>
 </properties>

 <body>

 <section name="Design" alias="設計">

<primary>
 <p>
    Velocity is a Java-based template engine. It can be used as a
    standalone utility for generating source code, HTML, reports,
    or it can be combined with other systems to provide template
    services. Velocity will be tightly integrated with the
    <a href="http://java.apache.org/turbine">Turbine</a>
    web application framework. Velocity-Turbine
    provide a template service by which web applications may be
    developed according to a true MVC model.
 </p>
</primary>
<p>
Velocity は、Java ベースのテンプレートエンジンです。
ソースコード、HTML、レポートを生成するためのスタンドアローンユーティリティ
としても使えますし、他のシステムと組み合わせて、
テンプレートサービスを提供することも出来ます。
Velocity は、<a href="http://java.apache.org/turbine">Turbine</a>
Web アプリケーションフレームワークと緊密に統合されています。
Velocity-Turbine は、Web アプリケーションを真の MVC モデルに従って
開発できるテンプレートサービスを提供します。
</p>

<primary>
 <p>
    Velocity has a myriad of potential uses -- generating SQL, PostScript,
    or Java source code from templates -- but web developers looking for
    a viable alternative to
    <a href="http://www.php.net/">PHP</a> and
    <a href="http://java.sun.com/products/jsp/">Java
    Server Pages</a> (JSPs) are expected to be its principle user group.
 </p>
</primary>
<p>
Velocity には、その利用に関して無限の可能性があります ─ 
テンプレートからSQL や PostScript や Java ソースコードを生成できます ─ 
しかし、主要なユーザグループとして想定されるのは、
<a href="http://www.php.net/">PHP</a> や
<a href="http://java.sun.com/products/jsp/">Java
Server Pages</a> (JSP) の実行可能な代案を探している Web 開発者でしょう。
</p>

<primary>
 <p>
    Velocity allows web page designers to embed simple yet powerful script
    elements in their web pages. These script elements work
    in conjunction with a Context object, which is defined in Java code.
    A context object--essentially a hashtable that provides get and set
    methods for retrieving and setting objects by name within the Context
    --provides a &quot;hook&quot; from the Java code to the Velocity script
    elements. These script elements allow a web designer to retrieve
    objects from the Context and insert these into a web page as text
    values. The web designer has some control over looping (for each)
    and conditional statements (if/else).
 </p>
</primary>
<p>
Velocity を使うと、Web ページデザイナが、単純であるにもかかわらず強力なスクリプト要素を
Web ページに埋め込むことができます。
これらのスクリプト要素は、Java コードで定義される
コンテキストオブジェクトと連動して動作します。
コンテキストオブジェクト ─ 本質的にはコンテキスト内で、
名前を使ってオブジェクトの取り出しと設定をする
get、set メソッドを提供するハッシュテーブル
─ は、Java コードから Velocity スクリプトへの「接続(hook)」を提供します。
Web デザイナは、これらのスクリプト要素を使って、
オブジェクトをコンテキストから取り出して、
テキスト値としてこれらをWeb ページに挿入できます。
また、Web デザイナは、ループ(for each)や条件文
(if/else)を制御できます。
</p>

<primary>
 <p>
    Velocity enforces a Model-View-Controller (MVC) style of development
    by separating Java code from HTML template code. Unlike JSPs,
    Velocity does not allow Java code to be embedded in pages. Unlike PHP,
    Velocity does not implement features with other functions. The MVC
    approach is one of Velocity's great strengths, and allows for more
    maintainable and better-designed web pages.
 </p>
</primary>
<p>
Velocity では、Java コードを HTML テンプレートコードから切り離すことによって、
モデル-ビュー-コントローラ(MVC)スタイルの開発を強化できます。
JSP と違って、Velocity は Java コードをページに埋め込ませません。
PHP と違って、Velocity は他の関数を使った機能実装をさせません。
MVC アプローチは、Velocity の素晴らしい利点のうちのひとつで、
それによって、保守しやすく、うまくデザインされた Web ページを実現できます。
</p>

<primary>
 <p>
    Although MVC-style development can sometimes lead to longer incubation
    periods for web sites, particularly if the developers involved are new
    to MVC, this approach saves time over the long term (believe us, we have
    been doing this for a long time now). The MVC abstraction prevents web page
    designers from messing with a software engineer's Java code, and
    programmers from unduly influencing the look of web sites. Velocity enforces
    a contract that defines what roles people play in the web site development
    process.
 </p>
</primary>
<p>
時には、MVC 方式の開発は、Web サイトで長い準備期間が必要になることがあります。
関係する開発者が MVC に不慣れならなおさらです。
しかし、この方法は、長い目で見れば、時間を節約することになります
(信じてください。私たちはこの方法でずっとやってきたのです)。
MVC による抽象化によって、Web ページデザイナがソフトウェアエンジニアの
Java コードに巻き込まれずにすみますし、
プログラマが過度に Web サイトの見た目に影響を与えずにすみます。
Velocity を使うと、Webサイトの開発工程における役割を各人が果たすよう
強いることが出来ます。
</p>

<primary>
 <p>
    Velocity uses a grammar-based parser generated by
    <a href="http://www.metamata.com/javacc/">JavaCC</a> (Java Compiler
    Compiler) using the JJTree extension to create an Abstract Syntax Tree.
 </p>
</primary>
<p>
Velocity は <a href="http://www.experimentalstuff.com/Technologies/JavaCC/">JavaCC</a>
(Java Compiler Compiler) で生成された文法ベースのパーサを使用します。
JavaCCはJJTree 拡張を使って抽象構文木(Abstract Syntax Tree)を生成します。
</p>

<primary>
 <p>
    Velocity's design concept is borrowed from <a
    href="http://www.webmacro.org/">WebMacro</a>. Those involved in the
    Velocity project acknowledge and appreciate the development and design work
    that went into the WebMacro project.
 </p>
</primary>
<p>
Velocity の設計コンセプトは、
<a href="http://www.webmacro.org/">WebMacro</a> に由来しています。
Velocity プロジェクト関係者一同は、
WebMacro プロジェクトに開発と設計にかかわった方々に感謝をいたします。
</p>

</section>

</body>
</document>

