thrift/tutorial
Nobuaki Sukegawa 11da87e6f3 THRIFT-2835 Add possibility to distribute generators separately from thrift core, and load them dynamically
Client: Compiler
Patch: Nobuaki Sukegawa, rebased by dtmuller

Also fixed by dtmuller:
* Add plugin namespace for erlang language binding
* Fix unit test test_const_value
* Don't clear type cache with every t_program conversion
* Type "wb" may not be supported by popen on non-Windows platforms
* Fix constness of AST type signatures
2016-09-26 01:42:01 +09:00
..
as3 THRIFT-2392: Actionscript tutorial 2014-03-11 22:21:07 -04:00
c_glib THRIFT-3283 c_glib: Tutorial server always exits with warning 2015-07-31 23:23:48 +02:00
cpp THRIFT-2835 Add possibility to distribute generators separately from thrift core, and load them dynamically 2016-09-26 01:42:01 +09:00
csharp THRIFT-3319 CSharp tutorial will not build using the *.sln 2015-09-11 23:49:54 +02:00
d THRIFT-3666 Build D tutorial as part of Autotools build 2016-02-27 17:17:27 +09:00
dart THRIFT-3869 Remove Dart packages during make clean 2016-07-15 23:04:38 +02:00
delphi THRIFT-2768: Whitespace Fixup 2014-10-03 20:12:40 +02:00
erl THRIFT-3400 Add Erlang to cross test 2015-10-31 14:54:12 +09:00
go THRIFT-727 what() method of generated exceptions will provide more information 2015-05-20 22:44:55 +02:00
haxe THRIFT-3833 haxe http server implementation (by embeding into php web server) 2016-05-29 00:43:13 +02:00
hs THRIFT-727 - C++: what() method of generated exceptions will provide more information 2015-05-18 19:47:23 +02:00
java THRIFT-727 - C++: what() method of generated exceptions will provide more information 2015-05-18 19:47:23 +02:00
js THRIFT-2830:clean up ant tutorial warnings 2014-11-15 22:21:36 -08:00
nodejs THRIFT-3904 Fix typo in node tutorial. 2016-09-03 17:20:06 +09:00
ocaml THRIFT-727 - C++: what() method of generated exceptions will provide more information 2015-05-18 19:47:23 +02:00
perl THRIFT-727 - C++: what() method of generated exceptions will provide more information 2015-05-18 19:47:23 +02:00
php THRIFT-3596 Better conformance to PEP8 2016-02-04 14:28:24 +09:00
py More make dist entries 2016-03-19 23:53:05 +09:00
py.tornado THRIFT-3540 Make python tutorial more in line with PEP8 2016-01-13 20:25:19 +09:00
py.twisted THRIFT-3540 Make python tutorial more in line with PEP8 2016-01-13 20:25:19 +09:00
rb THRIFT-727 - C++: what() method of generated exceptions will provide more information 2015-05-18 19:47:23 +02:00
Makefile.am THRIFT-3666 Build D tutorial as part of Autotools build 2016-02-27 17:17:27 +09:00
README.md THRIFT-2407 use markdown (rename README => README.md) 2014-03-19 06:47:47 +01:00
shared.thrift THRIFT-3299 Create an Apache Thrift language binding for Dart (dartlang.org). 2015-10-03 01:43:59 +02:00
tutorial.thrift THRIFT-3454 Python Tornado tutorial is broken 2015-12-04 00:38:33 +09:00

Thrift Tutorial

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Tutorial

  1. First things first, you'll need to install the Thrift compiler and the language libraries. Do that using the instructions in the top level README.md file.

  2. Read tutorial.thrift to learn about the syntax of a Thrift file

  3. Compile the code for the language of your choice:

    $ thrift $ thrift -r --gen cpp tutorial.thrift

  4. Take a look at the generated code.

  5. Look in the language directories for sample client/server code.

  6. That's about it for now. This tutorial is intentionally brief. It should be just enough to get you started and ready to build your own project.