cvs: peardoc /ja/chapters faq.xml

From: Date: Fri, 17 Oct 2003 16:46:17 +0000
Subject: cvs: peardoc /ja/chapters faq.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1660@lists.php.net to get a copy of this message
elf Fri Oct 17 12:46:17 2003 EDT Added files: /peardoc/ja/chapters faq.xml Log: o add japanese document.

Index: peardoc/ja/chapters/faq.xml +++ peardoc/ja/chapters/faq.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- sync: 1.8 --> <!-- [mj] The FAQ needs some heavy revision - don't translate it right now --> <chapter id="faq"> <title>FAQ - 頻出する質問</title> <titleabbrev>FAQ</titleabbrev> <sect1 id="faq.whatis"> <title> PEAR?とは? </title> <para> これについては<link linkend="introduction">ここ</link>に記述されています。 </para> </sect1> <sect1 id="faq.contributor"> <title> How to become a PEAR contributor and/or how to get CVS access to PEAR? </title> <titleabbrev> 貢献する </titleabbrev> <para> これについては<link linkend="developers.intro">ここ</link>に記述されています。 </para> </sect1> <sect1 id="faq.c-module"> <title> 私はPHPモジュールをC言語で書きました。PEARにこれを含むためのルールは ありますか? </title> <titleabbrev> C-Modules </titleabbrev> <simpara> Answer written by Stig Bakken and Martin Jansen. </simpara> <para> If you just want to make a simple extension that does not follow the <link linkend="standards">PEAR coding standards</link>, put it in pear/PECL/ extname (that is where extensions from php-src/ext/extname will be moved). If you want to write an extension following PEAR's function/class naming, put it in pear/Foo_Bar or whatever the right name is. </para> </sect1> <!-- <sect1 id="faq.install-pecl"> <title> C言語でかかれたPELCモジュールのインストール方法は? </title> <titleabbrev> PECLモジュールのインストール方法 </titleabbrev> <simpara> Answer written by Christian Stocker. </simpara> <simpara> C言語で書かれたPEAR、PECL拡張のサポートはあまりよくできていません。 ここにあなたがあなたのシステム上でC言語で書かれたモジュールを PEAR:Installerが実行するまでの方法を短く記述しています。 </simpara> <simpara> PEARからパッケージをダウンロードし、次にそれをどこかに展開してください。 新しく作成されたディレクトリに移動し、次のステップにうつります。: </simpara> <para> <itemizedlist> <listitem> <simpara> phpize </simpara> </listitem> <listitem> <simpara> ./configure </simpara> </listitem> <listitem> <simpara> make </simpara> </listitem> <listitem> <simpara> cp modules/module.so /usr/local/lib/php </simpara> </listitem> </itemizedlist> </para> <simpara> The path, where the module.so is expected, can be different on your system (check <filename>php.ini</filename> and <function>phpinfo</function>). To actually use the module, you have to add it to the extension directive in <filename>php.ini</filename> or to load it with dl("module.so") within your PHP files. </simpara> <simpara> You can compile this extension directly into your PHP binary, too. For this you have to extract the package into <filename>php-src/ext</filename> (in your source directory). After that do also phpize in this new module-directory. But before you can configure your main php-exectuable, you have to do a <filename>./buildconf</filename> on the toplevel of the php-sources. Now you can configure/compile your PHP executable with the new extension, as you would with all other extensions. </simpara> </sect1> --> <sect1 id="faq.separated"> <title> なぜPEARはpear/とphp-src/pear/に分かれているのですか? </title> <titleabbrev> どうしてpear/とphp-src/pearが? </titleabbrev> <simpara> まずphp-src/pearにPEARの第一要素が保存されています。 そしてそれらは新しいPHPのリリースにバンドルされました。 </simpara> <simpara> For future releases of PEAR this isn't workable because PEAR will become too big to be bundled with every release of PHP. So there was a decision to commit all new elements to an own top level directory pear. The other elements which are currently remaining in php-src/pear will be moved to the new top level directory soon. Only the <link linkend="about-pfc">PFC code</link> and the PEAR package manager code will be bundled with every new release automatically. </simpara> </sect1> <sect1 id="faq.directory-structure"> <title> なぜpear/とphp-src/pear/でディレクトリ構造が違うのですか? </title> <titleabbrev> なぜpear/とphp-src/pearは違うのですか? </titleabbrev> <simpara> Answer written by Stig Bakken. </simpara> <para> <filename>php-src/pear/</filename>のディレクトリ構造は、 インストールツリーに適した構造になっています。 (デフォルトが<filename>/usr/local/lib/php</filename>), そして単純な階層を構成しています。 しかし<filename>pear/</filename>の構造はパッケージに属する ファイル構成になっています。 Where files are located in each package directory is completely independent from where they end up being installed, this is all determined by the package description file. </para> </sect1> <sect1 id="faq.flat-structure"> <title> Why a flat directory structure instead of a deep? </title> <titleabbrev> Flat structure </titleabbrev> <simpara> Answer written by Stig Bakken. </simpara> <simpara> In CVS, PEAR code is organized by package instead of hierarchical like it would finally be installed. For example, if you want to use the XML_RPC class, you include "XML/RPC.php". It's easy to think that in CVS, this file should be in pear/XML/RPC.php, but that's not the case. XML_RPC is an independent package with its own directory in CVS, in this case the RPC.php file is actually located at pear/XML_RPC/RPC.php. The package description file (package.xml) is used to say where the files should finally be installed. </simpara> <simpara> The reason CVS is organized this way is that it makes package administration much easier. </simpara> </sect1> <sect1 id="faq.unstable-code"> <title> 実験的、または不安定なものをコミット出来ますか? </title> <titleabbrev> 不安定なコード </titleabbrev> <para> Yes. But make sure, that you mark up the experimental/unstable status of the project in the documentation. The best place to do this is in the <filename>package.xml</filename> in the &lt;status&gt;-tag. The values for this tag are <variablelist> <varlistentry> <term>alpha</term> <listitem> <simpara> early stages of development, all things could change (API, behavoir) without notice, expect lots of bugs </simpara> </listitem> </varlistentry> <varlistentry> <term>beta</term> <listitem> <simpara> API should normally not change, usable software, expect bugs </simpara> </listitem> </varlistentry> <varlistentry> <term>devel</term> <listitem> <simpara> a release for other developers who want early access to test and give feedback, code quality may vary from pre-alpha to stable </simpara> </listitem> </varlistentry> <varlistentry> <term>stable</term> <listitem> <simpara> the software was tested, the API fixed, the documentation wrote and is the recommended release for users and production enviroments </simpara> </listitem> </varlistentry> <varlistentry> <term>snapshot</term> <listitem> <simpara> a CVS snapshot from a certain date </simpara> </listitem> </varlistentry> </variablelist> </para> </sect1> <sect1 id="faq.add-examples"> <title> Am I expected to add examples and/or test files to my package and where to store them? </title> <titleabbrev> サンプルの追加 </titleabbrev> <para> Examples are a good idea, especially when your class has a complex API. But examples are only a part of a documentation. Don't create examples instead of a documentation. You should store the documentation and the examples in a sub directory 'docs' of the package directory. </para> <para> Test scripts are recommended when your class has to be compiled, requires special extentions/programs or needs correctly installed additional files (i.e. templates, graphics). Store them in sub directory called 'tests'. </para> </sect1> <sect1 id="faq.competitive-packages"> <title> Are different packages or classes with similar features allowed? </title> <titleabbrev> Competitive code </titleabbrev> <simpara> There is no problem with competitive packages, but we want to avoid pollution with 10 template classes, 7 different mail classes, and 3 different layers for databases doing the same only with different function names. </simpara> <para> First of all, do a reality check: Why do I want to commit a new package? Really bad answers are <quote>To see my name in PEAR</quote> or <quote>I didn't understand the API of the existing class</quote>. </para> <para> A good reason for a new class is often, that you are missing a function, behaviour or speed in an existing implementation. In this case, you should take a look at this class, if it possible to extend this class. If not, then you have a good reason to commit a new class. <quote>If not</quote> means, it isn't possible to add the required functionality without changing the basics of this class. </para> <simpara> If you write a new class, try to keep API compatibility with existing classes as far as possible! If it isn't possible to keep the class compatible himself, try to create a wrapper class to keep compatibility. Don't care, if this wrapper needs a lot of time or memory, a wrapper class only has to keep compatibility and make migration easier. </simpara> <para> Committing a competitive class has to be announced on the <ulink url="mailto:&email.pear.dev;">PEAR developers mailinglist</ulink>! </para> </sect1> <sect1 id="faq.question"> <title> 私はPEARに疑問があります。どこで尋ねればいいですか? </title> <titleabbrev> 質問すること </titleabbrev> <para> <itemizedlist> <listitem> <para> General questions about the usage of PEAR components should be posted to the mailing list <ulink url="mailto:&email.pear.general;">&email.pear.general;</ulink>. </para> </listitem> <listitem> <para> All technical discussions concerning the development of PEAR components should be posted to <ulink url="mailto:&email.pear.dev;"> &email.pear.dev;</ulink>. </para> </listitem> <listitem> <para> Question concerning the website can be sent to <ulink url="mailto:&email.pear.webmaster;"> &email.pear.webmaster;</ulink>. </para> </listitem> </itemizedlist> </para> <para> Information on subscribing this mailing lists can be found <ulink url="&url.pear.support;">here</ulink>. </para> <para> On all mailing lists mentioned above the language is english and the way you ask questions should always be polite :-). </para> </sect1> <sect1 id="faq.require"> <title> A required package includes a package, my package needs it too. Should I include it again? </title> <para> Yes. You should include every package, you need with <function>require_once</function> or <function>include_once </function>, also when it is included already by another package. </para> </sect1> <sect1 id="faq.windows"> <title> PEARはWindowsで動作しますか? </title> <titleabbrev> PEARとWindows </titleabbrev> <para> WindowsでPEARの動作させるには、PEARをインストールしたディレクトリ (例えば<filename>c:\php\pear</filename>)をあなたの <filename>php.ini</filename>のinclude_pathに追加する必要が あるだけです。 </para> <simpara> Note: いくつか*nixの特定のコマンドを使用するため、Windowsで動作しないクラス (Schedule/At.phpのように)があります。 </simpara> </sect1> <sect1 id="faq.licenses"> <title> What licenses are allowed in PEAR/PECL? </title> <titleabbrev> Allowed licenses </titleabbrev> <simpara> Answer written by Jan Lehnardt, Tomas V.V. Cox and Rasmus Lerdorf. </simpara> <para> To make it short: Any Open Source/Free Software License. See the <ulink url="&url.license.opensource;"> OSI Approved Licenses</ulink> for a summary of Open Source licenses and <ulink url="&url.license.gnu;"> FSF Approved Licenses</ulink>. Pick one that appears on both lists. It does not need to be a GPL-compatible license from the FSF list. Here are a subset of the licenses that are on both lists: Apache License, Artistic license, BSD license, Common Public License, GPL, IBM Public License, Intel Open Source License, Jabber Open Source License, LGPL, MIT license, Mozilla Public License, PHP License, Python license, Python Software Foundation License, QPL, Sleepycat License, Sun Industry Standards Source License (SISSL), Sun Public License, W3C license, zlib/libpng license, Zope Public license. </para> <para> The recommended licenses are <ulink url="&url.license.php;">PHP</ulink>, <ulink url="&url.license.lgpl;">LGPL</ulink> and <ulink url="&url.license.bsd;">BSD</ulink> style. </para> <para> Note that for PECL extensions that are linked into PHP, the license must be compatible with the PHP license. That means you can not GPL a PECL extension or you would be violating the GPL. Note also that if you write an extension that links against a GPL'ed library you will be violating the GPL. If you need to link against a GPL'ed library, get permission from the author of the library. </para> <para> To set the license of you PEAR/PECL package, put it in the head of all source code files of your package and also the type of it inside the &lt;license&gt; tag of your package description file (<filename>package.xml</filename>). </para> </sect1> <sect1 id="faq.tabs-vs-spaces"> <title> なぜPEARコーディング標準はインデントはスペースのみなのですか? </title> <titleabbrev> タブとスペース </titleabbrev> <simpara> Answer written by Stig Bakken. </simpara> <para> タブを使用せずスペースを用いることは,コードがすべてのエディタおよび ビューワで一貫して表示されることを保証するただ一つの方法です。 多くのエディタはタブに4つのス、ースを与え,またたくさんのエディタ、 ターミナル・プログラムやユーティリィティは8つのスペースをタブに与えます。 例: <literallayout><![CDATA[printf("%s", $arg);]]></literallayout> この例では7つのスペースが"$arg"の前にあります。 もしこのコードが4つのスペースでタブが表示されるエディタの中で書かれれば、 1つのタブおよび3つのスペースとして格納されるでしょう。 もし他の開発者が8つのスペースでタブが表示されるエディタで 同じファイルを編集すると,次のように見えるでしょう: <literallayout><![CDATA[printf("%s", $arg);]]></literallayout> </para> <para> おなじように、8つのスペースでタブを扱うエディタでの次のコードを 考えてみましょう: <literallayout><![CDATA[ if ($foo && $bar) { }]]></literallayout> 4つのスペースでタブを扱うエディタでは,次のように見えます。: <literallayout><![CDATA[ if ($foo && $bar) { }]]></literallayout> </para> <simpara> PEARのような人々が多くの異なったシステムやエディタを使用する コミュニティでは、タブは単純には機能しません。 人々は結局、それぞれのエディタでレンダリングに空白を使用し、 他の人には壊れたレンダリングを見せてしまうでしょう。 スペースを使うことだけが、だれにでも同じように見えるようにする 唯一の方法なのです。 </simpara> <para> Jamie Zawinskiも <ulink url="&url.tabs.vs.spaces;">この問題について</ulink> 書いています。 </para> <para> またコードを適切なスタイルに変換するのを助ける <ulink url="&url.astyle;">Astyle</ulink>というツールがあります。 </para> </sect1> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil sgml-namecase-general:t sgml-general-insert-case:lower End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#1660) next »