The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>ClearPress Framework</title>
  <link rel="stylesheet" type="text/css" href="clearpress.css"/>
</head>

 <body>
  <h1>ClearPress Framework</h1>
<div class="main">

<h2>The Basics</h2>
<p>
 It's quick to build your first application with ClearPress. Having
 installed from CPAN the next step is to identify your initial
 schema and run it through the application builder:
<figure class="highlight"><pre><code class="language-perl" data-lang="perl"> <span class="nv">clearpress</span> <span class="o">\</span>
 <span class="o">-</span><span class="k">new</span> <span class="nv">Grandkids</span> <span class="o">\</span>
 <span class="o">-</span><span class="nv">schema</span> <span class="s">'family(name) kid(name) kid-&amp;gt;family'</span> <span class="o">\</span>
 <span class="o">-</span><span class="nv">driver</span> <span class="nv">SQLite</span></code></pre></figure> 
</p>

<p>
  This example creates instructions about a SQLite database and two
  tables within it and identifies a relationship between them.

  <figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">family</span><span class="p">(</span>
 <span class="n">id_family</span> <span class="n">integer</span> <span class="k">primary</span> <span class="k">key</span> <span class="n">autoincrement</span><span class="p">,</span>
 <span class="n">name</span> <span class="n">varchar</span>
<span class="p">);</span>

<span class="n">kid</span><span class="p">(</span>
  <span class="n">id_kid</span> <span class="n">integer</span> <span class="k">primary</span> <span class="k">key</span> <span class="n">autoincrement</span><span class="p">,</span>
  <span class="n">name</span> <span class="n">varchar</span><span class="p">,</span>
  <span class="n">id_family</span> <span class="n">integer</span>
<span class="p">);</span></code></pre></figure>  
</p>

<p>
 So let's create the database and add the tables.
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nb">cd </span>Grandkids
<span class="nb">cat </span>data/schema/<span class="k">*</span>.sqlite | sqlite3 GrandKids</code></pre></figure>
</p>

<p>
 and let's start the application: <figure class="highlight"><pre><code class="language-shell" data-lang="shell">bin/Grandkids</code></pre></figure> by
 default the server will start on port 8080. If you don't want that
 add <figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nt">-port</span><span class="o">=</span>&amp;lt<span class="p">;</span>port-number&amp;gt<span class="p">;</span></code></pre></figure>
</p>

</div><!--end main-->

<div id="menu">
 <ul>
  <li><a href="/">About</a></li>
  <li><a href="/installing.html">Installing</a></li>
  <li><a href="/basics.html">The Basics</a></li>
  <li><a href="/rest.html">REST</a></li>
  <li><a href="/orm.html">ORM / Models</a></li>
  <li><a href="/views.html">Views</a></li>
  <li><a href="/routes.html">Routes</a></li>
  <li><a href="/streaming.html">Streamed content</a></li>
  <li><a href="/mimetypes.html">Custom response types</a></li>
  <li><a href="/paging.html">Paging Lists</a></li>
  <li><a href="/ajax.html">Working with AJAX</a></li>
  <li><a href="/authen.html">Authentication</a></li>
  <li><a href="/authz.html">Authorisation</a></li>
  <li><a href="/pdf.html">Exporting PDFs</a></li>
 </ul>

 <br/><br/><b>Still to come:</b>
 <ul style="font-style:italic">
  <li>Transactions</li>
  <li>Posting XML</li>
  <li>Automated Testing</li>
  <li>Internationalisation</li>
 </ul>
</div>


<div class="footer" style="margin-left:-50px">
<SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822/GB/gardmalt-21/8001/e9b44bbc-a251-45f1-8386-10affeb751cc"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fgardmalt-21%2F8001%2Fe9b44bbc-a251-45f1-8386-10affeb751cc&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT>
</div>

<div class="footer">
  <address><a href="mailto:rmp@psyphi.net">rmp</a></address>
  2017-10-24 12:40:12 +0100
</div>

  </body>
</html>