Appweb includes a suite of programming samples that demonstrate
basic use of the APIs. Our goal is to get you running as
quickly and easily as possible. If you find that a sample that
you need is missing, please email dev@mbedthis.com.
The Appweb samples are included with releases of Embedthis
Appweb. The samples include full source code, makefiles and
project files (for Windows). You can build the samples or cut and
paste code into your own applications. These samples are
installed by default at <InstallDir>/samples and at
/usr/share/appweb-VERSION for Linux. Each sample is a stand-alone
directory that may be relocated or copied to any directory. For
Linux a pre-supplied Makefile will be used to build the sample.
For Windows, a Visual Studio project is supplied. NOTE: Please read Embedding Appweb and Programming Paradigms first before trying
the samples. If you want to embed HTTP server functionality
in your application the key samples are: |
Workspace File |
Description |
C++/c++Samples.dsw | Builds all files necessary for the appweb program. Includes building all loadable modules. |
C/cSamples.dsw | Builds the HTTP client. |
To build using Visual Studio 6 open the workspace files with a "dsw" extension. To build using Visual Studio.NET, open the workspace files and upgrade them to Visual Studio.NET solution files.
Sample Name |
Languages |
Threading | Event Model |
Description |
simpleServer |
C, C++ |
Multithreaded. | Service thread using select |
Main program HTTP server |
simpleEsp |
C, C++ |
Single / Multithreaded. | Main program HTTP server |
|
simpleEgi |
C, C++ |
Single / Multithreaded. | Main program HTTP server |
|
simpleModule |
C++ |
Multithreaded. |
Appweb module |
|
pollEventLoop |
C, C++ |
Single-threaded |
Polling in main program |
Main program HTTP server |
selectEventLoop |
C, C++ |
Single-threaded | Exposed select in main program |
Main program HTTP server |
winEventLoop |
C, C++ |
Single-threaded | Windows messages |
Main program HTTP server |
simpleClient |
C++ |
Multithreaded |
Main program using the HTTP
client |
|
simpleHandler |
C++ |
Multithreaded. |
Appweb module |
|
goaheadCompat |
C |
Single-threaded | Main program HTTP server |
Embedding Appweb
Using EGI
Pages from ROM
Programming Paradigms
Creating Appweb Modules
Creating Appweb Handlers