はじめに / Getting Started

The purpose of this document is to define simple documentation on getting started with Turbine. For information about the overall structure of Turbine, please refer to the Functional Specification Document (FSD) as well as the other documentation that is available.

このドキュメントの目的は Turbine ではじめることを簡単なドキュメントで定義することです。Turbine の全体的な構造に関する情報については、利用可能な他のドキュメントと同様に 機能仕様ドキュメント ( FSD ) を参照して下さい。

The first thing that you should do is download and install the Turbine Developer Kit (TDK). The TDK has everything that you need to get started with Turbine, including the Tomcat Servlet Engine which is preconfigured to run Turbine. The TDK also has sample applications as well as scripts that allow you to quickly build your own application. As time progresses, we will be including more and more helpful information in the TDK. Please see the Turbine Development Kit Howto for more information.

まず最初にすべきことは Turbine 開発者キット ( tdk ) をダウンロードしてインストールすることです。Turbine が稼働するために前もって構成されている Tomcat Servlet Engine を含めて、 tdk にはあなたが Turbine で始めるために必要とする全てがあります。tdk は同様にあなたが迅速にアプリケーションを構築することが出来るようになるスクリプトと同様にサンプルアプリケーションがあります。時間が進むに連れ、私たちは TDK の中に多くの手助けとなる情報を盛り込んでいきます。更なる情報については Turbine 開発キット の手引き をご覧下さい。

コード構成 / Code Organization

Turbine can be used in three different ways depending on what you need. You can choose to only use one way or choose to use all three. It is up to you.

Turbine は必要に応じて、3つの異なる方法で使用することができます。単に1つのにするか3つのすべてを使用するか決めることができます。選択についてははあなた自身が行ってください。

  • As a servlet framework with Turbine as the controller.
  • As a framework of useful code in your application.
  • As a Object-Relational Tool.
  • コントローラとして Turbine をともなう Servlet フレームワークとして。
  • アプリケーションにおける有益なコードのフレームワークとして。
  • オブジェクト-リレーショナルツール として。

In all cases, it means that you simply link against the API and code provided in the turbine.jar file. In other words, if you want to only use the Object Relational aspects of Turbine, then you would use Torque to build your Object Relational code and then add the turbine.jar into your classpath. Another example is if you want to use Turbine's connection pool code. All you need to do is tell Turbine where its configuration file is, add turbine.jar to your classpath and then add the appropriate Turbine Java code into your application.

すべてのケースで、単に turbine.jar ファイルで提供される API とコードに対してリンクすることを意味します。言い変えれば、単に Turbine のオブジェクトリレーショナルの見解を使用したいのであれば、オブジェクトリレーショナルのコードを作成するために Torque を使ってその時あなたのクラスパスの中へ Turbine.jar を追加することになります。もう1つの例は Turbine の接続プールコードを使いたいかどうかです。行う必要があることは、Turbineにコンフィギュレーションファイルがどこにあるのかを Turbine に示して、turbine.jarをクラスパスに追加し、そして適切な Turbine の Java コードをアプリケーションに追加するだけことです。

Turbine is now a fairly large codebase. This can be daunting to people who are just starting out with Turbine. However, the code is fairly well organized and as you learn about each part of the code, the entire architecture starts to make sense and is really quite easy to master. All of our code is well javadoc'd so we encourage you to review not only the actual source code, but also the documentation. :-) The different parts of Turbine are:

Turbine は現在かなり大きいコードベースです。これは Turbine とりかかっている人々へひるませることである可能性があります。しかしながら、コードは公正にかなり組織化されていて、コードの各々の部分については知ることが出来るように、この全体のアーキテクトは意味を為すよう、マスターしやすくなり始めます。私たちのコードの全ては健全に Javadoc 化されているのでその結果、私たちは実際のソースコードだけでなくドキュメンテーションも再検討することを助長します :-)Turbine の異なった役 :

  • org.apache.turbine.modules - This is where the code for the Modules system is stored. The different Modules are described in more detail in the funtional specification document.
    org.apache.turbine.modules - これはモジュールシステムのためのコードがストアされた場所です。異なったモジュールが機能仕様ドキュメントでより多くの詳細により記述されています。
  • org.apache.turbine.om - OM stands for Object Model. This is where the code that represents Turbine's Object Model lives. The code in here is for handling a lot of Turbine's RDBMS relationships. For example, there is code that represents what a Turbine User is as well as code for the BaseObject and BasePeer which is for the Peer based Object Relational Tool.
    org.apache.turbine.om - OM はオブジェクトモデルのことです。これは Turbine のオブジェクトモデルを表すコードがある場所です。このコードはたくさんの Turbine の RDBMS 関係を処理します。例えば、 Turbine ユーザが何かを表すコードがあり同様の BaseObject と BasePeer のためのコードはオブジェクトリレーショナルツールに基づきました(Object Relational Tool)。
  • org.apache.turbine.services - This is where the Services Framework lives. The Services framework is a core aspect of Turbine. Essentially it is a framework for creating Singleton objects which may also have an init() and destroy() lifecycle. There are Services for many different things. For example, the Database Connection Pool is a service and so is the Logging (which is backed by Log4J).
    org.apache.turbine.services - これはサービスフレームワークがある場所です。サービスフレームワークは Turbine のコアな見地です。本質的にはシングルトンオブジェクトフレームワークであり、 init() と destroy() でのライフサイクルがあります。多くの異なったもののための Service があります。例えば、データベースコネクションプールはサービスであり、そしてロギング ( Log4J ) です。
  • org.apache.turbine.torque - Torque is our generic tool for building autogenerated code. The benefit of this is that we are able to do things like take a database that is defined as an XML file and then autogenerate the .sql for a specific database as well as Java code that can allow you to easily build an Object Relational system.
    org.apache.turbine.torque - Torque は自動生成コードを作り出すための一般的なツールです。この利点はデータベースを XML ファイルとして定義し、簡単にオブジェクトリレーショナルシステムを構築することが出来る Java コードと同様に、特定のデータベースのために拡張子 .sql のファイルを自動生成出来ることです。
  • org.apache.turbine.util - The Util package is just that. A package of utility code that is used within Turbine. There is code that will allow you to easily send template based email using WebMacro or Velocity as well as many other commonly used web application tools.
    org.apache.turbine.util - この Util パッケージはまさにそれです。ユーティリティコードのパッケージは Turbine 内で使われます。簡単に他の多くの一般に使用される Web アプリケーションツールと同様に WebMacro か Velocity を使用したテンプレートベースの e-mail を送信することが出来るコードがあります。

スタンドアロンでの使用方法 / Standalone Usage

Turbine can be easily used on its own. In order to do so, all you need to do is something like this before you attempt to make a call to Turbine based code:

Turbine は単独で容易に使われることができます。そのようにするには、 Turbineベースのコードをコールすることを試みる前に、これを行うことが必要とされる全てです :

TurbineConfig tc = new TurbineConfig("/path","TurbineResources.properties");
tc.init();

What that does is it tells Turbine the path to its configuration file based on the relative path from "/path" (insert your own path). This is held as a static in memory and therefore you only need to do it once. You do not even have to worry about hanging on to the TurbineConfig object. For more information, please see the javadoc for the TurbineConfig object.

これを行なうことで Turbine に設定ファイルへのパスが「 /path 」(自分の環境に依存したパスを記述します) から相対的なパスに基づかせたことを知らせます。これはメモリ上で静的に持続し、そしてそれゆえにあなたは単に一度だけそれを行なう必要があります。あなたは TurbineConfig オブジェクトについて心配する必要もありません。より多くの情報は、 TurbineConfig オブジェクトのための javadoc を見て下さい。

Turbine Javadocs を生成する / Generating the Turbine Javadocs

To generate the Javadocs for Turbine check out Turbine from CVS, cd to the 'build' directory and execute the javadocs target:

Turbine のために javadoc を生成するためには CVS をチェックアウトします。cd で 'build' のディレクトリまで移動をして、 javadocs ターゲットを実行して下さい :

cd jakarta-turbine/build
ant javadocs

The javadocs will be generated in the ../docs/apidocs directory.

javadoc は../docs/apidocs ディレクトリの中に生成されるでしょう。

さらなる質問とコメント / Further Questions and Comments

If you have further questions or comments, please send them to the Turbine Mailing list.

さらなる質問やコメントは、 Turbine Mailing listへ投稿をしてください。