Actions

Difference between revisions of "開発者エリア/Maharaアーキテクチャイントロダクション/コアサブシステム"

From Mahara Wiki

< 開発者エリア/Maharaアーキテクチャイントロダクション
Line 21: Line 21:
 
===Cron===
 
===Cron===
  
Maharaは内部的にcronを実装しています。この主な理由は常にcronジョブを設定および繰り返し編集する手間を省くことにあります。cronは内部的に実装されるため、新しいプラグインをどのcronジョブをMaharaで動作させるか簡単に登録できます。登録したcronジョブは確実に適切な時間に動作します (メモ: Maharan内部ジョブとして実行させるため、あなたはcronジョブの設置が必要ですが、Maharaのセットアップ時のみに設定して後は忘れてください)。As cron is implemented internally, new plugins can simply register what cron jobs they want to run with Mahara, which will ensure they are run at the appropriate times (note: you still need one cron job set up to trigger Mahara's internal cron, but you set it up when setting up Mahara and then forget about it).
+
Maharaは内部的にcronを実装しています。この主な理由は常にcronジョブを設定および繰り返し編集する手間を省くことにあります。cronは内部的に実装されるため、新しいプラグインをどのcronジョブをMaharaで動作させるか簡単に登録できます。登録したcronジョブは確実に適切な時間に動作します (メモ: Maharan内部ジョブとして実行させるため、あなたはcronジョブの設置が必要ですが、Maharaのセットアップ時のみ設定して後は忘れてください)
  
 
</div><div id="section_4">
 
</div><div id="section_4">

Revision as of 22:15, 29 September 2019

作成中です - mits (talk)

コア開発者およびプラグイン開発者のMaharaコード記述作業を容易にするため、Maharaには特定機能を提供するためのいくつかのサブシステムがあります。あなたはMaharaコードの多くの場所で使われているサブシステムを確認できます。

活動システム

活動システムによりMaharaはシステムで発生していることをユーザに通知できます。これはコアおよびプラグインで提供されるプラグイン可能な活動タイプをサポートします。ここで接続された通知プラグインタイプではどのようにこれらのメッセージを受信するかユーザが選択できます。

データベースレイヤ: ADODB/XMLDB

Maharaはデータベース抽象にADODBの使用によりMySQLおよびPostgreSQLの両方をサポートします。また、スキーマおよびアップデートのためXMLDBを使用します。また、スキーマおよびアップグレードの処理にXMLDBを使用します。Maharaにはレコードの取得、行の挿入および削除のようなシンプルな処理を簡単に実行するためADODBのトップにライブラリがあります。しかし、Maharaの多くの場所では必要なデータを取得するため生のSQLが使用されます。

Maharaのデータベースには外部キーがあります。また、PostgreSQLを使用する場合、さらにデータ整合性機能があります。

Cron

Maharaは内部的にcronを実装しています。この主な理由は常にcronジョブを設定および繰り返し編集する手間を省くことにあります。cronは内部的に実装されるため、新しいプラグインをどのcronジョブをMaharaで動作させるか簡単に登録できます。登録したcronジョブは確実に適切な時間に動作します (メモ: Maharan内部ジョブとして実行させるため、あなたはcronジョブの設置が必要ですが、Maharaのセットアップ時のみ設定して後は忘れてください)。

エラー処理およびロギング Error Handling and Logging

Being a PHP5 application, Mahara provides and uses exceptions for much of the error handling. Mahara also provides excellent logging facilities (to apache error logs) that give detailed error messages and backtraces when a problem occurs. Mahara also catches uncaught exceptions and displays generic "an error occured" pages, that don't give away any information to potential hackers about what went wrong.

フォームビルディング Form Building: Pieforms

Mahara bundles the Pieforms form building library. It provides a very simple way to generate and process forms. It takes away the hard work of writing HTML and even much of the tedious validation work. It also handles session key checking for you, so you'll never generate a form vulnerable to XSS unless your try really hard to work around it. And if necessary, it provides the capability to lay out a form with widgets anywhere you choose - though most of the time you'll be happy enough with the forms generated by default.

HTMLフィルタリング HTML Filtering: HTMLPurifier

In plenty of places in Mahara, user content is displayed. We bundle HTMLPurifier and provide wrapper functions for it, so you never have to worry about users inserting malicious tags. This filter is so good, we've previously had people complain that they can't embed anything at all! Mahara now ships with filters for allowing embedded code from select websites that most people trust, such as Youtube and Slideshare, and the filters are naturally pluggable.

テンプレーティング Templating: Dwoo

Mahara uses Dwoo for its templating needs since Mahara 1.2, and previous to 1.2 used Smarty. PHP developers familiar with Smarty's abilities will find Dwoo quite similar, and we use it extensively throughout Mahara.

Previous: Core Components

前へ: コアコンポーネント