blob: 8faf16cdfd7eb7b7745cf428aec5d52c5470405d [file] [log] [blame]
<!doctype html>
<!-- Generated by FreeMarker/Docgen from DocBook -->
<html lang="en" class="page-type-preface">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8">
<title>Preface - FreeMarker Manual</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="format-detection" content="telephone=no">
<meta property="og:site_name" content="FreeMarker Manual">
<meta property="og:title" content="Preface">
<meta property="og:locale" content="en_US">
<meta property="og:url" content="http://example.com/preface.html">
<link rel="canonical" href="http://example.com/preface.html">
<link rel="icon" href="favicon.png" type="image/png">
<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
</head>
<body itemscope itemtype="https://schema.org/Code">
<meta itemprop="url" content="http://example.com/">
<meta itemprop="name" content="FreeMarker Manual">
<!--[if lte IE 9]>
<div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
<![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner"> <img itemprop="image" src="logo.png" alt="My Logo">
</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="preface.html"><span itemprop="name">Preface</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="#test_target">Bőregér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div> <div class="main-content site-width">
<div class="content-wrapper">
<div id="table-of-contents-wrapper" class="col-left">
<script>var breadcrumb = ["FreeMarker Manual","Preface"];</script>
<script src="toc.js?1594338519184"></script>
<script src="docgen-resources/main.min.js?1594338519184"></script>
</div>
<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui.html"><span>Next</span></a></div><div class="title-wrapper">
<h1 class="content-header header-part" id="preface" itemprop="headline">Preface</h1>
</div></div><div class="page-menu">
<div class="page-menu-title">Page Contents</div>
<ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">What is FreeMarker?</a></li><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">What should I read?</a></li><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">Document conventions</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">Contact</a></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">About this document</a></li></ul> </div>
<h2 class="content-header header-section1" id="autoid_2">What is FreeMarker?</h2>
<p>FreeMarker is a <em>template engine</em>: a generic
tool to generate text output (anything from HTML to autogenerated source
code) based on templates. It&#39;s a Java package, a class library for Java
programmers. It&#39;s not an application for end-users in itself, but
something that programmers can embed into their products.</p>
<p>FreeMarker is designed to be practical for the generation of
<em>HTML Web pages</em>, particularly by servlet-based
applications following the <a href="gloss.html#gloss.MVC">MVC (Model View
Controller) pattern</a>. The idea behind using the MVC pattern for
dynamic Web pages is that you separate the designers (HTML authors) from
the programmers. Everybody works on what they are good at. Designers can
change the appearance of a page without programmers having to change or
recompile code, because the application logic (Java programs) and page
design (FreeMarker templates) are separated. Templates do not become
polluted with complex program fragments. This separation is useful even
for projects where the programmer and the HTML page author is the same
person, since it helps to keep the application clear and easily
maintainable.</p>
<p>Although FreeMarker has some programming capabilities, it is
<em>not</em> a full-blown programming language like PHP.
Instead, Java programs prepare the data to be displayed (like issue SQL
queries), and FreeMarker just generates textual pages that display the
prepared data using templates.</p>
<p class="center-img"> <img src="figures/overview.png" alt="Figure"> </p>
<p>FreeMarker is <em>not</em> a Web application
framework. It is suitable as a component in a Web application framework,
but the FreeMarker engine itself knows nothing about HTTP or servlets.
It simply generates text. As such, it is perfectly usable in non-web
application environments as well. Note, however, that we provide
out-of-the-box solutions for using FreeMarker as the view component of
Model 2 frameworks such as Struts.</p>
<p>FreeMarker is <a href="http://www.fsf.org/philosophy/free-sw.html">Free</a>,
released under a BSD-style license. It is <a href="http://www.opensource.org/">OSI Certified Open Source
Software</a>. OSI Certified is a certification mark of the Open
Source Initiative.</p>
<h2 class="content-header header-section1" id="autoid_3">What should I read?</h2>
<p>If you are a ...</p>
<ul>
<li>
<p>designer, then you should read the <a href="dgui.html">Template Author&#39;s Guide</a> and
then you can look into the <a href="ref.html">Reference</a> on an as-needed
basis for more specific details.</p>
</li>
<li>
<p>programmer, then you should read the <a href="dgui.html">Template Author&#39;s Guide</a>
guide first, then the <a href="pgui.html">Programmer&#39;s Guide</a> and then you can look
into the <a href="ref.html">Reference</a> on an as-needed basis for more
specific details.</p>
</li>
</ul>
<h2 class="content-header header-section1" id="autoid_4">Document conventions</h2>
<p>Variable names, template fragments, Java class names, etc. are
written like this: <code class="inline-code">foo</code>.</p>
<p>If something should be replaced with a concrete value then it is
written in italics, as follows: <code class="inline-code">Hello
<em class="code-color">yourName</em>!</code>.</p>
<p>Template examples are written like this:</p>
<div class="code-wrapper"><pre class="code-block code-template">something</pre></div>
<p>Data-model examples are written like this:</p>
<div class="code-wrapper"><pre class="code-block code-data-model">something</pre></div>
<p>Output examples are written like this:</p>
<div class="code-wrapper"><pre class="code-block code-output">something</pre></div>
<p>Program examples are written like this:</p>
<div class="code-wrapper"><pre class="code-block code-unspecified">something</pre></div>
<p>In chapters written for both designers and programmers fragments
addressed to programmers are written like this: <span class="marked-for-programmers">This is for programmers only.</span></p>
<p>New terms are emphasized like this: <strong>some new
term</strong></p>
<h2 class="content-header header-section1" id="autoid_5">Contact</h2>
<p>For the latest version of FreeMarker and to subscribe to the
<em>mailing lists</em> visit the FreeMarker homepage: <a href="http://freemarker.org/">http://freemarker.org</a></p>
<p class="center-img"><a name="test_target"></a> <img src="bat.jpg" alt="Figure"> </p>
<p>If you <em>need help</em> or you have
<em>suggestions</em>, use the mailing lists (mail archives
can be searched without subscription) or the Web based forums. If you
want to <em>report a bug</em>, use the Web based bug
tracker, or the mailing lists. To find all of these visit <a href="http://freemarker.org/">http://freemarker.org</a>. Also,
note that we have a <a href="app_faq.html">FAQ</a> and <a href="alphaidx.html">index</a>; use them.</p>
<h2 class="content-header header-section1" id="autoid_6">About this document</h2>
<p>If you find <em>any mistakes</em> (including
<em>grammatical mistakes</em>, <em>typos</em>,
typographical mistakes) or you find something <em>misleading or
confusing</em> in the documentation, or you have other
suggestions, please let me know! Email: ddekany at
users.sourceforge.net</p>
<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui.html"><span>Next</span></a></div></div></div></div> </div>
</div>
<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
Last generated:
<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
<p class="copyright">
© <span itemprop="copyrightYear">1999</span>–2020
<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
</div></div></div></body>
</html>