Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 54cac1c2268db633d66eeff1b4faa585 > files > 57

frepple-doc-0.8.1-3.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  <title>Frepple / Core library</title>
  <link rel='stylesheet' href='../styles.css' type='text/css' />
  <!--PageHeaderFmt-->  
</head>
<body>
<div id="container">

<div id="menubar">
  
<div id="logo" align="center">
<br/><img src='../frepple.bmp' alt="frepple" /><br/>
<a href='http://www.frepple.com/'>
<strong>a Free<br/>Production Planning<br/>Library</strong>
</a></div>
<div id="menu">
<br/>
<h3><a href='../Main/HomePage.html'>Main</a></h3>
<h3><a href='../UI/Main.html'>User Manual</a></h3>
<h3><a href='../Tutorial/Main.html'>Tutorial</a></h3>
<h3><a href='Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='../reference/index.html'>C++ API</a></h3>
<br/><div>
</div>  
</div>
</div>

<div id="content">
<br/>
<!--PageText-->
<div id='wikitext'>
<p><a class='wikilink' href='../Main/HomePage.html'>Main</a> &gt; <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Overview.html'>Introduction</a> > <a class='wikilink' href='OverviewArchitecture.html'>Architecture</a> > <a class='selflink' href='OverviewCore.html'>Core library</a></span>
</p>
<p class='vspace'>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.<br />The extension modules are loaded dynamically as plugins by frePPLe.
</p>
<p class='vspace'>The frePPLe shared library can be used in different ways by applications.<br />Below is a list of some common ways to deploy frePPLe, but additional scenarios are definitely feasible.<br />The main development efforts are currently focussed on the first and the last two scenarios.
</p>
<div class='vspace'></div><h2>Command line application</h2>
<div><span class='rfloat'><img src='../uploads/Frepple/appcmdline.png' alt='' title='' /></span></div>
<p>A simple command-line application is available.
</p>
<p class='vspace'>The application reads a set of XML files or from the standard input.<br />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.<br />The program exit code reflects any processing errors.
</p>
<p class='vspace'>Example usage:
</p><pre>  <em>frepple file1.xml</em>
  <em>frepple file2.xml file3.xml</em>
  <em>frepple dir_with_xml_files</em>
  <em>command | frepple</em>
</pre><p>Use the option "-help" or "-?" to get a list of possible flags that can be passed on the command line.
</p>
<p class='vspace'>This command line application is used for all test cases.
<br clear='all' />
</p>
<div class='vspace'></div><h2>Command line application with Python scripting</h2>
<div><span class='rfloat'><img src='../uploads/Frepple/apppython.png' alt='' title='' />  </span></div>
<p>In the previous setup the XML input and output files are supplied externally.
</p>
<p class='vspace'>FrePPLe comes with an embedded interpreter for the Python language (see <a target='_blank'  class='urllink' href='http://www.python.org' rel='nofollow'>http://www.python.org</a>).<br />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), ...<br />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.<br />For a majority of applications this will be the recommended setup. 
<br clear='all' />
</p>
<div class='vspace'></div><h2>Your C or C++ application links with frePPLe</h2>
<div><span class='rfloat'><img src='../uploads/Frepple/appcpp.png' alt='' title='' /></span></div>
<p>Your application can be link with the frePPLe shared library. 
</p>
<p class='vspace'>Use the header file plannerinterface.h for the high-level interface declarations.<br />Use header file frepple.h when you need low-level access.
</p>
<p class='vspace'>Since frePPLe is coded in C++:
</p><ul><li>C applications will need some wrapper code to catch exceptions correctly and assure C linkage.
</li><li>Because of the C++ name mangling frePPLe and your application will need to be compiled by the same compiler.
</li></ul><p><br clear='all' />
</p>
<div class='vspace'></div><h2>Your java/perl/ruby/VB/.NET application accesses the frePPLe shared library</h2>
<div><span class='rfloat'><img src='../uploads/Frepple/appvb.png' alt='' title='' /></span></div>
<p>Most modern languages and tools have the capability to access functions in shared libraries.
</p>
<p class='vspace'>SWIG (see <a target='_blank'  class='urllink' href='http://www.swig.org/' rel='nofollow'>http://www.swig.org/</a>) 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, ...<br />An example setup is provided in the subdirectory <em>contrib/scripting</em>.
</p>
<p class='vspace'>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.
<br clear='all' />
</p>
<div class='vspace'></div><h2>Django frontend for frePPLe</h2>
<div><span class='rfloat'><img src='../uploads/Frepple/appdjango.png' alt='' title='' /></span></div>
<p>Django (see <a target='_blank'  class='urllink' href='http://www.djangoproject.com' rel='nofollow'>http://www.djangoproject.com</a>) is an impressive web application framework written in the Python language.<br />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.
</p>
<p class='vspace'>FrePPLe then reads from and writes into this Django database.
</p>
<p class='vspace'>The sub directory <em>contrib/django</em> provides a reference Django model for frePPLe.<br />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.
<br clear='all' />
</p>
<div class='vspace'></div><h2>FrePPLe as a web service</h2>
<div><span class='rfloat'><img src='../uploads/Frepple/appserver.png' alt='' title='' /></span></div>
<p>FrePPLe comes with extension modules that implement a SOAP or REST web service.<br />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.<br />Users can also directly access also the information from e.g. Excel (using the Office Web Service Toolkit).
<br clear='all' />
</p>
</div>

<!--PageFooterFmt-->
<!--HTMLFooter-->
</div></div>
</body>
</html>