You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jo...@apache.org on 2014/03/27 02:54:31 UTC

svn commit: r1582148 - /thrift/cms-site/trunk/content/tutorial/js.md

Author: joes
Date: Thu Mar 27 01:54:31 2014
New Revision: 1582148

URL: http://svn.apache.org/r1582148
Log:
stop the insanity of not separating out headers from the following structures

Modified:
    thrift/cms-site/trunk/content/tutorial/js.md

Modified: thrift/cms-site/trunk/content/tutorial/js.md
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/tutorial/js.md?rev=1582148&r1=1582147&r2=1582148&view=diff
==============================================================================
--- thrift/cms-site/trunk/content/tutorial/js.md (original)
+++ thrift/cms-site/trunk/content/tutorial/js.md Thu Mar 27 01:54:31 2014
@@ -5,9 +5,11 @@ library_lang: "js"
 {% include 'tutorial_intro.md' %}
 
 ### Prerequisites 
+
 * This tutorial depends on an existing Thrift server. See either the [Java tutorial](/tutorial/java) or [C++ tutorial](/tutorial/cpp) for how to build and setup one of these servers.
 
 ### Client
+
 <pre><code class="language-js">
 function calc() {
   var transport = new Thrift.Transport("/thrift/service/tutorial/");
@@ -31,12 +33,14 @@ function calc() {
 </code></pre>
 
 ### Server
+
 Use either the [Java tutorial](/tutorial/java) or [C++ tutorial](/tutorial/cpp) server 
 
 
 ## Additional Information
 
 ### Inspecting the generated Javascript code and HTML code
+
 Inside the html file is the entry point of using the Thrift.js and compiled Javascript files. The main section code from the tutorial.html fileis the Thrift client as shown above.
 	
 The first thing for using the Thrift files is setting up your Transport protocol. At this time, it only supports AJAX and is as follows:
@@ -67,6 +71,7 @@ Now that we have a functional Service In
 Now, when the calculate button on the html page is clicked, the calc() function as defined above is called and we get an AJAX call, which blocks and waits for the response. This then updates the result from the calculation.
 	
 ### Inspecting the generated tutorial_types.js file
+
 Each Thrift struct will have properties associated with it.  For our tutorial object, Work, this is as shown above. For example:
 	
 		var work = new Work();
@@ -101,4 +106,4 @@ Unfortunately, the Javascript object isn
 * The main goal of the library is to define the Transport and Protocol layers.
 * The Transport layer only uses AJAX as of right now.  
 * The Protocol layer handles the encoding/decoding to JSON format.
-* There are also the Thrift object types and call functions defined here as well.
\ No newline at end of file
+* There are also the Thrift object types and call functions defined here as well.