Metadata-Version: 1.0
Name: falkolab.ext3.direct
Version: 1.0.0a
Summary: Zope3 Ext.Direct - Server-side Stack for ExtJS 3.
Home-page: http://falkolab.ru/
Author: Andrey Tkachenko
Author-email: falko.lab@gmail.com
License: ZPL 2.1
Description: <h1 class="title">Zope3 Ext.Direct - Server-side Stack for ExtJS 3.</h1>
        <div class="section" id="how-do-i-use-it">
        <h1>How do I use it ?</h1>
        <p>Let's register api and views:</p>
        <blockquote>
        <pre class="doctest-block">
        &gt;&gt;&gt; from zope.configuration import xmlconfig
        &gt;&gt;&gt; context = xmlconfig.string(&quot;&quot;&quot;
        ... &lt;configure
        ...     xmlns=&quot;http://namespaces.zope.org/zope&quot;
        ...     xmlns:extdirect=&quot;http://namespaces.zope.org/extdirect&quot;
        ...     &gt;
        ...   &lt;include package=&quot;falkolab.ext3.direct&quot; file=&quot;meta.zcml&quot; /&gt;
        ...
        ...   &lt;extdirect:api
        ...       for=&quot;zope.app.folder.interfaces.IFolder&quot;
        ...       namespace = &quot;my.app&quot;
        ...       /&gt;
        ...
        ...   &lt;extdirect:view
        ...       for=&quot;zope.app.folder.interfaces.IFolder&quot;
        ...       class=&quot;falkolab.ext3.direct.testing.AlbumList&quot;
        ...       permission=&quot;zope.ManageContent&quot;
        ...       name=&quot;albumlist&quot;
        ...       /&gt;
        ...
        ...   &lt;extdirect:view
        ...       for=&quot;zope.app.folder.interfaces.IFolder&quot;
        ...       class=&quot;falkolab.ext3.direct.testing.Contact&quot;
        ...       permission=&quot;zope.ManageContent&quot;
        ...       /&gt;
        ... &lt;/configure&gt;
        ... &quot;&quot;&quot;)
        </pre>
        </blockquote>
        <p>Direct API:</p>
        <blockquote>
        <pre class="doctest-block">
        &gt;&gt;&gt; print http(r&quot;&quot;&quot;
        ... GET /&#64;&#64;directapi HTTP/1.1
        ... Authorization: Basic bWdyOm1ncnB3
        ... &quot;&quot;&quot;)
        HTTP/1.1 200 Ok
        Cache-Control: no-cache
        Content-Length: ...
        Content-Type: text/javascript;charset=utf-8
        Expires: ...
        Pragma: no-cache
        &lt;BLANKLINE&gt;
        Ext.namespace('my.app');
        my.app.REMOTING_API={&quot;url&quot;: &quot;http://localhost/&#64;&#64;directrouter&quot;, &quot;namespace&quot;: &quot;my.app&quot;, &quot;type&quot;: &quot;remoting&quot;, &quot;actions&quot;: {&quot;Contact&quot;: [{&quot;name&quot;: &quot;getInfo&quot;, &quot;len&quot;: 1}], &quot;albumlist&quot;: [{&quot;formHandler&quot;: true, &quot;name&quot;: &quot;add&quot;, &quot;len&quot;: 0}, {&quot;name&quot;: &quot;getAll&quot;, &quot;len&quot;: 0}]}};
        </pre>
        </blockquote>
        <p>Auto add provider :</p>
        <blockquote>
        <pre class="doctest-block">
        &gt;&gt;&gt; print http(r&quot;&quot;&quot;
        ... GET /&#64;&#64;directapi?add_provider HTTP/1.1
        ... Authorization: Basic bWdyOm1ncnB3
        ... &quot;&quot;&quot;)
        HTTP/1.1 200 Ok
        Cache-Control: no-cache
        Content-Length: ...
        Content-Type: text/javascript;charset=utf-8
        Expires: ...
        Pragma: no-cache
        &lt;BLANKLINE&gt;
        Ext.namespace('my.app');
        my.app.REMOTING_API={&quot;url&quot;: &quot;http://localhost/&#64;&#64;directrouter&quot;, &quot;namespace&quot;: &quot;my.app&quot;, &quot;type&quot;: &quot;remoting&quot;, &quot;actions&quot;: {&quot;Contact&quot;: [{&quot;name&quot;: &quot;getInfo&quot;, &quot;len&quot;: 1}], &quot;albumlist&quot;: [{&quot;formHandler&quot;: true, &quot;name&quot;: &quot;add&quot;, &quot;len&quot;: 0}, {&quot;name&quot;: &quot;getAll&quot;, &quot;len&quot;: 0}]}};
        Ext.Direct.addProvider(my.app.REMOTING_API);
        </pre>
        </blockquote>
        <p>And Direct Request hanling (for addition see ROUTER.TXT):</p>
        <blockquote>
        <pre class="doctest-block">
        &gt;&gt;&gt; print http(r&quot;&quot;&quot;
        ... POST /&#64;&#64;directrouter HTTP/1.1
        ... Authorization: Basic bWdyOm1ncnB3
        ... Content-Length: 71
        ... Content-Type: application/json; charset=UTF-8
        ... Referer: http://localhost/
        ...
        ... {&quot;action&quot;:&quot;albumlist&quot;,&quot;method&quot;:&quot;getAll&quot;,&quot;data&quot;:[],&quot;type&quot;:&quot;rpc&quot;,&quot;tid&quot;:1}&quot;&quot;&quot;)
        HTTP/1.1 200 Ok
        Content-Length: 89
        Content-Type: text/javascript
        &lt;BLANKLINE&gt;
        {&quot;action&quot;: &quot;albumlist&quot;, &quot;tid&quot;: 1, &quot;type&quot;: &quot;rpc&quot;, &quot;method&quot;: &quot;getAll&quot;, &quot;result&quot;: [1, 2, 3]}
        </pre>
        </blockquote>
        <div class="section" id="changes">
        <h2>CHANGES</h2>
        </div>
        </div>
        <div class="section" id="a-2009-08-20">
        <h1>1.0.0a (2009-08-20)</h1>
        <ul class="simple">
        <li>Initial release.</li>
        </ul>
        </div>
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Zope3
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: User Interfaces
