Main > Reference Manual > Introduction > Architecture > Core library
The frePPLe binaries are a collection of shared libraries: a core library frepple.so (frepple.dll on Windows) and an additional shared library for each extension module.
The extension modules are loaded dynamically as plugins by frePPLe.
The frePPLe shared library can be used in different ways by applications.
Below is a list of some common ways to deploy frePPLe, but additional scenarios are definitely feasible.
The main development efforts are currently focussed on the first and the last two scenarios.
Command line application

A simple command-line application is available.
The application reads a set of XML files or from the standard input.
It executes all commands defined in the input data (which will typically also involve some Python code to solve the model and write the results back into flat files or a database) and then exits.
The program exit code reflects any processing errors.
Example usage:
frepple file1.xml frepple file2.xml file3.xml frepple dir_with_xml_files command | frepple
Use the option "-help" or "-?" to get a list of possible flags that can be passed on the command line.
This command line application is used for all test cases.
Command line application with Python scripting

In the previous setup the XML input and output files are supplied externally.
FrePPLe comes with an embedded interpreter for the Python language (see http://www.python.org).
Python is a dynamic object-oriented programming language. It comes with extensive standard libraries for database access, a wide range of internet protocols (such as ftp, http, https, smtp, pop, xml-rpc, soap, ...), various data formats (such as xml, csv, compression, encryption), ...
The Python interpreter has a rich API to access the frePPle objects in memory. This allows custom logic to be implemented in an easy and flexible way, with full access to the rich Python standard libraries.
For a majority of applications this will be the recommended setup.
Your C or C++ application links with frePPLe

Your application can be link with the frePPLe shared library.
Use the header file plannerinterface.h for the high-level interface declarations.
Use header file frepple.h when you need low-level access.
Since frePPLe is coded in C++:
- C applications will need some wrapper code to catch exceptions correctly and assure C linkage.
- Because of the C++ name mangling frePPLe and your application will need to be compiled by the same compiler.
Your java/perl/ruby/VB/.NET application accesses the frePPLe shared library

Most modern languages and tools have the capability to access functions in shared libraries.
SWIG (see http://www.swig.org/) is a tool that can help to generate the integration code with a wide range of high-level languages, such as Java, Ruby, Perl, Tcl, PHP, ...
An example setup is provided in the subdirectory contrib/scripting.
When building applications in this way, remember that the scripting language will load the frePPLe shared library and all memory allocated by frePPLe (which can be quite a lot!) will be owned by the scripting language process. For large models this is not be a very appropriate integration method.
Django frontend for frePPLe

Django (see http://www.djangoproject.com) is an impressive web application framework written in the Python language.
It allows quick and easy definition of the data model, automatically creates a administration user interface and allows you to construct performant and scalable web sites.
FrePPLe then reads from and writes into this Django database.
The sub directory contrib/django provides a reference Django model for frePPLe.
In a real-life implementation you will typically develop your own data model. You'll build web pages to support the user's workflows, and then write the appropriate mapping between your data model and the frePPLe internal data structures.
FrePPLe as a web service

FrePPLe comes with extension modules that implement a SOAP or REST web service.
In a Service Oriented Architecture, frePPLe will hold the plan information in memory and make it available on-line. Other systems can use the service to query and update the information to build composite applications.
Users can also directly access also the information from e.g. Excel (using the Office Web Service Toolkit).