{"title":"設計思想","version":"2.2","locale":"ja","docname":"misc/design-philosophies","url":"/ja/2.2/misc/design-philosophies/","canonical":"https://djangodocs.dev/ja/2.2/misc/design-philosophies/","summary":"このドキュメントでは、 Django の開発者たちがフレームワークの構築に取り入れ ている根本的な設計思想についていくつか解説します。それによって、 Django の これまでの経緯に説明を与えつつ、将来への指針にしたいと思います。 概要 Link to this heading # 疎結合 Link to this…","html":"<h1>設計思想<a class=\"heading-anchor\" href=\"#design-philosophies\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>このドキュメントでは、 Django の開発者たちがフレームワークの構築に取り入れ ている根本的な設計思想についていくつか解説します。それによって、 Django の これまでの経緯に説明を与えつつ、将来への指針にしたいと思います。</p>\n<section id=\"overall\">\n<h2>概要<a class=\"heading-anchor\" href=\"#overall\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"loose-coupling\">\n<span id=\"id1\"></span><h3>疎結合<a class=\"heading-anchor\" href=\"#loose-coupling\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p id=\"index-0\">Django スタックの基本的な目標は、<a class=\"reference external\" href=\"http://wiki.c2.com/?CouplingAndCohesion\">疎結合と高い凝集度</a> を実現することです。フレームワークの各レイヤーは絶対に必要でない限り、相手をお互いに「知る」べきではありません。</p>\n<p>たとえば、テンプレートシステムはウェブリクエストに関して、データベースレイヤーはデータの表示に関して、ビューシステムはプログラマーが使用しているテンプレートシステムがどんなものか、何も知りません。</p>\n<p>Django は利便性のためにフルスタックとなってはいますが、スタックのどのコンポーネントも、可能な限り独立させてあります。</p>\n</section>\n<section id=\"less-code\">\n<span id=\"id2\"></span><h3>短いコード<a class=\"heading-anchor\" href=\"#less-code\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django のアプリはボイラープレートを書かなくて済むようにできるだけ短いコードになるようにされています。Django は、たとえばイントロスペクションなどの Python の動的な性質を最大限に生かすようになっています。</p>\n</section>\n<section id=\"quick-development\">\n<span id=\"id3\"></span><h3>素早い開発<a class=\"heading-anchor\" href=\"#quick-development\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>21世紀のウェブフレームワークに重要なことは、ウェブ開発の様々な側面を高速で行えるようになっていることです。Django は驚くほど素早いウェブ開発を可能としています。</p>\n</section>\n<section id=\"don-t-repeat-yourself-dry\">\n<span id=\"dry\"></span><h3>同じことを繰り返さない (DRY)<a class=\"heading-anchor\" href=\"#don-t-repeat-yourself-dry\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p id=\"index-1\">多大に区別される概念やデータ構造は、ただ1箇所のみに存在するべきです。冗長性は悪であり、正規化は善です。</p>\n<p>フレームワークは、合理的な範囲内で可能な限り少ないものからできる限り多くのものを推測するべきです。</p>\n<aside class=\"admonition admonition-seealso\">\n<p class=\"admonition-title\">参考</p>\n<p><a class=\"reference external\" href=\"http://wiki.c2.com/?DontRepeatYourself\">Portland Pattern Repository に DRY に関する議論があります</a></p>\n</aside>\n</section>\n<section id=\"explicit-is-better-than-implicit\">\n<span id=\"id5\"></span><h3>暗黙よりもはっきり示した方がいい (Explicit is better than implicit)<a class=\"heading-anchor\" href=\"#explicit-is-better-than-implicit\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>これは、<span class=\"target\" id=\"index-6\"></span><a class=\"pep reference external\" href=\"https://peps.python.org/pep-0020/\"><strong>PEP 20</strong></a> にリストアップされた Python の核となる原則の1つです。つまり、Django は「魔法」を使いすぎてはならないということです。魔法を使っても良いのは、それを本当に使うべき理由があるとき、他の方法では到達できない非常に大きな利便性があるときだけです。ある機能の使い方を学ぶ開発者を混乱させるような方法で実装してはいけません。</p>\n</section>\n<section id=\"consistency\">\n<span id=\"id6\"></span><h3>一貫性<a class=\"heading-anchor\" href=\"#consistency\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>フレームワークはあらゆるレベルで一貫性を持たなければなりません。一貫性は、低レベル (採用する Python のコーディングスタイル) から高レベル (Django の使い方) までのあらゆる点で保たれなければなりません。</p>\n</section>\n</section>\n<section id=\"models\">\n<h2>モデル<a class=\"heading-anchor\" href=\"#models\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"id7\">\n<h3>暗黙よりもはっきり示した方がいい (Explicit is better than implicit)<a class=\"heading-anchor\" href=\"#id7\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>フィールド名のみに基づいてフィールドの振る舞いが決まるべきではありません。そのようにしてしまうと、システム全体に対する深い知識が必要となり、誤りの原因となりやすいです。その代わりに、キーワード引数や、場合によってはフィールドの型によって振る舞いが変わるようにします。</p>\n</section>\n<section id=\"include-all-relevant-domain-logic\">\n<h3>関連するドメインのロジックをすべて含める<a class=\"heading-anchor\" href=\"#include-all-relevant-domain-logic\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>モジュールは、マーティン・ファウラーの <a class=\"reference external\" href=\"https://www.martinfowler.com/eaaCatalog/activeRecord.html\">Active Record</a> のデザインパターンに従い、「オブジェクト」のすべての側面をカプセル化する必要がります。</p>\n<p>その理由は、モジュール (人間に読みやすい名前や、デフォルトの順序のオプションなど) について、モデルと情報の両方が表現するデータはモデルクラスで定義されており、与えられたモデルを理解するのに必要なすべての情報はモデルの <em>中に</em> 存在するべきだからです。</p>\n</section>\n</section>\n<section id=\"database-api\">\n<h2>データベース API<a class=\"heading-anchor\" href=\"#database-api\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>データベース API の主要な目的は、次のとおりです。</p>\n<section id=\"sql-efficiency\">\n<h3>SQL の効率性<a class=\"heading-anchor\" href=\"#sql-efficiency\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>SQLステートメントはなるべく少ない回数実行されるべきで、またステートメントは内部で最適化されるべきです。</p>\n<p>フレームワークが舞台裏で黙って保存するのではなく、開発者が明示的に <code class=\"docutils literal notranslate\"><span class=\"pre\">save()</span></code> を呼び出す必要があるのはこのためです。</p>\n<p>This is also why the <code class=\"docutils literal notranslate\"><span class=\"pre\">select_related()</span></code> <code class=\"docutils literal notranslate\"><span class=\"pre\">QuerySet</span></code> method exists. It's an\noptional performance booster for the common case of selecting &quot;every related\nobject.&quot;</p>\n</section>\n<section id=\"terse-powerful-syntax\">\n<h3>Terse, powerful syntax<a class=\"heading-anchor\" href=\"#terse-powerful-syntax\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The database API should allow rich, expressive statements in as little syntax\nas possible. It should not rely on importing other modules or helper objects.</p>\n<p>Joins should be performed automatically, behind the scenes, when necessary.</p>\n<p>Every object should be able to access every related object, systemwide. This\naccess should work both ways.</p>\n</section>\n<section id=\"option-to-drop-into-raw-sql-easily-when-needed\">\n<h3>Option to drop into raw SQL easily, when needed<a class=\"heading-anchor\" href=\"#option-to-drop-into-raw-sql-easily-when-needed\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The database API should realize it's a shortcut but not necessarily an\nend-all-be-all. The framework should make it easy to write custom SQL -- entire\nstatements, or just custom <code class=\"docutils literal notranslate\"><span class=\"pre\">WHERE</span></code> clauses as custom parameters to API calls.</p>\n</section>\n</section>\n<section id=\"url-design\">\n<h2>URL デザイン<a class=\"heading-anchor\" href=\"#url-design\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"id8\">\n<h3>疎結合<a class=\"heading-anchor\" href=\"#id8\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>URLs in a Django app should not be coupled to the underlying Python code. Tying\nURLs to Python function names is a Bad And Ugly Thing.</p>\n<p>Along these lines, the Django URL system should allow URLs for the same app to\nbe different in different contexts. For example, one site may put stories at\n<code class=\"docutils literal notranslate\"><span class=\"pre\">/stories/</span></code>, while another may use <code class=\"docutils literal notranslate\"><span class=\"pre\">/news/</span></code>.</p>\n</section>\n<section id=\"infinite-flexibility\">\n<h3>Infinite flexibility<a class=\"heading-anchor\" href=\"#infinite-flexibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>URLs should be as flexible as possible. Any conceivable URL design should be\nallowed.</p>\n</section>\n<section id=\"encourage-best-practices\">\n<h3>ベストプラクティスの推奨<a class=\"heading-anchor\" href=\"#encourage-best-practices\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The framework should make it just as easy (or even easier) for a developer to\ndesign pretty URLs than ugly ones.</p>\n<p>File extensions in Web-page URLs should be avoided.</p>\n<p>Vignette-style commas in URLs deserve severe punishment.</p>\n</section>\n<section id=\"definitive-urls\">\n<span id=\"id9\"></span><h3>Definitive URLs<a class=\"heading-anchor\" href=\"#definitive-urls\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p id=\"index-3\">Technically, <code class=\"docutils literal notranslate\"><span class=\"pre\">foo.com/bar</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">foo.com/bar/</span></code> are two different URLs, and\nsearch-engine robots (and some Web traffic-analyzing tools) would treat them as\nseparate pages. Django should make an effort to &quot;normalize&quot; URLs so that\nsearch-engine robots don't get confused.</p>\n<p>This is the reasoning behind the <a class=\"reference internal\" href=\"/ja/2.2/ref/settings/#std-setting-APPEND_SLASH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">APPEND_SLASH</span></code></a> setting.</p>\n</section>\n</section>\n<section id=\"template-system\">\n<h2>テンプレートシステム<a class=\"heading-anchor\" href=\"#template-system\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"separate-logic-from-presentation\">\n<span id=\"separation-of-logic-and-presentation\"></span><h3>ロジックのプレゼンテーションからの分離<a class=\"heading-anchor\" href=\"#separate-logic-from-presentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>私達は、テンプレートシステムはプレゼンテーションとプレゼンテーション関係のロジックを制御するためのツールであり、それ以上のものではないと考えています。 その本分をこえた機能をテンプレートシステムに求めるべきではありません。</p>\n</section>\n<section id=\"discourage-redundancy\">\n<h3>冗長性の排除<a class=\"heading-anchor\" href=\"#discourage-redundancy\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>大多数の動的な Web サイトでは、ヘッダやフッタ、ナビゲーションバーといった部分のデザインをサイト全体で共通にしています。 Django テンプレートシステムは、 こうしたサイトの構成要素を一箇所に保存しやすくし、重複したコードを削除する必要があります。</p>\n<p>これが <a class=\"reference internal\" href=\"/ja/2.2/ref/templates/language/#template-inheritance\"><span class=\"std std-ref\">テンプレートの継承</span></a> の背後にある思想です。</p>\n</section>\n<section id=\"be-decoupled-from-html\">\n<h3>HTML と疎結合であれ<a class=\"heading-anchor\" href=\"#be-decoupled-from-html\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>テンプレートシステムは、ただ単に HTML だけを出力するように設計されてはいません。他のテキストベースのフォーマットや、単純なプレインテキストも同じように上手く生成できるように作られています。</p>\n</section>\n<section id=\"xml-should-not-be-used-for-template-languages\">\n<h3>テンプレート言語として、XML を使うべきではない<a class=\"heading-anchor\" href=\"#xml-should-not-be-used-for-template-languages\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p id=\"index-4\">テンプレートをパースするのに XML エンジンを使ってしまうと、テンプレートの編集に全く新しいヒューマンエラーの世界を作り出してしまい、結果として、テンプレート処理に受け入れられないようなレベルの困難を生み出してしまうでしょう。</p>\n</section>\n<section id=\"assume-designer-competence\">\n<h3>ページデザイナの有能さを前提にする<a class=\"heading-anchor\" href=\"#assume-designer-competence\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>必ずしも Dreamweaver のような WYSIWYG エディタでうまく表示できるように テンプレートシステムを設計する必要はありません。そのような要求は制限が厳しすぎ、本来あるべきすっきりした構文を実現できなくなります。 Django では 直接 HTML を編集する作業に慣れたテンプレート作者を想定しています。</p>\n</section>\n<section id=\"treat-whitespace-obviously\">\n<h3>ホワイトスペースを明示的に扱う<a class=\"heading-anchor\" href=\"#treat-whitespace-obviously\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>テンプレートシステムは、ホワイトスペースに対して変わった処理を行うべきではありません。もしテンプレートにホワイトスペースが書かれていれば、他の文字と同じように扱って、それをそのまま表示するべきです。テンプレートタグの外に書かれたすべてのホワイトスペースは、そのまま表示するべきです。</p>\n</section>\n<section id=\"don-t-invent-a-programming-language\">\n<h3>新しいプログラミング言語を開発しない<a class=\"heading-anchor\" href=\"#don-t-invent-a-programming-language\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>私たちの目的は、新しいプログラミング言語を開発することではありません。本当の目的は、プログラミング言語が持つような機能を必要十分なだけ使えるようにすることです。たとえば、条件分岐やループといったもので、これらはプレゼンテーションに関連する決定を下すときに大切になります。 <a class=\"reference internal\" href=\"/ja/2.2/topics/templates/#template-language-intro\"><span class=\"std std-ref\">Django テンプレート言語 (Django Template Language; DTL)</span></a> は、複雑なロジックを使わずにこの目的を達成するために作られました。</p>\n<p>Django のテンプレートシステムは、テンプレートの書き手は <em>プログラマー</em> ではなく、主に <em>デザイナー</em> であることを念頭に置いています。そのため、Python の知識がまったくなくても書けるようになっています。</p>\n</section>\n<section id=\"safety-and-security\">\n<h3>安全性とセキュリティ<a class=\"heading-anchor\" href=\"#safety-and-security\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>テンプレートシステムは、コマンドの実行やデータベースレコードの削除を行うような、悪意のあるコードの挿入ができないようになっていなければなりません。</p>\n<p>これが、テンプレートシステムが任意の Python コードの実行を許さないようにできているもう一つの理由です。</p>\n</section>\n<section id=\"extensibility\">\n<h3>拡張性<a class=\"heading-anchor\" href=\"#extensibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>テンプレートシステムは、高度なテンプレート作者によるテクノロジの拡張に配慮せねばなりません。</p>\n<p>これが、カスタムテンプレートタグとフィルタの背後にある思想です。</p>\n</section>\n</section>\n<section id=\"views\">\n<h2>ビュー<a class=\"heading-anchor\" href=\"#views\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"simplicity\">\n<h3>シンプルであること<a class=\"heading-anchor\" href=\"#simplicity\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>ビューは、Python の関数を書くのと同じくらい簡単に書けるべきです。開発者は、ふつうに関数を書くときと同じように、クラスからインスタンスを作ったりせずにビューが書けるべきです。</p>\n</section>\n<section id=\"use-request-objects\">\n<h3>request オブジェクトを使うこと<a class=\"heading-anchor\" href=\"#use-request-objects\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>ビューはリクエストオブジェクトにアクセスします。リクエストオブジェクトとは、 現在のリクエストに関するメタデータを入れるオブジェクトです。ビューはこのオブジェクトをグローバル変数経由でアクセスするのではなく、引数として直接受け取るようにすべきです。それにより、「偽の」リクエストオブジェクトを渡してビューを簡単かつクリーンにテストできるようになります。</p>\n</section>\n<section id=\"id10\">\n<h3>疎結合<a class=\"heading-anchor\" href=\"#id10\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>ビューは、開発者がどのテンプレートシステムを使用しているか意識せずに使えるべきです。もっと言えば、テンプレートシステム自体を使っているかどうかも気にせずに使えるようにするべきです。</p>\n</section>\n<section id=\"differentiate-between-get-and-post\">\n<h3>GET と POST を区別<a class=\"heading-anchor\" href=\"#differentiate-between-get-and-post\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>GET と POST は区別します。開発者は明示的に一方を他方と区別して明示的に使用するべきです。フレームワークは、GET と POST データを分かりやすく区別できるようにしなければなりません。</p>\n</section>\n</section>\n<section id=\"cache-framework\">\n<span id=\"cache-design-philosophy\"></span><h2>キャッシュフレームワーク<a class=\"heading-anchor\" href=\"#cache-framework\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django の <a class=\"reference internal\" href=\"/ja/2.2/topics/cache/\"><span class=\"doc\">キャッシュフレームワーク</span></a> の主な目的は次の点にあります。</p>\n<section id=\"id11\">\n<h3>短いコード<a class=\"heading-anchor\" href=\"#id11\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>キャッシュは可能な限り高速でなければならない。したがって、キャッシュバックエンドを包んでいるフレームワークのコード (特に <code class=\"docutils literal notranslate\"><span class=\"pre\">get()</span></code> 操作) はすべて、極限まで短くするべきである。</p>\n</section>\n<section id=\"id12\">\n<h3>一貫性<a class=\"heading-anchor\" href=\"#id12\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>キャッシュ API は、バックエントが違っていても一貫したインターフェイスを提供するべきである。</p>\n</section>\n<section id=\"id13\">\n<h3>拡張性<a class=\"heading-anchor\" href=\"#id13\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>キャッシュ API は、開発者のニーズにもとづいて、アプリケーションレベルで拡張可能であるべきである (例としては <a class=\"reference internal\" href=\"/ja/2.2/topics/cache/#cache-key-transformation\"><span class=\"std std-ref\">Cache key transformation</span></a> がある)。</p>\n</section>\n</section>","rootId":"design-philosophies","toc":[{"title":"概要","anchor":"overall","children":[{"title":"疎結合","anchor":"loose-coupling","children":[]},{"title":"短いコード","anchor":"less-code","children":[]},{"title":"素早い開発","anchor":"quick-development","children":[]},{"title":"同じことを繰り返さない (DRY)","anchor":"don-t-repeat-yourself-dry","children":[]},{"title":"暗黙よりもはっきり示した方がいい (Explicit is better than implicit)","anchor":"explicit-is-better-than-implicit","children":[]},{"title":"一貫性","anchor":"consistency","children":[]}]},{"title":"モデル","anchor":"models","children":[{"title":"暗黙よりもはっきり示した方がいい (Explicit is better than implicit)","anchor":"id7","children":[]},{"title":"関連するドメインのロジックをすべて含める","anchor":"include-all-relevant-domain-logic","children":[]}]},{"title":"データベース API","anchor":"database-api","children":[{"title":"SQL の効率性","anchor":"sql-efficiency","children":[]},{"title":"Terse, powerful syntax","anchor":"terse-powerful-syntax","children":[]},{"title":"Option to drop into raw SQL easily, when needed","anchor":"option-to-drop-into-raw-sql-easily-when-needed","children":[]}]},{"title":"URL デザイン","anchor":"url-design","children":[{"title":"疎結合","anchor":"id8","children":[]},{"title":"Infinite flexibility","anchor":"infinite-flexibility","children":[]},{"title":"ベストプラクティスの推奨","anchor":"encourage-best-practices","children":[]},{"title":"Definitive URLs","anchor":"definitive-urls","children":[]}]},{"title":"テンプレートシステム","anchor":"template-system","children":[{"title":"ロジックのプレゼンテーションからの分離","anchor":"separate-logic-from-presentation","children":[]},{"title":"冗長性の排除","anchor":"discourage-redundancy","children":[]},{"title":"HTML と疎結合であれ","anchor":"be-decoupled-from-html","children":[]},{"title":"テンプレート言語として、XML を使うべきではない","anchor":"xml-should-not-be-used-for-template-languages","children":[]},{"title":"ページデザイナの有能さを前提にする","anchor":"assume-designer-competence","children":[]},{"title":"ホワイトスペースを明示的に扱う","anchor":"treat-whitespace-obviously","children":[]},{"title":"新しいプログラミング言語を開発しない","anchor":"don-t-invent-a-programming-language","children":[]},{"title":"安全性とセキュリティ","anchor":"safety-and-security","children":[]},{"title":"拡張性","anchor":"extensibility","children":[]}]},{"title":"ビュー","anchor":"views","children":[{"title":"シンプルであること","anchor":"simplicity","children":[]},{"title":"request オブジェクトを使うこと","anchor":"use-request-objects","children":[]},{"title":"疎結合","anchor":"id10","children":[]},{"title":"GET と POST を区別","anchor":"differentiate-between-get-and-post","children":[]}]},{"title":"キャッシュフレームワーク","anchor":"cache-framework","children":[{"title":"短いコード","anchor":"id11","children":[]},{"title":"一貫性","anchor":"id12","children":[]},{"title":"拡張性","anchor":"id13","children":[]}]}],"breadcrumbs":[{"docname":"misc/index","title":"メタドキュメントとその他","url":"/ja/2.2/misc/"}],"prev":{"docname":"misc/api-stability","title":"API の安定性","url":"/ja/2.2/misc/api-stability/"},"next":{"docname":"misc/distributions","title":"サードパーティの Django ディストリビューション","url":"/ja/2.2/misc/distributions/"},"formats":{"html":"/ja/2.2/misc/design-philosophies/","markdown":"/ja/2.2/misc/design-philosophies.md","json":"/ja/2.2/misc/design-philosophies.json"},"source":"https://github.com/django/django/blob/stable/2.2.x/docs/misc/design-philosophies.txt","official":"https://docs.djangoproject.com/ja/2.2/misc/design-philosophies/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}