You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/12/06 21:42:44 UTC
svn commit: r483216 - in /lenya/docu/src/documentation/content/xdocs:
docs/1_4/bestpractises.xml site.xml
Author: andreas
Date: Wed Dec 6 12:42:41 2006
New Revision: 483216
URL: http://svn.apache.org/viewvc?view=rev&rev=483216
Log:
Added best practises docs for 1.4
Added:
lenya/docu/src/documentation/content/xdocs/docs/1_4/bestpractises.xml
Modified:
lenya/docu/src/documentation/content/xdocs/site.xml
Added: lenya/docu/src/documentation/content/xdocs/docs/1_4/bestpractises.xml
URL: http://svn.apache.org/viewvc/lenya/docu/src/documentation/content/xdocs/docs/1_4/bestpractises.xml?view=auto&rev=483216
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/docs/1_4/bestpractises.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/docs/1_4/bestpractises.xml Wed Dec 6 12:42:41 2006
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- $Id: index.xml 55543 2004-10-26 00:14:59Z gregor $ -->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>Best Practises when Developing with Lenya 1.4</title>
+ </header>
+ <body>
+ <section>
+ <title>Speeding Up Development</title>
+ <p>
+ Following these tips can increase your development productivity:
+ </p>
+ <ul>
+ <li>
+ Set up your development environment correctly. The time you invest in this will
+ pay off very quickly.
+ </li>
+ <li>
+ Practise <a href="http://en.wikipedia.org/wiki/Test_driven_development">test-driven
+ development</a>. Since you can execute the tests with a single click in Eclipse,
+ you don't need to build and restart the application to check if something works.
+ </li>
+ <li>
+ During development, set <code>modules.copy=false</code> in <code>local.build.properties</code>.
+ This way, you don't have to execute the build process when you change something in a module
+ (except Java files and patches for <code>cocoon.xconf</code>).
+ </li>
+ <li>
+ Put all your non-Java files - XSLTs, CSS files, JX templates and complex sitemaps - in modules.
+ This allows you to change them without rebuilding (see preceding tip).
+ Using modules for anything which is not specific for a publication is a
+ good practise anyway - it encourages generic design and reuse.
+ </li>
+ </ul>
+ </section>
+ <section>
+ <title>Building Maintainable Applications</title>
+ <p>
+ To ensure the simplicity and maintainability of your Lenya-based applications,
+ try the following tips:
+ </p>
+ <ul>
+ <li>
+ Use resource types sparingly. A new resource type adds complexity to your
+ application. It requires to patch <code>cocoon.xconf</code> and is therefore
+ a static element of your application. Most differences between pages can be
+ implemented by using different XSLTs or templates in the presentation layer,
+ or even using distinct samples to provide a starting point for a certain type of
+ page.
+ </li>
+ <li>
+ Make extensive use of resource type formats. This way, you create orthogonality -
+ if you implement a certain format in each of your resource types, it is very
+ easy to include arbitrary resources in different locations. Typical examples
+ of formats are print views, teasers, summaries, icons, and RSS feeds.
+ </li>
+ <li>
+ Modularize your application. You can put each resource type in a separate
+ module. Service implementations are good module candidates as well - by
+ adding or removing them from your build path you can easily switch between
+ several implementions. A complex application is likely to feature a
+ <code>shared</code> module which contains utility XSLTs and other resources
+ which are used across multiple modules.
+ </li>
+ <li>
+ Use templates instead of XSLTs for layout purposes. This is an example of the
+ <a href="http://en.wikipedia.org/wiki/Separation_of_concerns">Separation of Concerns</a>
+ paradigm. XHTML templates can be edited without XSLT skills and without influencing
+ your presentation logic. For more information, check out the article
+ <a href="http://www.cocooncenter.org/articles/stylefree.html">Style-free Stylesheets with Cocoon</a>
+ on cocooncenter.org.
+ </li>
+ <li>
+ Keep your sitemaps simple. It is very hard to write tests for sitemaps, and complex ones
+ are difficult to read. Instead of building huge nested pipelines (e.g. for error handling),
+ it often makes sense to implement a specific selector or action to handle the
+ complicated aspects of the page flow. As soon as the functionality is implemented
+ in Java, it can be tested using unit tests and refactored using your favorite IDE.
+ </li>
+ <li>
+ Don't overload your usecase handler classes with view-specific details. The handler
+ is occupied with business logic, it shouldn't have to deal with the view as well.
+ If the JX templates become too complex, consider writing utility classes and
+ call them from the template. Modularizing JX templates is another promising approach
+ to reduce their complexity.
+ </li>
+ </ul>
+ </section>
+ </body>
+</document>
Modified: lenya/docu/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/lenya/docu/src/documentation/content/xdocs/site.xml?view=diff&rev=483216&r1=483215&r2=483216
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/site.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/site.xml Wed Dec 6 12:42:41 2006
@@ -114,6 +114,8 @@
<bxe-css href="#bxe-css"/>
</faq>
+ <bestpractises href="bestpractises.html" label="Best Practises"/>
+
<!-- <whole_docu href="../documentation-1-4.pdf" label="1.4 PDF docs (all in one)" />
<whole_docu href="../documentation-1-4.html" label="1.4 HTML docs (all in one)" />
-->
@@ -153,7 +155,43 @@
<repository href="repository/index.html" label="Repository"/>
</reference>
- <javadoc1.4 href="../../../../apidocs/1.4/index.html" label="1.4 API (Javadoc)"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/index.html" label="Core API"/>
+ <javadoc1.4overview label="Module APIs">
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/ac-impl/index.html" label="ac-impl"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/administration/index.html" label="administration"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/cache/index.html" label="cache"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/cforms/index.html" label="cforms"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/contacform/index.html" label="contactform"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/defaultusecases/index.html" label="defaultusecases"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/editors/index.html" label="editors"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/export/index.html" label="export"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/fckeditor/index.html" label="fckeditor"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/jackrabbit/index.html" label="jackrabbit"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/janitor/index.html" label="janitor"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/jcr/index.html" label="jcr"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/kupu/index.html" label="kupu"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/ldap/index.html" label="ldap"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/lenyadoc/index.html" label="lenyadoc"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/linkcheck/index.html" label="linkcheck"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/linking/index.html" label="linking"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/lucene/index.html" label="lucene"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/notification/index.html" label="notification"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/observation-impl/index.html" label="observation-impl"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/opendocument/index.html" label="opendocument"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/properties/index.html" label="properties"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/repository/index.html" label="repository"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/resource/index.html" label="resource"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/sitemanagement/index.html" label="sitemanagement"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/sitetree/index.html" label="sitetree"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/sourcerepository/index.html" label="sourcerepository"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/templating-impl/index.html" label="templating-impl"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/tinymce/index.html" label="tinymce"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/usecase/index.html" label="usecase"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/usecase-impl/index.html" label="usecase-impl"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/usecasedocument/index.html" label="usecasedocument"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/webdav/index.html" label="webdav"/>
+ <javadoc1.4 href="../../../../apidocs/1.4/modules/workflow-impl/index.html" label="workflow-impl"/>
+ </javadoc1.4overview>
</docu1.4>
<modules href="modules/" label="Modules" tab="modules">
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org