内部構造

□未翻訳

□翻訳中

□翻訳完了(細田謙二)

■レビュー(Omi Chiba)

内部構造

web2pyは公式サイトからダウンロードすることができます:

You can download web2py from the official web site:

http://www.web2py.com

web2pyは、以下のコンポーネントで構成されています:

web2py is composed of the following components:

  • libraries: web2pyのコア機能を提供し、プログラムからアクセスできます。

    • provide core functionality of web2py and are accessible programmatically.

  • web server: Rocket WSGI Webサーバーです。

    • the Rocket WSGI web server.

  • the admin application: 他のweb2pyアプリケーションを作成、設計、管理するために利用します。web2pyアプリケーションを構築するための、完結的なWebベースの統合開発環境(IDE)を提供します。また、WebベースのテストやWebベースのシェルなどの他の機能も用意されています。

    • used to create, design, and manage other web2py applications.admin provide a complete web-based Integrated Development Environment (IDE) for building web2py applications. It also includes other functionality, such as web-based testing and a web-based shell.

  • the examples application: ドキュメントとインタラクティブな例を含んでいます。 exapmles は公式のweb2py.com Webサイトのクローンで、epydoc ドキュメンテーションを盛り込んでいます。

    • contains documentation and interactive examples.examples is a clone of the official web2py.com web site, and includes epydoc documentation.

  • the welcome application: その他すべてのアプリケーションのための、基本的な雛形となるテンプレートです。デフォルトでは、純粋なCSSによるカスケードメニューとユーザー認証(第8章で解説)が含まれます。

    • the basic scaffolding template for any other application. By default it includes a pure CSS cascading menu and user authentication (discussed in Chapter 8).

web2pyはソースコード版のほか、Microsoft Windows用や、Mac OS X用のバイナリ形式で公開されています。

web2py is distributed in source code, and in binary form for Microsoft Windows and for Mac OS X.

配布されたソースコードは、Pythonが動くプラットフォームならどこでも利用可能で、また、上記のコンポーネントを含んでいます。ソースコードを実行するには、Python2.5があらかじめシステムにインストールされている必要があります。また、サポートされているデータベースエンジンの1つがインストールされている必要があります。テスト目的や軽めの要望のアプリケーションには、Python 2.5に含まれているSQLiteデータベースを使用するのもいいでしょう。

The source code distribution can be used in any platform where Python runs and includes the above-mentioned components. To run the source code, you need Python 2.5 pre-installed on the system. You also need one of the supported database engines installed. For testing and light-demand applications, you can use the SQLite database, included with Python 2.5.

バイナリ版のweb2py(Windows用およびMac OS X 用)には、Python 2.5インタプリタとSQLiteデータベースが含まれます。技術的には、これら2つはweb2pyのコンポーネントではありません。これらをバイナリ配布に含めることで、web2pyを難しい設定など無しにすぐに実行することが可能になります。

The binary versions of web2py (for Windows and Mac OS X) include a Python 2.5 interpreter and the SQLite database. Technically, these two are not components of web2py. Including them in the binary distributions enables you to run web2py out of the box.

次の図は、全体的なweb2pyの構造を描いたものです:

The following image depicts the overall web2py structure: