forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r476491 - in /forrest/trunk/whiteboard/forrest2/src/docs/faq: ./ forrest1-vs-forrest2.html
Date Sat, 18 Nov 2006 11:45:24 GMT
Author: rgardler
Date: Sat Nov 18 03:45:24 2006
New Revision: 476491

Start of a FAQ to help those familiar with Forrest 1 to get to grips with Forrest 2


Added: forrest/trunk/whiteboard/forrest2/src/docs/faq/forrest1-vs-forrest2.html
--- forrest/trunk/whiteboard/forrest2/src/docs/faq/forrest1-vs-forrest2.html (added)
+++ forrest/trunk/whiteboard/forrest2/src/docs/faq/forrest1-vs-forrest2.html Sat Nov 18 03:45:24
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  See the License for the specific language governing permissions and
+  limitations under the License.
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Forrest 1 Vs Forrest 2</title>
+  <p>This document attempts to answer the common questins
+  asked by people familiar with Forrest 1 and trying to
+  understand Forrest 2.</p>
+  <h1>Where are the *.xmap files?</h1>
+  <p>There aren't any.</p>
+  <p>Forrest 2 does not use Cocoon as its underlying
+  framework and so we have been able to do away with
+  our sitemaps.</p>
+  <h1>So where is the processing pipeline define?</h1>
+  <p>In Forrest 1 the processing pipeline was defined in
+  the cocoon sitemap files. The sitemap language is very
+  powerful, but it is also very confusing for newcomers.
+  Forrest 2 recognises that since Forrest is an XML
+  publishing framework all it needs to do is read an input
+  (or set of inputs), convert them to the Forrest internal
+  format and then process them using relevant output 
+  documents. To do this we do not need the complexities of
+  the sitemap.</p>
+  <p>The processing pipeline of Forrest 2 is defined in
+  forrestContext.xml. Briefly:</p>
+  <p>All pipelines are, essentially, a Reader -> an Input 
+  Plugin -> an Output Plugin. This is anologous to Generator
+  -> Transformaer -> Serliazer in Cocoon sitemaps.</p>
+  <p>The reader provides the source document, the input 
+  plugin converts it into a document Forrest can work with
+  internally, and the output Plugin produces the required
+  output document.</p>
+  <p>A client makes a query, such as "".
+  This is mapped to a source document URI using the locationmap
+  (this process is almost identical to that in Forrest 1).
+  This URI will look something like "file:foo/bar.xml" or
+  "".</p>
+  <p>Once we have this source URI we can select a reader to 
+  retrieve the document. Readers are selected based on the 
+  protocol in the source URI. The protocol corresponds to 
+  the bean id in forrestContext.xml.</p>
+  <p>So a source of "file://foo/bar.xml" will use the reader 
+  identified by &lt;bean id="file"...&gt; in forrestcontext.xml. 
+  Similarly, "" will use the
+  reader identified by &lt;bean id="http"...&gt;.</p>
+  <p>The reader produces a document encapsulated in a class 
+  that exposes a getType() method. The return value of this
+  method is used to select the input plugin to use. Again 
+  selected on the bean id in forrestContext.xml</p>
+  <p>Now we have the input plugin we need to get the output
+  plugin. This is selected slightly differently, because 
+  each output plugin may be used for many request URI's. For
+  example, both "html" and "htm" extensions may indicate
+  that an HTML document is required.</p>
+  <p>In order to select the output plugin each plugin bean
+  defines a "pattern property. This property is a Regular 
+  Expresion that is used to match against the original client
+  request URI. The first output plugin that is discovered is
+  the one that is used.</p>
\ No newline at end of file

View raw message