blob: f0bd7c8a650ed534c4bdbbf4384656aed1f7a3f1 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/getting-started.xml at 10 Sep 2025
| Rendered using Apache Maven Fluido Skin 2.1.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" />
<title>Turbine Getting Started – Apache Turbine</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-2.1.0.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script src="./js/apache-maven-fluido-2.1.0.min.js"></script>
<link rel="icon" type="image/png" sizes="48x48" href="https://apache.org/favicons/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style>.github-fork-ribbon:before { background-color: orange; }</style>
</head>
<body>
<a class="github-fork-ribbon right-top" href="https://github.com/apache/turbine-build" data-ribbon="Fork me on GitHub">Fork me on GitHub</a>
<div class="container-fluid container-fluid-top">
<header>
<div id="banner">
<div class="pull-left"><div id="bannerLeft"><h1><a href="https://turbine.apache.org/"><img src="https://www.apache.org/img/feather_glyph_notm.png" style="width: 50px;" /> The Apache Turbine project</a></h1></div></div>
<div class="pull-right"><div id="bannerRight"><h1><a href="https://turbine.apache.org/"><img src="https://turbine.apache.org/images/logo.gif" alt="Apache Turbine" /></a></h1></div></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 01 Apr 2025<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 7.1-SNAPSHOT</li>
<li class="pull-right"><span class="divider">|</span>
<a href="https://turbine.apache.org/fulcrum/">Fulcrum</a></li>
<li class="pull-right"><span class="divider">|</span>
<a href="https://turbine.apache.org/">Turbine</a></li>
<li class="pull-right"><a href="https://www.apache.org">Apache</a></li>
</ul>
</div>
</header>
<div class="row-fluid">
<header id="leftColumn" class="span2">
<nav class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">General Information</li>
<li><a href="index.html">Overview</a></li>
<li><a href="features.html">Features</a></li>
<li><a href="fsd.html">Specification</a></li>
<li class="active"><a>Getting Started</a></li>
<li><a href="how-to-build.html">Howto Build Turbine</a></li>
<li><a href="changes-report.html">Changes</a></li>
<li class="nav-header">Documentation</li>
<li><a href="services/index.html"><span class="icon-chevron-right"></span>Services</a></li>
<li><a href="howto/index.html"><span class="icon-chevron-right"></span>Howtos</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/TURBINE">Wiki</a></li>
<li><a href="apidocs/index.html">JavaDocs</a></li>
<li class="nav-header">Development</li>
<li><a href="proposals.html">Proposals</a></li>
<li><a href="how-to-help.html">How To Help</a></li>
<li><a href="todo.html">Todo</a></li>
<li class="nav-header">Project Documentation</li>
<li><a href="project-info.html"><span class="icon-chevron-right"></span>Project Information</a></li>
<li><a href="project-reports.html"><span class="icon-chevron-right"></span>Project Reports</a></li>
<li class="nav-header">Apache</li>
<li><a href="https://www.apache.org/">Apache Website</a></li>
<li><a href="https://www.apache.org/licenses/">License</a></li>
<li><a href="https://www.apache.org/foundation/how-it-works.html">How the ASF works</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li><a href="https://www.apache.org/security/">Security</a></li>
</ul>
</nav>
<div class="well sidebar-nav">
<form id="search-form" action="https://www.google.com/search" method="get" >
<input value="http://turbine.apache.org/turbine/turbine-7-0" name="sitesearch" type="hidden" />
<input class="search-query" name="q" id="query" type="text" placeholder="Search with Google..." />
</form>
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<a href="https://maven.apache.org/" class="builtBy" target="_blank"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
</div>
</div>
</header>
<main id="bodyColumn" class="span10">
<section><a id="Getting_Started"></a>
<h1>Getting Started</h1>
<p>
The purpose of this document is to define simple documentation on
getting started with Turbine. For information about the overall
structure of Turbine, please refer to the <a href="fsd.html">Functional
Specification Document (FSD)</a> as well as the other documentation that
is available.
</p>
</section>
<section><a id="Code_Organization"></a>
<h1>Code Organization</h1>
<p>
Turbine can be used in two different ways depending on what you need.
You can choose to only use one way or choose to use both. It is up
to you.
</p>
<ul>
<li>As a servlet framework with Turbine as the controller.</li>
<li>As a framework of useful code in your application.</li>
</ul>
<p>
In all cases, it means that you simply link against the API and code
provided in the turbine.jar file. All you need to do is tell Turbine where its
configuration file is, add turbine.jar to your classpath and then add
the appropriate Turbine Java code into your application.
</p>
<p>
Turbine is now a fairly large codebase. This can be daunting to people
who are just starting out with Turbine. However, the code is fairly well
organized and as you learn about each part of the code, the entire
architecture starts to make sense and is really quite easy to master.
All of our code is well javadoc'd so we encourage you to review not only
the actual source code, but also the documentation. :-) The different
parts of Turbine are:
</p>
<ul>
<li>
org.apache.turbine.modules - This is where the code for the Modules
system is stored. The different Modules are described in more detail in
the <a href="fsd.html">funtional specification document</a>.
</li>
<li>
org.apache.turbine.om - OM stands for Object Model. This is where the
code that represents Turbine's Security Object Model lives.
</li>
<li>
org.apache.turbine.services - This is where the Services Framework
lives. The Services framework is a core aspect of Turbine. Essentially
it is a framework for creating Singleton objects which may also have an
init() and destroy() lifecycle. There are Services for many different
things.
</li>
<li>
org.apache.turbine.util - The Util package is just that. A package of
utility code that is used within Turbine. There is code that will allow
you to easily send template based email using Velocity as
well as many other commonly used web application tools.
</li>
</ul>
</section>
<section><a id="Standalone_Usage"></a>
<h1>Standalone Usage</h1>
<p>
Turbine can be easily used on its own. In order to do so, all you need
to do is something like this before you attempt to make a call to Turbine
based code:
</p>
<pre class="prettyprint"><code>
TurbineConfig tc = new TurbineConfig(&quot;/path&quot;,&quot;TurbineResources.properties&quot;);
tc.init();
</code></pre>
<p>
What that does is it tells Turbine the path to its configuration file
based on the relative path from &quot;/path&quot; (insert your own path). This is
held as a static in memory and therefore you only need to do it once.
You do not even have to worry about hanging on to the TurbineConfig
object. For more information, please see the javadoc for the
TurbineConfig object.
</p>
</section>
<section><a id="Further_Questions_and_Comments"></a>
<h1>Further Questions and Comments</h1>
<p>
If you have further questions or comments, please send them to the <a href="mail-lists.html">Turbine Mailing lists</a>.
</p>
</section>
</main>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>© 2000–2025
<a href="https://www.apache.org/">The Apache Software Foundation</a>
</p>
</div>
</div>
</footer>
</body>
</html>