You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by mc...@apache.org on 2008/09/02 20:00:34 UTC

svn commit: r691330 - in /incubator/thrift/site/dynathrift: ./ about/ developers/ download/ mailing/ static/ tutorial/

Author: mcslee
Date: Tue Sep  2 11:00:33 2008
New Revision: 691330

URL: http://svn.apache.org/viewvc?rev=691330&view=rev
Log:
Checking in new Thrift web framework, which allows for convenient local development via a simple PHP sandbox, and also generates down to flat static HTML content.


Added:
    incubator/thrift/site/dynathrift/
    incubator/thrift/site/dynathrift/README
    incubator/thrift/site/dynathrift/__publish.php   (with props)
    incubator/thrift/site/dynathrift/about/
    incubator/thrift/site/dynathrift/about/index.php
    incubator/thrift/site/dynathrift/developers/
    incubator/thrift/site/dynathrift/developers/index.php
    incubator/thrift/site/dynathrift/download/
    incubator/thrift/site/dynathrift/download/index.php
    incubator/thrift/site/dynathrift/index.php
    incubator/thrift/site/dynathrift/mailing/
    incubator/thrift/site/dynathrift/mailing/index.php
    incubator/thrift/site/dynathrift/static/
    incubator/thrift/site/dynathrift/static/apache-incubator-small.png   (with props)
    incubator/thrift/site/dynathrift/static/apache-incubator.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift-20070401.pdf   (with props)
    incubator/thrift/site/dynathrift/static/thrift.css
    incubator/thrift/site/dynathrift/static/thrift_body.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift_fade.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift_fade_vert.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift_header.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift_main.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift_mask.png   (with props)
    incubator/thrift/site/dynathrift/static/thrift_nav.png   (with props)
    incubator/thrift/site/dynathrift/thrift.css
    incubator/thrift/site/dynathrift/thrift.lib.php
    incubator/thrift/site/dynathrift/tutorial/
    incubator/thrift/site/dynathrift/tutorial/index.php

Added: incubator/thrift/site/dynathrift/README
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/README?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/README (added)
+++ incubator/thrift/site/dynathrift/README Tue Sep  2 11:00:33 2008
@@ -0,0 +1,40 @@
+/-----------------------\
+| Apache Thrift Website |
+\-----------------------/
+
+The Apache web infrastructure requires serving static HTML files. Developing
+a templatized website in static HTML is relatively inefficient and verbose.
+This lightweight PHP-implementation of a basic branding/documentation site
+is optimized for quick-and-painless development in a trivial sandbox
+environment, whilst allowing painless compilation down to static HTML.
+
+0. Requirements
+
+This site require a vanilla build of PHP, version 5 or newer.
+
+1. Developing the site
+
+Checkout this code, and mount this local folder on a web sandbox running PHP
+under the folder /thrift/ (all links are relative to /thrift/ as an absolute
+root). All of the pages are implemented in the files <page>/index.php. This
+lets you develop the site without any build process between iterations. Simply
+modify the PHP source directly and click refresh.
+
+2. Generating static HTML
+
+When you're done, the __publish.php script is used to generate the PHP scripts
+down to static HTML. By default, it will generate into a publish-<timestamp>
+folder under this directory, useful for sanity checking. To publish into the
+production output folder, run as follows:
+
+./__publish.php -o ../publish
+
+3. File layout
+
+To ease serving in both development and production environments, note that
+the file layout relies upon default directory indexing via index.php or the
+generated index.html files. If you are adding a new page, create a folder
+for it, and add it to the list in the __publish.php script.
+
+Purely static content (CSS, image files, pdfs) should always be placed under
+the static folder.

Added: incubator/thrift/site/dynathrift/__publish.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/__publish.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/__publish.php (added)
+++ incubator/thrift/site/dynathrift/__publish.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,115 @@
+#!/usr/bin/env php
+<?php
+
+/**
+ * Simple build script that converts the Thrift website to static html files.
+ *
+ * @author mcslee
+ */
+
+$verbose = in_array('-v', $argv);
+
+/**
+ * Ensure that we're running in the right place.
+ */
+$rootdir = dirname(__FILE__);
+if (!chdir($rootdir)) {
+  echo 'Failed to change working directory.'."\n";
+  exit(1);
+}
+
+/**
+ * Create the publish output directory.
+ */
+if (false !== ($key = (array_search('-o', $argv)))) {
+  if (empty($argv[$key+1])) {
+    echo 'Missing directory after -o flag'."\n";
+    exit(1);
+  }
+  $outdir = rtrim($argv[$key+1], '/');
+  if (!file_exists($outdir)) {
+    if (!mkdir($outdir)) {
+      echo 'Failed to create output directory: '.$outdir."\n";
+      exit(1);
+    }
+  }
+} else {
+  $outdir = 'publish-'.time();
+  if (!mkdir($outdir)) {
+    echo 'Failed to create output directory: '.$outdir."\n";
+    exit(1);
+  }
+}
+
+/**
+ * Loop over all the static HTML folders and generate their index file.
+ */
+$folders =
+    array('.',
+          'about',
+          'developers',
+          'download',
+          'mailing',
+          'tutorial');
+
+foreach ($folders as $f) {
+  $fdir = $rootdir.'/'.$f;
+  if (!chdir($fdir)) {
+    echo 'Failed to change working directory: '.$fdir."\n";
+    exit(1);
+  }
+  $outfolder = $outdir.'/'.$f;
+  $outfile = $outfolder.'/index.html';
+  if ($verbose) {
+    echo 'Generating '.$outfile."\n";
+  }
+  ob_start();
+  include($f.'/index.php');
+  $page = ob_get_contents();
+  ob_end_clean();
+  if (!chdir($rootdir)) {
+    echo 'Failed to return to root dir: '.$rootdir."\n";
+    exit(1);
+  }
+  if (!file_exists($outfolder) && !mkdir($outfolder)) {
+    echo 'Failed to mkdir: '.$outfolder."\n";
+    exit(1);
+  }
+  if (false === file_put_contents($outfile, $page)) {
+    echo 'Failed to write file: '.$outfile."\n";
+    exit(1);
+  }
+}
+
+/**
+ * Copy over the static directory. This is way more verbose than it needs
+ * to be. I dunno why I chose to do it this way, but now it's already done.
+ */
+$sdir = $outdir.'/static';
+if (!mkdir($sdir)) {
+  echo 'Failed to write static directory: '.$sdir."\n";
+  exit(1);
+}
+if (!($files = scandir($rootdir.'/static'))) {
+  echo 'Failed to read static file directory.'."\n";
+  exit(1);
+}
+foreach ($files as $file) {
+  if ($file{0} != '.') {
+    $src = $rootdir.'/static/'.$file;
+    $dest = $sdir.'/'.$file;
+    if ($verbose) {
+      echo 'Copying '.$dest."\n";
+    }
+    if (!copy($src, $dest)) {
+      echo 'Failed to copy static file: '.$file."\n";
+      exit(1);
+    }
+  }
+}
+
+/**
+ * All done!
+ */
+echo 'Generated site successfully to folder: '.$outdir."\n";
+exit(0);

Propchange: incubator/thrift/site/dynathrift/__publish.php
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/thrift/site/dynathrift/about/index.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/about/index.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/about/index.php (added)
+++ incubator/thrift/site/dynathrift/about/index.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,178 @@
+<?php
+include_once '../thrift.lib.php';
+$page = new ThriftPage('about');
+echo $page->open();
+
+echo $page->welcome(array(
+'Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible.',
+'In our pursuit of this goal, Thrift aims to embody the following values:'),
+'<ul>
+
+<li><b>Simplicity</b>
+Thrift code is simple and approachable, free of unnecessary dependencies.</li>
+
+<li><b>Transparency</b>
+Thrift conforms to the most common idioms in all languages.</li>
+
+<li><b>Consistency</b>
+Niche, language-specific features belong in extensions, not the core library.</li>
+
+<li><b>Performance</b>
+Strive for performance first, elegance second.</li>
+
+</ul>'
+);
+
+$committers =
+  array('mcslee' =>
+        array('n' => 'Mark Slee',
+              'u' => 'http://www.facebook.com/profile.php?id=204686',
+              't' => -8,
+              's' => 'General vision and implementation',
+              ),
+
+        'dreiss' =>
+        array('n' => 'David Reiss',
+              't' => -8,
+              's' => 'Everything, GIT configuration, performance'),
+
+        'aditya' =>
+        array('n' => 'Aditya Agarwal',
+              't' => -8),
+
+        'marck' =>
+        array('n' => 'Marc Kwiatkowski',
+              't' => -8,
+              's' => 'C++ concurrency'),
+
+        'jwang' =>
+        array('n' => 'James Wang',
+              't' => -8,
+              's' => 'C++ transports and processors'),
+
+        'cpiro' =>
+        array('n' => 'Chris Piro',
+              't' => -8,
+              's' => 'Erlang'),
+
+        'bmaurer' =>
+        array('n' => 'Ben Maurer',
+              'u' => 'http://bmaurer.blogspot.com',
+              't' => -5,
+              's' => 'Python data serialization'),
+
+        'kclark' =>
+        array('n' => 'Kevin Clark',
+              'u' => 'http://glu.tonno.us',
+              't' => -8,
+              's' => 'Ruby implementation'),
+
+        'tjake' =>
+        array('n' => 'Jake Luciani',
+              'u' => 'http://3.rdrail.net',
+              't' => -5,
+              's' => 'Perl implementation'),
+        );
+
+echo
+'
+<div class="committers">
+<h2>Project Team</h2>
+<h3>Committers</h3>
+<table cellspacing="0" cellpadding="0" border="0">
+<tr>
+<th>Username</th>
+<th>Full Name</th>
+<th>Specialities</th>
+<th>Timezone</th>
+</tr>';
+
+$odd = false;
+$first = true;
+foreach ($committers as $username => $c) {
+  $odd = !$odd;
+  echo
+    '<tr class="committer'.($odd ? ' odd' : '').($first ? ' first' : '').'">'.
+    '<td class="username">'.$username.'</td>'.
+    '<td class="fullname">'.
+    (isset($c['u']) ? alink($c['n'], $c['u']) : $c['n']).
+    '</td>'.
+    '<td class="specialities">'.(isset($c['s']) ? $c['s'] : '').'</td>'.
+    '<td class="timezone">'.$c['t'].'</td>'.
+    '</tr>'; // committer
+  $first = false;
+}
+echo
+'</table>
+<h3>Champion</h3>
+<ul><li>Doug Cutting</li></ul>
+<h3>Mentors</h3>
+<ul>
+<li>Paul Querna</li>
+<li>Upayavira</li>
+<li>Jason van Zyl</li>
+</ul>
+</div>'; // committers
+
+$companies =
+  array(array('n' => 'Facebook',
+              'a' => 'Originally developed at Facebook, Thrift is a core piece of Facebook\'s software infrastructure. It is used for both low-latency realtime RPC and persistent structured data storage across a variety of applications, such as Search, News Feed, Platform, and Mobile. If you\'ve ever used Facebook, you have seen Thrift in action.',
+              'u' => 'http://www.facebook.com',
+              'i' => 'http://profile.ak.facebook.com/object2/1310/46/n20531316728_5806.jpg'),
+        array('n' => 'last.fm',
+              'u' => 'http://www.last.fm',
+              'i' => 'http://cdn.last.fm/flatness/badges/lastfm_black.gif'),
+
+        array('n' => 'Powerset',
+              'u' => 'http://www.powerset.com'),
+
+        array('n' => 'imeem',
+              'u' => 'http://www.imeem.com',
+              'i' => 'http://icons.imeem.com/N9Dsdb98.jpg?w=60'),
+
+        array('n' => 'reCaptcha',
+              'u' => 'http://www.recaptcha.com',
+              'i' => 'http://recaptcha.net/shared-media/logo2-nobottom.gif'),
+
+        array('n' => 'RapLeaf',
+              'u' => 'http://www.rapleaf.com',
+              'i' => 'http://www.rapleaf.com/images/logos/rapleaf_logo_175x46.png?1219180959'),
+
+        array('n' => 'AmieStreet',
+              'u' => 'http://www.amiestreet.com',
+              'i' => 'http://amiestreet.com/static/images/logo.gif'),
+
+        array('n' => 'Evernote',
+              'u' => 'http://www.evernote.com',
+              'i' => 'http://evernote.com/about/img/logo.gif'),
+
+        array('n' => 'junkdepot',
+              'u' => 'http://www.junkdepot.com',
+              'i' => 'http://www.junkdepot.com/css/images/logo.png'),
+
+        array('n' => 'E-Sport Network',
+              'u' => 'http://www.esportnetwork.com',
+              'i' => 'http://www.esportnetwork.com/esnlogo.png'),
+
+
+        );
+
+echo '
+<div class="companies" name="companies">
+<h2>Powered by Thrift</h2>
+<p>The following companies are known to employ Thrift in their production services.</p>
+';
+$odd = false;
+foreach ($companies as $c) {
+  $odd = !$odd;
+  echo
+    '<div class="company'.($odd ? ' odd' : '').'">'.
+    (!isset($c['i']) ? '' : image($c['i'], $c['n'])).
+    '<h4>'.$c['n'].'</h4>'.
+    alink($c['u'], $c['u']).
+    (!isset($c['a']) ? '' : '<p>'.$c['a'].'</p>').
+    '</div>';
+}
+echo '</div>';
+
+echo $page->close();

Added: incubator/thrift/site/dynathrift/developers/index.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/developers/index.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/developers/index.php (added)
+++ incubator/thrift/site/dynathrift/developers/index.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,71 @@
+<?php
+include_once '../thrift.lib.php';
+$page = new ThriftPage('developers');
+echo $page->open();
+
+echo '
+<h2>Issue Tracking</h2>
+<p class="issues">Thrift tracks both bugs and enhancements using Apache JIRA. Before filing new requests, we ask that you first do the following:</p>
+<ul>
+<li>Search the JIRA database</li>
+<li>Check the '.alink('user mailing list', '/thrift/mailing/#user').' via searching the archives or asking a question</li>
+</ul><p>'.
+$page->actionlink('Thrift JIRA', 'http://issues.apache.org/jira/browse/THRIFT').
+'</p>';
+
+echo '
+<div class="sourcecontrol">
+<h2>Source Control</h2>
+<p>The Thrift source code resides in the Apache SVN repository. Four types of access are available:</p>';
+
+$access =
+  array('web' =>
+        array('t' => 'Web-Access (read-only)',
+              'd' => 'Source code can be browsed via the Web. No SVN client software is required.',
+              'u' => 'http://svn.apache.org/viewcvs.cgi/incubator/thrift/'),
+
+        'anon' =>
+        array('t' => 'Anonymous (read-only)',
+              'd' => 'General instructions for anonymous access are '.alink('here', 'http://www.apache.org/dev/version-control.html#anon-svn').'.',
+              'u' => 'http://svn.apache.org/repos/asf/incubator/thrift/'),
+
+        'committer' =>
+        array('t' => 'Committer Access (read-write)',
+              'd' => 'General instructions for committer access are '.alink('here', 'http://www.apache.org/dev/version-control.html#https-svn').'.',
+              'u' => 'https://svn.apache.org/repos/asf/incubator/thrift/'),
+
+        'git' =>
+        array('t' => 'Git repositories (unofficial)',
+              'd' => 'Unofficial git repositories are maintained by members of the development team.',
+              'u' => 'http://wiki.apache.org/thrift/GitRepository'),
+        );
+
+echo '<ul class="access">';
+foreach ($access as $k => $a) {
+  echo
+    '<li>'.
+    '<h3>'.$a['t'].'</h3>'.
+    $a['d'].
+    '<div class="url">'.alink($a['u'], $a['u']).
+    '</li>';
+}
+echo '</ul>';
+
+echo '
+<div class="svn">
+<h2>SVN Resources</h2>
+<ul class="access">'.
+'<li><h3>Official Site</h3>'.
+alink('http://subversion.tigris.org', 'http://subversion.tigris.org').'</li>'.
+'<li><h3>IDE Plugins</h3>'.
+alink('Eclipse', 'http://subclipse.tigris.org').
+'</li>'.
+'<li><h3>Windows GUI</h3>'.
+alink('Tortoise Windows GUI', 'http://tortoisesvn.tigris.org').'</li>'.
+'</ul>
+</div>'; // svn
+
+echo '</div>'; // sourcecontrol
+
+
+echo $page->close();

Added: incubator/thrift/site/dynathrift/download/index.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/download/index.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/download/index.php (added)
+++ incubator/thrift/site/dynathrift/download/index.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,34 @@
+<?php
+include_once '../thrift.lib.php';
+$page = new ThriftPage('download');
+echo $page->open();
+
+echo '
+<h2>Direct Download</h2>
+<p>Thrift snapshots are available for direct download from '.
+alink('gitweb.thrift-rpc.org',
+      'http://gitweb.thrift-rpc.org/?p=thrift.git;a=tree').
+'.</p>
+
+<pre>'.txt2html('
+wget -O thrift.tgz "http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz"
+tar -xzf thrift.tgz
+cd thrift
+').'</pre>'.
+
+'<div class="download_button">'.
+alink('<span>&rarr;</span>Download the Snapshot',
+      'http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz').
+'</div>'.
+
+'<h2 class="topborder">SVN Checkout</h2>
+<p>Alternatively, you may checkout Thrift from the '.
+alink('Apache SVN repository',
+      'http://svn.apache.org/viewvc/incubator/thrift/').
+'.</p>
+<pre>'.txt2html('
+svn co http://svn.apache.org/repos/asf/incubator/thrift/trunk thrift
+cd thrift
+').'</pre>';
+
+echo $page->close();

Added: incubator/thrift/site/dynathrift/index.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/index.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/index.php (added)
+++ incubator/thrift/site/dynathrift/index.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,101 @@
+<?php
+include_once 'thrift.lib.php';
+$page = new ThriftPage('home');
+echo $page->open();
+echo $page->welcome(array(
+'Thrift is a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml.',
+
+'Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008.')).
+
+'<h3>Quick Links</h3>
+<ul>
+<li>'.alink('Thrift Wiki', 'http://wiki.apache.org/thrift/').'</li>
+<li>'.alink('JIRA page', 'http://issues.apache.org/jira/browse/THRIFT').'</li>
+<li>'.alink('Incubation status', 'http://incubator.apache.org/projects/thrift.html').'</li>
+
+</ul>
+
+<h3>Getting Started</h3>
+<ul>
+<li>'.alink('Download Thrift', '/thrift/download/').'</li>
+<li>'.alink('Thrift Tutorial', '/thrift/tutorial/').'</li>
+<li>'.alink('Mailing Lists', '/thrift/mailing/').'</li>
+</ul>
+
+<div class="overview">
+<h3>An Example</h3>
+<p>Thrift allows you to define data types and service interfaces in a simple definition file. Taking that file as input, the compiler generates code to be used to easily build RPC clients and servers that communicate seamlessly across programming languages.</p>
+<p>For instance, say you would like to write a service to store user objects for your web frontend. You could write a Thrift file as follows:</p>
+
+<pre>
+struct UserProfile {
+  1: i32 uid,
+  2: string name,
+  3: string blurb
+}
+service UserStorage {
+  void store(1: UserProfile user),
+  UserProfile retrieve(1: i32 uid)
+}
+</pre>
+
+<p>Thrift does the heavy lifting. Instead of writing a load of boilerplate code to serialize and transport your objects and invoke remote methods, you can get right down to business. Here is some sample Python client code:</p>
+
+<pre>'.txt2html(
+'# Make an object
+up = UserProfile({"uid" : 1,
+                  "name" :"Mark Slee",
+                  "blurb" : "I\'ll find something to put here."})
+
+# Talk to a server via TCP sockets, using a binary protocol
+transport = TSocket.TSocket("localhost", 9090)
+transport.open()
+protocol = TBinaryProtocol.TBinaryProtocol(transport)
+
+# Use the service we already defined
+service = UserStorage.client(protocol)
+service.store(up)
+
+# Retrieve something as well
+up2 = service.retrieve(2)').
+'</pre>
+
+<p>Not much to it. Implementing the server as simple as filling in the blanks:</p>
+
+<pre>'.txt2html(
+'class UserStorageHandler : virtual public UserStorageIf {
+ public:
+  UserStorageHandler() {
+    // Your initialization goes here
+  }
+
+  void store(const UserProfile& user) {
+    // Your implementation goes here
+    printf("store\n");
+  }
+
+  void retrieve(UserProfile& _return, const int32_t uid) {
+    // Your implementation goes here
+    printf("retrieve\n");
+  }
+};
+
+int main(int argc, char **argv) {
+  int port = 9090;
+  shared_ptr<UserStorageHandler> handler(new UserStorageHandler());
+  shared_ptr<TProcessor> processor(new UserStorageProcessor(handler));
+  shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
+  shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+  shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+  TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
+  server.serve();
+  return 0;
+}').
+'</pre>
+<p>Learn more about Thrift:'.
+$page->actionlink('Read the Whitepaper', '/thrift/static/thrift-20070401.pdf').'
+</p>
+</div>
+';
+
+echo $page->close();

Added: incubator/thrift/site/dynathrift/mailing/index.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/mailing/index.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/mailing/index.php (added)
+++ incubator/thrift/site/dynathrift/mailing/index.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,46 @@
+<?php
+include_once '../thrift.lib.php';
+$page = new ThriftPage('mailing');
+echo $page->open();
+
+$lists =
+  array('user' =>
+        array('t' => 'Users',
+              'd' => 'If you use Thrift, please subscribe to the Thrift user mailing list. This list is for questions about Thrift and announcements from the team relevant to all users.'),
+
+        'dev' =>
+        array('t' => 'Developers',
+              'd' => 'If you would like to contribute to Thrift, subscribe to the Thrift developer mailing list.'),
+
+        'commits' =>
+        array('t' => 'Commits',
+              'd' => 'This list receives notifications about all code changes made to Thrift.')
+        );
+
+echo
+$page->welcome(array(
+'In accordance with the principles of the Apache Software Foundation, Thrift encourages a collaborative and community-based development environment.',
+
+'All project discussion is carried out publicly, on the following archived lists.'));
+
+foreach ($lists as $k => $list) {
+  echo
+    '<div class="list" name="'.$k.'">'.
+    '<h2>'.txt2html($list['t']).'</h2>'.
+    '<p>'.$list['d'].'</p>'.
+    '<div class="actions">'.
+    alink('Subscribe',
+          'mailto:thrift-'.$k.'-subscribe@incubator.apache.org').
+    ' | '.
+    alink('Unsubscribe',
+          'mailto:thrift-'.$k.'-unsubscribe@incubator.apache.org').
+    ' | '.
+    alink('View Archives',
+          'http://mail-archives.apache.org/mod_mbox/incubator-thrift-'.$k.'/').
+    '</div>'. // actions
+    '</div>'; // list
+}
+
+echo '<p class="listnote">Note: subscription is required to post to all lists.</p>';
+
+echo $page->close();

Added: incubator/thrift/site/dynathrift/static/apache-incubator-small.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/apache-incubator-small.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/apache-incubator-small.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/apache-incubator.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/apache-incubator.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/apache-incubator.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift-20070401.pdf
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift-20070401.pdf?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift-20070401.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift.css
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift.css?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/static/thrift.css (added)
+++ incubator/thrift/site/dynathrift/static/thrift.css Tue Sep  2 11:00:33 2008
@@ -0,0 +1,445 @@
+/**
+ * General site styles
+ */
+body {
+  background: #131313;
+  color: #111;
+  font-family: Verdana, Geneva, sans-serif;
+  margin: 0px;
+  padding: 18px 0px;
+}
+div {
+  margin: 0px;
+  padding: 0px;
+}
+.oframe {
+  margin: 0px auto;
+  width: 916px;
+}
+.tframe {
+  background: #111 url(/thrift/static/thrift_fade_vert.png) no-repeat top center;
+  height: 6px;
+}
+.iframe {
+  background: #111 url(/thrift/static/thrift_fade.png) repeat-y top center;
+  padding: 0px 7px;
+}
+.bframe {
+  background: #111 url(/thrift/static/thrift_fade_vert.png) no-repeat bottom center;
+  height: 6px;
+}
+.frame {
+  background: url(thrift_nav.png);
+  border: solid #888 1px;
+}
+a {
+  color: #3b5998;
+  text-decoration: none;
+}
+a:visited {
+  color: #3b5998;
+}
+a:hover{
+  color: #3b9859;
+}
+img, a img {
+  border: none;
+  outline: 0;
+  margin: 0;
+  padding: 0;
+}
+.header {
+  background-image: url(thrift_header.png);
+  height: 52px;
+  padding: 12px 12px 0px 21px;
+  position: relative;
+}
+.header h2 {
+  bottom: 0px;
+  height: 41px;
+  position: absolute;
+  padding: 0;
+  margin: 0;
+}
+.header h2 a,
+.header h2 small {
+  float: left;
+}
+.header h2 small {
+  color: #333;
+  font-size: 11px;
+  font-weight: normal;
+  margin: 24px 0px 0px 42px;
+}
+.header .apache {
+  float: right;
+}
+.leftnav {
+  float: left;
+  padding: 21px 16px 6px 24px;
+  width: 144px;
+}
+.leftnav ul {
+  margin: 0px;
+  padding: 0px;
+  list-style: none;
+}
+.leftnav li {
+  font-size: 12px;
+  height: 22px;
+  line-height: 20px;
+  list-style: none;
+  margin: 0px;
+  padding: 2px 0px 2px 0px;
+}
+.leftnav li.active {
+  font-size: 14px;
+  font-weight: bold;
+}
+.leftnav li.ln_developers {
+  border-top: solid #e0e0e0 1px;
+  margin-top: 10px;
+  padding-top: 12px;
+}
+.leftnav ul.ext {
+  border-top: solid #e0e0e0 1px;
+  margin: 8px 0px 0px;
+  padding: 10px 0px 0px;
+}
+.leftnav a,
+.leftnav a:visited {
+  color: #333;
+  display: block;
+}
+.leftnav a:hover {
+  color: #3b9859;
+}
+.wrapper {
+  background: url(thrift_body.png);
+  overflow: hidden;
+}
+.main {
+  background-image: url(thrift_main.png);
+  border-left: solid #d9d9d9 1px;
+  float: right;
+  min-height: 600px;
+  padding: 24px 32px;
+  width: 640px;
+}
+.main h2 {
+  font-size: 18px;
+  font-weight: bold;
+  padding: 0px;
+  margin: 0px 0px 12px;
+}
+.main p {
+  font-size: 13px;
+  padding: 0px;
+  margin: 0px 0px 16px;
+}
+.main .welcome {
+  font-family: Georgia,'Times New Roman',Times,serif;
+  color: #222;
+  text-align: justify;
+}
+.main .welcome p.first {
+  font-size: 18px;
+  line-height: 23px;
+}
+.main ul,
+.main li {
+  list-style: square;
+}
+.main ul {
+  margin: 0px 0px 12px;
+  padding: 4px 0px;
+}
+.main li {
+  font-size: 12px;
+  margin: 6px 0px;
+  padding: 0px;
+}
+.main pre {
+  background: #fefeff;
+  border: solid #d8dfea 1px;
+  color: #722;
+  font-size: 12px;
+  margin: 0px -12px 16px -12px;
+  padding: 12px;
+}
+.main .actionlink {
+  display: block;
+  font-size: 14px;
+  font-weight: bold;
+  margin-top: 4px;
+}
+.main .grabme {
+  color: #3b5998;
+  float: left;
+  font-size: 12px;
+  font-weight: bold;
+  margin-top: 1px;
+  margin-left: -16px;
+}
+.main .topborder {
+  border-top: solid #e9e9e9 1px;
+  margin-top: 18px;
+  padding-top: 18px;
+}
+.footer {
+  background-image: url(thrift_nav.png);
+  border-top: solid #c7c7c7 1px;
+  clear: both;
+  color: #888;
+  font-size: 11px;
+  padding: 2px 0px 4px;
+  text-align: right;
+}
+.footer .copyright {
+  padding-right: 12px;
+}
+
+/**
+ * Home Page
+ */
+
+.home .welcome {
+  border-bottom: solid #e9e9e9 1px;
+  margin: 0px 0px 16px;
+}
+.home .overview {
+  border-top: solid #e9e9e9 1px;
+  margin: 12px 0px 0px;
+  padding: 16px 0px 0px;
+}
+.home h3 {
+  font-size: 13px;
+  margin: 0px;
+  padding: 0px;
+}
+.home .overview h3 {
+  margin-bottom: 12px;
+}
+
+/**
+ * Mailing Lists
+ */
+
+.mailing .list {
+  border-top: solid #e9e9e9 1px;
+  padding: 18px 0px 0px;
+  margin: 18px 0px 0px;
+}
+.mailing .list h2 {
+  padding: 0px;
+  margin: 0px 0px 12px;
+  font-size: 14px;
+}
+.mailing .list p {
+  margin-bottom: 8px;
+}
+.mailing .list .actions {
+  color: #999;
+  font-size: 12px;
+}
+.mailing .listnote {
+  border-top: solid #e9e9e9 1px;
+  color: #777;
+  font-size: 12px;
+  margin: 18px 0px 0px;
+  padding-top: 18px;
+}
+
+/**
+ * Developers page
+ */
+.developers .issues {
+  font-size: 14px;
+  margin-bottom: 0px;
+}
+.developers .sourcecontrol h2 {
+  border-top: solid #e9e9e9 1px;
+  padding-top: 18px;
+}
+.developers .sourcecontrol p {
+  margin: 0px;
+}
+.developers .access h3 {
+  font-size: 13px;
+  font-weight: bold;
+  margin: 0px 0px 8px;
+  padding: 0px;
+}
+.developers .access li {
+  margin: 12px 0px 2px;
+}
+.developers .access li .url {
+  margin-top: 6px;
+}
+.developers .svn h2 {
+  margin-bottom: 0px;
+}
+
+/**
+ * About page
+ */
+.about .welcome ul {
+  padding: 0px;
+}
+.about .welcome li {
+  padding: 0px 0px 8px;
+}
+.about .welcome li b {
+  display: block;
+  font-size: 14px;
+  margin-bottom: 4px;
+}
+.about .committers,
+.about .companies {
+  border-top: solid #e9e9e9 1px;
+  font-size: 12px;
+}
+.about .committers table {
+  margin: 0px -8px;
+}
+.about h2 {
+  padding-top: 18px;
+}
+.about .committers tr,
+.about .committers td {
+  vertical-align: top;
+}
+.about .committers td,
+.about .committers th {
+  padding: 4px 16px 4px 8px;
+}
+.about .committers th {
+  color: #777;
+  font-size: 11px;
+  font-weight: normal;
+  text-align: left;
+}
+.about .committers tr.odd td,
+.about .companies .odd {
+  background-image: url(/thrift/static/thrift_nav.png);
+}
+.about .committers tr.first td {
+  border-top: solid #e9e9e9 1px;
+}
+.about .committers td {
+  border-bottom: solid #e9e9e9 1px;
+}
+.about .committers td.username {
+  color: #222;
+  font-weight: bold;
+}
+.about .committers h3 {
+  font-size: 14px;
+  font-weight: bold;
+  padding: 0px;
+  margin: 16px 0px 8px;
+}
+.about .committers ul {
+  padding: 0px;
+  margin: 0px;
+}
+.about .companies {
+  margin-top: 24px;
+}
+.about .companies .company {
+  border-top: solid #e9e9e9 1px;
+  overflow: hidden;
+  padding: 8px 8px;
+  margin: 0px -8px;
+}
+.about .companies .company h4 {
+  font-size: 14px;
+  font-weight: bold;
+  margin: 0px 0px 4px;
+  padding: 0px;
+}
+.about .companies .company p {
+  color: #444;
+  font-size: 11px;
+  line-height: 15px;
+  margin: 8px 0px;
+  text-align: justify;
+  width: 440px;
+}
+.about .companies img {
+  float: right;
+  max-height: 60px;
+  max-width: 150px;
+}
+
+/**
+ * Download page
+ */
+.download .download_button {
+  padding: 8px 0px 0px;
+  margin: 0px -12px 0px;
+}
+.download .download_button a {
+  background: #3b5998;
+  border-top: solid #f7f7f7 1px;
+  border-left: solid #f7f7f7 1px;
+  border-bottom: solid #444 1px;
+  border-right: solid #444 1px;
+  color: #f7f7ff;
+  display: block;
+  font-size: 14px;
+  font-weight: bold;
+  padding: 6px 12px;
+}
+.download .download_button a:hover {
+  background: #3b9859;
+  color: #f7fff7;
+}
+.download .download_button a span {
+  float: right;
+  font-size: 20px;
+  line-height: 20px;
+  margin-top: -4px;
+}
+.download .topborder {
+  margin-top: 24px;
+  padding-top: 24px;
+}
+
+/**
+ * Tutorial Page
+ */
+
+.tutorial h4 {
+  font-size: 12px;
+  font-weight: bold;
+  margin: 0px;
+  padding: 8px 0px 0px;
+}
+.tutorial ol {
+  padding-left: 0px;
+  margin-left: 0px;
+}
+.tutorial ol.toc {
+  margin: 8px 0px 0px;
+  padding-bottom: 2px;
+}
+.tutorial .steps li {
+  padding-bottom: 18px;
+}
+
+.tutorial h3 {
+  font-size: 16px;
+  margin: 0px;
+  padding: 0px 0px 8px;
+}
+.tutorial .woe_is_me {
+  background: #ead8df;
+  border: solid #98593b 1px;
+  color: #983b59;
+  font-size: 12px;
+  font-weight: bold;
+  line-height: 18px;
+  margin: 0px -12px 8px;
+  padding: 12px;
+}

Added: incubator/thrift/site/dynathrift/static/thrift_body.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_body.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_body.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift_fade.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_fade.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_fade.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift_fade_vert.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_fade_vert.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_fade_vert.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift_header.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_header.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_header.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift_main.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_main.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_main.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift_mask.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_mask.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_mask.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/static/thrift_nav.png
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/static/thrift_nav.png?rev=691330&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/thrift/site/dynathrift/static/thrift_nav.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/thrift/site/dynathrift/thrift.css
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/thrift.css?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/thrift.css (added)
+++ incubator/thrift/site/dynathrift/thrift.css Tue Sep  2 11:00:33 2008
@@ -0,0 +1,43 @@
+body {
+  background: #fff;
+  font-family: Verdana, Geneva, sans-serif;
+  margin: 0px;
+  padding: 0px;
+}
+
+a {
+  color: #333;
+  text-decoration: none;
+}
+a:visited {
+  color: #333;
+}
+a:hover {
+  text-decoration: none;
+}
+img,
+a img {
+  border: none;
+}
+
+.header {
+  background: #f7f7f7;
+  border-bottom: solid #e9e9e9 1px;
+  padding: 12px;
+}
+.header h2 {
+  font-size: 28px;
+  font-weight: bold;
+  margin: 0px;
+  padding: 0px;
+}
+.header h2 small {
+  color: #777;
+  display: block;
+  font-size: 11px;
+  font-weight: normal;
+  margin: 2px 0px 0px 4px;
+}
+.header .apache {
+  float: right;
+}

Added: incubator/thrift/site/dynathrift/thrift.lib.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/thrift.lib.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/thrift.lib.php (added)
+++ incubator/thrift/site/dynathrift/thrift.lib.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,153 @@
+<?php
+
+/**
+ * This is the core Apache Thrift website library. This is a bit hacked together
+ * and random, for which I have no better excuse than the fact that I didn't
+ * have much time to work on this, and it was the path of least resistance.
+ *
+ * There's no real web framework in here because the Apache incubator sites
+ * all seem to run straight static files. Writing stupid PHP scripts makes it
+ * easier to develop on a local LAMP stack, but also to write wrappers to
+ * quickly generate the whole site down to static HTML.
+ *
+ * @author mcslee
+ */
+
+/**
+ * Escape a raw string for HTML display.
+ */
+function txt2html($str) {
+  return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
+}
+
+/**
+ * Render a simple link.
+ */
+function alink($html, $href, $class='') {
+  return
+    '<a href="'.txt2html($href).'"'.
+    ($class ? ' class="'.$class.'"' : '').
+    '>'.
+    $html.'</a>';
+}
+
+/**
+ * Render a small element.
+ */
+function small($html) {
+  return '<small>'.$html.'</small>';
+}
+
+/**
+ * Render an image tag.
+ */
+function image($src, $class='', $alt='') {
+  return '<img src="'.txt2html($src).'"'.
+    ($class ? ' class="'.$class.'"' : '').
+    ' alt="'.$alt.'" />';
+}
+
+/**
+ * A ThriftPage is a UI element that wraps up the rendering of the standard
+ * boring stuff on the page.
+ */
+class ThriftPage {
+  public function __construct($tab='home') {
+    $this->tab = $tab;
+  }
+
+  public function open($title='') {
+    return
+'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="thrift">
+<head>
+<title>Apache Thrift'.($title ? ' | '.$title : '').'</title>
+<link rel="stylesheet" type="text/css" href="/thrift/static/thrift.css" />
+</head>
+<body>
+<div class="oframe">
+<div class="tframe"></div>
+<div class="iframe">
+<div class="frame">'.
+      $this->_header().
+      '<div class="wrapper">'.
+      $this->_leftnav().
+      '<div class="main '.$this->tab.'">';
+  }
+
+  protected function _header() {
+    return
+      '<div class="header">'.
+      alink(image('/thrift/static/apache-incubator-small.png', 'Apache'),
+            'http://incubator.apache.org/', 'apache').
+      '<h2>'.
+      alink(image('/thrift/static/thrift_mask.png', 'Thrift'),
+            // 'Thrift',
+            '/thrift/', 'logo').
+      small('Software minus logo.').
+      '</h2>'.
+      '</div>';
+  }
+
+  protected function _leftnav() {
+    $html = '<div class="leftnav"><ul>';
+    $tabs = array('home' => 'Home',
+                  'about' => 'About',
+                  'mailing' => 'Mailing Lists',
+                  'developers' => 'Developers',
+                  'download' => 'Download',
+                  'tutorial' => 'Tutorial');
+    foreach ($tabs as $key => $name) {
+      $active = ($key == $this->tab);
+      $url = ($key == 'home') ? '' : $key.'/';
+      $html .=
+        '<li class="ln_'.$key.($active ? ' active' : '').'">'.
+        alink($name.($active ? ' &raquo;' : ''), '/thrift/'.$url).
+        '</li>';
+    }
+    $html .= '</ul>';
+
+
+    $ext = array('Thrift Wiki' => 'http://wiki.apache.org/thrift');
+    $html .= '<ul class="ext">';
+    foreach ($ext as $text => $url) {
+      $html .= '<li>'.alink($text, $url).'</li>';
+    }
+    $html .= '</ul>';
+    $html .= '</div>';
+    return $html;
+  }
+
+  public function welcome($ps, $addl_html='') {
+    $first = true;
+    $html =
+      '<div class="welcome">';
+    foreach ($ps as $p) {
+      $html .= '<p'.($first ? ' class="first"' : '').'>'.$p.'</p>';
+      $first = false;
+    }
+    $html .= $addl_html;
+    $html .= '</div>';
+    return $html;
+  }
+
+  public function actionlink($html, $href) {
+    return
+      '<span class="actionlink">'.
+      '<span class="grabme">&raquo;</span>'.
+      alink($html, $href).
+      '</span>';
+  }
+
+  public function close() {
+    return
+      '</div>'. // main
+      '</div>'. // wrapper
+      '<div class="footer"><span class="copyright">Copyright '.date('Y').' Apache Software Foundation</span></div>'.
+      '</div>'. // frame
+      '</div>'. // iframe
+      '<div class="bframe"></div>'.
+      '</div>'. // oframe
+      '</body></html>';
+  }
+}
\ No newline at end of file

Added: incubator/thrift/site/dynathrift/tutorial/index.php
URL: http://svn.apache.org/viewvc/incubator/thrift/site/dynathrift/tutorial/index.php?rev=691330&view=auto
==============================================================================
--- incubator/thrift/site/dynathrift/tutorial/index.php (added)
+++ incubator/thrift/site/dynathrift/tutorial/index.php Tue Sep  2 11:00:33 2008
@@ -0,0 +1,54 @@
+<?php
+include_once '../thrift.lib.php';
+$page = new ThriftPage('tutorial');
+echo $page->open();
+
+$tutorial = array();
+
+$tutorial []=
+  array('t' => 'Download Thrift',
+        'b' => 'To get started, download a copy of Thrift.');
+
+$tutorial []=
+  array('t' => 'Build and Install',
+        'b' => 'Next, build and install the Thrift libraries and compiler.');
+
+$tutorial []=
+  array('t' => 'Writing a Thrift file',
+        'b' => 'Let\'s define and create a simple service.');
+
+$tutorial []=
+  array('t' => 'Using the Thrift Compiler',
+        'b' => 'Invoke the Thrift compiler on the test file.');
+
+$tutorial []=
+  array('t' => 'Running a Thrift Server',
+        'b' => 'Fill in the server stubs and build the server.');
+
+$tutorial []=
+  array('t' => 'Running a Thrift Client',
+        'b' => 'Using the client libraries.');
+
+echo '<h2>Thrift Tutorial</h2>';
+
+echo
+'<div class="woe_is_me">This tutorial is known to be <i>woefully</i> incomplete, and is a work in progress. This skeleton is illustrative of what is being worked on and will soon be available.</div>';
+
+echo '<h4>Contents</h4><ol class="toc">';
+foreach ($tutorial as $i => $t) {
+  echo '<li>'.alink($t['t'], '#t'.$i).'</li>';
+}
+echo '</ol>';
+
+echo '<ol class="steps topborder">';
+foreach ($tutorial as $i => $t) {
+  echo
+    '<li>'.
+    '<a name="t'.$i.'"></a>'.
+    '<h3>'.$t['t'].'</h3>'.
+    $t['b'].
+    '</li>';
+}
+echo '</ol>';
+
+echo $page->close();