You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2014/02/12 17:09:04 UTC

svn commit: r1567670 - /thrift/site/publish/index.html

Author: jfarrell
Date: Wed Feb 12 16:09:04 2014
New Revision: 1567670

URL: http://svn.apache.org/r1567670
Log:
Fixing main page on Apache Thrift website

Modified:
    thrift/site/publish/index.html

Modified: thrift/site/publish/index.html
URL: http://svn.apache.org/viewvc/thrift/site/publish/index.html?rev=1567670&r1=1567669&r2=1567670&view=diff
==============================================================================
--- thrift/site/publish/index.html (original)
+++ thrift/site/publish/index.html Wed Feb 12 16:09:04 2014
@@ -76,7 +76,7 @@
     <p>
       </p>
 <ul>
-<li>
+        <li>
           <b>Download Apache Thrift</b>
           <p>To get started, <a href="/download/">download</a> a copy of Thrift.</p>
         </li>
@@ -96,7 +96,9 @@
           <p>The sample tutorial.thrift file used for all the client and server tutorials can be found <a href="https://git-wip-us.apache.org/repos/asf/thrift/?p=thrift.git;a=tree;f=tutorial">here</a>. </p>
         </li>
       </ul>
-<br><p>
+    
+    <br>
+    <p>
       To learn more about Apache Thrift <a href="/static/files/thrift-20070401.pdf">Read the Whitepaper</a>
     </p>
   </div>
@@ -124,18 +126,20 @@
   </div>
 </div>
 
-<hr><p></p><h3>Example<h3>
+<hr>
+
+<p></p><h3>Example<h3>
 </h3>
 </h3><p>Apache 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. 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.
 </p>
 <p>The following example is a simple service to store user objects for a web front end.</p>
 <div class="tabbable">
   <ul class="nav nav-tabs">
-<li class="active"><a href="#1" data-toggle="tab">Thrift Definition File</a></li>
+    <li class="active"><a href="#1" data-toggle="tab">Thrift Definition File</a></li>
     <li><a href="#2" data-toggle="tab">Python Client</a></li>
     <li><a href="#3" data-toggle="tab">C++ Server</a></li>
   </ul>
-<div class="tab-content">
+  <div class="tab-content">
     <div class="tab-pane active" id="1">
       <pre><code>
       struct UserProfile {
@@ -150,10 +154,10 @@
       </code></pre>
     </div>
     <div class="tab-pane" id="2">
-      <div class="CodeRay"><div class="code"><pre><code class="language-python">      <span style="color:#777"># Make an object</span>
-      up = UserProfile(uid=<span style="color:#00D">1</span>,
-                       name=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Test User</span><span style="color:#710">"</span></span>,
-                       blurb=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Thrift is great</span><span style="color:#710">"</span></span>)
+      <div class="CodeRay"><div class="code"><pre><code class="language-python"><span style="color:#777"># Make an object</span>
+up = UserProfile(uid=<span style="color:#00D">1</span>,
+                 name=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Test User</span><span style="color:#710">"</span></span>,
+                 blurb=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Thrift is great</span><span style="color:#710">"</span></span>)
 
   <span style="color:#777"># Talk to a server via TCP sockets, using a binary protocol</span>
   transport = TSocket.TSocket(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">localhost</span><span style="color:#710">"</span></span>, <span style="color:#00D">9090</span>)
@@ -166,10 +170,11 @@
 
   <span style="color:#777"># Retrieve something as well</span>
   up2 = service.retrieve(<span style="color:#00D">2</span>)
-  &lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-&lt;div <span style="color:#080;font-weight:bold">class</span>=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">tab-pane</span><span style="color:#710">"</span></span> id=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">3</span><span style="color:#710">"</span></span>&gt;
-  &lt;pre&gt;&lt;code <span style="color:#080;font-weight:bold">class</span>=<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">language-c</span><span style="color:#710">"</span></span>&gt;
+  </code></pre>
+</div>
+</div></div>
+<div class="tab-pane" id="3">
+<div class="CodeRay"><div class="code"><pre><code class="language-c">
   <span style="color:#080;font-weight:bold">class</span> <span style="color:#B06;font-weight:bold">UserStorageHandler</span> : virtual public UserStorageIf {
    public:
     UserStorageHandler() {
@@ -198,8 +203,8 @@
     server.serve();
     <span style="color:#080;font-weight:bold">return</span> <span style="color:#00D">0</span>;
   }
-  &lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;</code></pre></div></div>
+  </code></pre>
+</div></div></div>
 </div>
 </div>
 </div>