{JA} - 2.3.1 App フォルダ

アプリケーション開発の大部分は、CakePHP の app フォルダ内で行われます。app の内部フォルダについて調べてみましょう。

config は、CakePHP が使用する(数個の)設定ファイルが入る場所です。データベース接続の詳細、ブートストラップ、コアの設定ファイルなどがここに入ります。
controllers には、アプリケーションのコントローラとコンポーネントが含まれます。
locale には、国際化のための文字ファイルが入っています。
models には、アプリケーションのモデル、ビヘイビア、データソースがあります。
plugins には、プラグインパッケージが入っています。
tmp これは、CakePHP が一時的なデータを保管する場所です。保管される実際のデータは、CakePHP の設定しだいですが、このフォルダは通常、モデルの内容デ ータや、ログの保管に使用されます。時にはセッション情報も入ります。
vendors 外部(サードパーティ)で作成されたクラスやライブラリは、ここに置いてください。そうすることで、App::import('vendor', 'name') で簡単にアクセス できるようになります。注意して観察している人は、これは重複しているのではないか、と言うかもしれません。ディレクトリ構造のいちばん上にも vendors フォルダがあるからです。この二つのフォルダの違いは、複数のアプリケーションを動作させて、より複雑なシステムセットアップをする場合のことを考える際 に扱いましょう。
views 表示用のファイルはここに置きます。エレメント、エラーページ、ヘルパー、レイアウト、ビューのファイルなどです。
webroot 運用時(production)用のセットアップでは、このフォルダがアプリケーションのドキュメントルートになります。CSS スタイルシートや画像、JavaScript を入れるためのフォルダもあります。

{EN} - 2.3.1 The App Folder

CakePHP’s app folder is where you will do most of your application development. Let’s look a little closer at the folders inside of app.

config Holds the (few) configuration files CakePHP uses. Database connection details, bootstrapping, core configuration files and more should be stored here.
controllers Contains your application’s controllers and their components.
locale Stores string files for internationalization.
models Contains your application’s models, behaviors, and datasources.
plugins Contains plugin packages.
tmp This is where CakePHP stores temporary data. The actual data it stores depends on how you have CakePHP configured, but this folder is usually used to store model descriptions, logs, and sometimes session information.
vendors Any third-party classes or libraries should be placed here. Doing so makes them easy to access using the App::import('vendor', 'name') function. Keen observers will note that this seems redundant, as there is also a vendors folder at the top level of our directory structure. We'll get into the differences between the two when we discuss managing multiple applications and more complex system setups.
views Presentational files are placed here: elements, error pages, helpers, layouts, and view files.
webroot In a production setup, this folder should serve as the document root for your application. Folders here also serve as holding places for CSS stylesheets, images, and JavaScript files.

Differences

Lines: 1-31Lines: 1-35
-<title>The App Folder</title>
<p>CakePHP’s app folder is where you will do most of your application development. Lets look a little closer at the folders inside of app.</p>
+<title>App フォルダ</title>
<p>アプリケーション開発の大部分は、CakePHP app フォル内で行われまapp の内部フォルダについて調べてみましょう。</p>
 <table> <table>
 <tr><th>config</th> <tr><th>config</th>
-<td>Holds the (few) configuration files CakePHP uses. Database connection details, bootstrapping, core configuration files and more should be stored here.</td></tr> +<td>は、CakePHP が使用する(数個の)設定ファイルが入る場所です。データベース接続の詳細、ブートストラップ、コアの設定ファイルなどがここに入ります。</td></tr>
 <tr><th>controllers</th> <tr><th>controllers</th>
-<td>Contains your applications controllers and their components.</td></tr> +<td>にはアプリケーションのコントローラとコンポーネントが含まれま</td></tr>
 <tr><th>locale</th> <tr><th>locale</th>
-<td>Stores string files for internationalization.</td></tr> +<td>には、国際化のための文字ファイルが入っています。</td></tr>
 <tr><th>models</th> <tr><th>models</th>
-<td>Contains your applications models, behaviors, and datasources.</td></tr> +<td>にはアプリケーションのモデル、ビヘイビア、データソースがありま</td></tr>
 <tr><th>plugins</th> <tr><th>plugins</th>
-<td>Contains plugin packages.</td></tr> +<td>には、プラグインパッケージが入っています。</td></tr>
 <tr><th>tmp</th> <tr><th>tmp</th>
-<td>This is where CakePHP stores temporary data. The actual data it stores depends on how you have CakePHP configured, but this folder is usually used to store model descriptions, logs, and sometimes session information.</td></tr> +<td>これは、CakePHP が一時的なデータを保管する場所です。保管される実際のデータは、CakePHP の設定しだいですが、このフォルダは通常、モデルの内容デ<br />ータや、ログの保管に使用されます。時にはセッション情報も入ります。</td></tr>
 <tr><th>vendors</th> <tr><th>vendors</th>
-<td>Any third-party classes or libraries should be placed here. Doing so makes them easy to access using the App::import('vendor', 'name') function. Keen observers will note that this seems redundant, as there is also a vendors folder at the top level of our directory structure. We'll get into the differences between the two when we discuss managing multiple applications and more complex system setups.</td></tr> +<td>外部(サードパーティ)で作成されたクラスやライブラリは、ここに置いてください。そうすることで、App::import('vendor', 'name') で簡単にアクセス<br />できるようになります。注意して観察している人は、これは重複しているのではないか、と言うかもしれません。ディレクトリ構造のいちばん上にも vendors フォルダがあるからです。この二つのフォルダの違いは、複数のアプリケーションを動作させて、より複雑なシステムセットアップをする場合のことを考える際<br />に扱いましょう。</td></tr>
 <tr><th>views</th> <tr><th>views</th>
-<td>Presentational files are placed here: elements, error pages, helpers, layouts, and view files.</td></tr> +<td>表示用のファイルはここに置きます。エレメント、エラーページ、ヘルパー、レイアウト、ビューのファイルなどです。</td></tr>
 <tr><th>webroot</th> <tr><th>webroot</th>
-<td>In a production setup, this folder should serve as the document root for your application. Folders here also serve as holding places for CSS stylesheets, images, and JavaScript files.</td></tr> +<td>運用時(production)用のセットアップでは、このフォルダがアプリケーションのドキュメントルートになります。CSS スタイルシートや画像、JavaScript を入れるためのフォルダもあります。</td></tr>
 </table> </table>