153 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			153 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 | 
						||
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 | 
						||
 | 
						||
<html xmlns="http://www.w3.org/1999/xhtml">
 | 
						||
  <head>
 | 
						||
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
						||
    
 | 
						||
    <title>Architectural Principles — plone.app.discussion v1.0b4 documentation</title>
 | 
						||
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
 | 
						||
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
 | 
						||
    <script type="text/javascript">
 | 
						||
      var DOCUMENTATION_OPTIONS = {
 | 
						||
        URL_ROOT:    '#',
 | 
						||
        VERSION:     '1.0b4',
 | 
						||
        COLLAPSE_MODINDEX: false,
 | 
						||
        FILE_SUFFIX: '.html',
 | 
						||
        HAS_SOURCE:  true
 | 
						||
      };
 | 
						||
    </script>
 | 
						||
    <script type="text/javascript" src="_static/jquery.js"></script>
 | 
						||
    <script type="text/javascript" src="_static/doctools.js"></script>
 | 
						||
    <link rel="top" title="plone.app.discussion v1.0b4 documentation" href="index.html" />
 | 
						||
    <link rel="next" title="Design Notes" href="design.html" />
 | 
						||
    <link rel="prev" title="Welcome to plone.app.discussion’s documentation!" href="index.html" /> 
 | 
						||
  </head>
 | 
						||
  <body>
 | 
						||
    <div class="related">
 | 
						||
      <h3>Navigation</h3>
 | 
						||
      <ul>
 | 
						||
        <li class="right" style="margin-right: 10px">
 | 
						||
          <a href="genindex.html" title="General Index"
 | 
						||
             accesskey="I">index</a></li>
 | 
						||
        <li class="right" >
 | 
						||
          <a href="design.html" title="Design Notes"
 | 
						||
             accesskey="N">next</a> |</li>
 | 
						||
        <li class="right" >
 | 
						||
          <a href="index.html" title="Welcome to plone.app.discussion’s documentation!"
 | 
						||
             accesskey="P">previous</a> |</li>
 | 
						||
        <li><a href="index.html">plone.app.discussion v1.0b4 documentation</a> »</li> 
 | 
						||
      </ul>
 | 
						||
    </div>  
 | 
						||
 | 
						||
    <div class="document">
 | 
						||
      <div class="documentwrapper">
 | 
						||
        <div class="bodywrapper">
 | 
						||
          <div class="body">
 | 
						||
            
 | 
						||
  <div class="section" id="architectural-principles">
 | 
						||
<h1>Architectural Principles<a class="headerlink" href="#architectural-principles" title="Permalink to this headline">¶</a></h1>
 | 
						||
<p>This document outlines architectural principles used in the design of
 | 
						||
plone.app.discussion.</p>
 | 
						||
<blockquote>
 | 
						||
<dl class="docutils">
 | 
						||
<dt><strong>Discussion items have a portal_type</strong></dt>
 | 
						||
<dd>This makes it easier to search for them and manage them using existing
 | 
						||
CMF and Plone UI constructs.</dd>
 | 
						||
<dt><strong>Discussion items are cataloged</strong></dt>
 | 
						||
<dd>It is possible to search for discussion items like any other type of
 | 
						||
content.</dd>
 | 
						||
<dt><strong>Discussion items are subject to workflow and permission</strong></dt>
 | 
						||
<dd>Moderation, anonymous commenting, and auto approve/reject should be
 | 
						||
handled using workflow states, automatic and manual transitions, and
 | 
						||
permissions.</dd>
 | 
						||
<dt><strong>Discussion items are light weight objects</strong></dt>
 | 
						||
<dd>Discussion item objects are as light weight as possible. Ideally, a
 | 
						||
discussion item should be as lightweight as a catalog brain. This may mean
 | 
						||
that we forego convenience base classes and re-implement certain interfaces.
 | 
						||
Comments should not provide the full set of dublin core metadata, though
 | 
						||
custom indexers can be used to provide values for standard catalog indexes.</dd>
 | 
						||
<dt><strong>Optimise for retrival speed</strong></dt>
 | 
						||
<dd>HTML filtering and other processing should happen on save, not on render,
 | 
						||
to make rendering quick.</dd>
 | 
						||
<dt><strong>Settings are stored using plone.registry</strong></dt>
 | 
						||
<dd>Any global setting should be stored in plone.registry records.</dd>
 | 
						||
<dt><strong>Forms are constructed using extensible z3c.form forms</strong></dt>
 | 
						||
<dd>This allows plugins (such as spam protection algorithms) to provide
 | 
						||
additional validation. It also allows integrators to write add-ons that add
 | 
						||
new fields to the comment form.</dd>
 | 
						||
<dt><strong>Discussion items are stored in a BTree container</strong></dt>
 | 
						||
<dd>This allows faster lookup and manipulation.</dd>
 | 
						||
<dt><strong>Discussion items are accessed using a dict-like interface</strong></dt>
 | 
						||
<dd>This makes iteration and manipulation more natural. Even if comments are
 | 
						||
not stored threaded, the dict interface should act as if they are, i.e.
 | 
						||
calling items() on a comment should return the replies to that comment
 | 
						||
(in order).</dd>
 | 
						||
<dt><strong>Discussion items are retrieved in reverse creation date order</strong></dt>
 | 
						||
<dd>Discussion items do not need to support explicit ordering. They should
 | 
						||
always be retrieved in reverse creation date order (most recent for).
 | 
						||
They can be stored with keys so that this is always true.</dd>
 | 
						||
<dt><strong>Discussion items do not need readable ids</strong></dt>
 | 
						||
<dd>Ids can be based on the creation date.</dd>
 | 
						||
<dt><strong>Discussion items send events</strong></dt>
 | 
						||
<dd>The usual zope.lifecycleevent and zope.container events are fired when
 | 
						||
discussion items are added, removed, or modified.</dd>
 | 
						||
</dl>
 | 
						||
</blockquote>
 | 
						||
</div>
 | 
						||
 | 
						||
 | 
						||
          </div>
 | 
						||
        </div>
 | 
						||
      </div>
 | 
						||
      <div class="sphinxsidebar">
 | 
						||
        <div class="sphinxsidebarwrapper">
 | 
						||
            <h4>Previous topic</h4>
 | 
						||
            <p class="topless"><a href="index.html"
 | 
						||
                                  title="previous chapter">Welcome to plone.app.discussion’s documentation!</a></p>
 | 
						||
            <h4>Next topic</h4>
 | 
						||
            <p class="topless"><a href="design.html"
 | 
						||
                                  title="next chapter">Design Notes</a></p>
 | 
						||
            <h3>This Page</h3>
 | 
						||
            <ul class="this-page-menu">
 | 
						||
              <li><a href="_sources/architecture.txt"
 | 
						||
                     rel="nofollow">Show Source</a></li>
 | 
						||
            </ul>
 | 
						||
          <div id="searchbox" style="display: none">
 | 
						||
            <h3>Quick search</h3>
 | 
						||
              <form class="search" action="search.html" method="get">
 | 
						||
                <input type="text" name="q" size="18" />
 | 
						||
                <input type="submit" value="Go" />
 | 
						||
                <input type="hidden" name="check_keywords" value="yes" />
 | 
						||
                <input type="hidden" name="area" value="default" />
 | 
						||
              </form>
 | 
						||
              <p class="searchtip" style="font-size: 90%">
 | 
						||
              Enter search terms or a module, class or function name.
 | 
						||
              </p>
 | 
						||
          </div>
 | 
						||
          <script type="text/javascript">$('#searchbox').show(0);</script>
 | 
						||
        </div>
 | 
						||
      </div>
 | 
						||
      <div class="clearer"></div>
 | 
						||
    </div>
 | 
						||
    <div class="related">
 | 
						||
      <h3>Navigation</h3>
 | 
						||
      <ul>
 | 
						||
        <li class="right" style="margin-right: 10px">
 | 
						||
          <a href="genindex.html" title="General Index"
 | 
						||
             >index</a></li>
 | 
						||
        <li class="right" >
 | 
						||
          <a href="design.html" title="Design Notes"
 | 
						||
             >next</a> |</li>
 | 
						||
        <li class="right" >
 | 
						||
          <a href="index.html" title="Welcome to plone.app.discussion’s documentation!"
 | 
						||
             >previous</a> |</li>
 | 
						||
        <li><a href="index.html">plone.app.discussion v1.0b4 documentation</a> »</li> 
 | 
						||
      </ul>
 | 
						||
    </div>
 | 
						||
    <div class="footer">
 | 
						||
      © Copyright 2010, Timo Stollenwerk.
 | 
						||
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
 | 
						||
    </div>
 | 
						||
  </body>
 | 
						||
</html> |