tiles-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r529289 - in /tiles/site/src/site/apt/migration: apis.apt configuration.apt extension.apt index.apt tags.apt
Date Mon, 16 Apr 2007 15:30:31 GMT
Author: apetrelli
Date: Mon Apr 16 08:30:29 2007
New Revision: 529289

URL: http://svn.apache.org/viewvc?view=rev&rev=529289
Log:
TILESSHARED-4
Added extensions and API migration pages. Improved navigation.

Added:
    tiles/site/src/site/apt/migration/apis.apt   (with props)
Modified:
    tiles/site/src/site/apt/migration/configuration.apt
    tiles/site/src/site/apt/migration/extension.apt
    tiles/site/src/site/apt/migration/index.apt
    tiles/site/src/site/apt/migration/tags.apt

Added: tiles/site/src/site/apt/migration/apis.apt
URL: http://svn.apache.org/viewvc/tiles/site/src/site/apt/migration/apis.apt?view=auto&rev=529289
==============================================================================
--- tiles/site/src/site/apt/migration/apis.apt (added)
+++ tiles/site/src/site/apt/migration/apis.apt Mon Apr 16 08:30:29 2007
@@ -0,0 +1,61 @@
+~~ $Id$
+~~
+~~ 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
+~~
+~~ 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.
+~~
+         -----------
+         Java APIs considerations
+         -----------
+
+Introduction
+
+  In this part of the migration guide we address the differences of the APIs
+  in Struts Tiles and Tiles 2.
+
+  If you are a Tiles extension developer and you want to convert your existing
+  extension, see {{{extension.html}Tiles extensions}} migration guide.
+
+Controllers and View Preparers
+
+  In Tiles 2, the concept of a Tiles <<<Controller>>>, i.e. an object that
it is
+  invoked before rendering a definition, has been replaced with
+  <<<ViewPreparer>>>.
+
+  The classes that implement the <<<Controller>>> interface must now implement
+  the new <<<ViewPreparer>>> interface, or extend the <<<ViewPreparerSupport>>>
+  class.
+
+Tiles <<<ComponentContext>>>
+
+  The <<<ComponentContext>>>, i.e. the Tiles-specific context in which
the
+  current attribute values are stored, has been renamed to
+  <<<AttributeContext>>>.
+
+  The method <<<getAttribute>>> returns an <<Attribute>>, and
not an
+  <<Attribute Value>>, i.e. a simple object.
+
+   * Previous Migration Pages
+
+     ** {{{index.html}Introduction }}
+
+     ** {{{configuration.html}Tiles configuration files}}.
+
+     ** {{{tags.html}Tiles JSP tags}}
+
+   * Next Migration Pages
+
+     ** {{{extension.html}Tiles extensions}}.

Propchange: tiles/site/src/site/apt/migration/apis.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tiles/site/src/site/apt/migration/apis.apt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: tiles/site/src/site/apt/migration/configuration.apt
URL: http://svn.apache.org/viewvc/tiles/site/src/site/apt/migration/configuration.apt?view=diff&rev=529289&r1=529288&r2=529289
==============================================================================
--- tiles/site/src/site/apt/migration/configuration.apt (original)
+++ tiles/site/src/site/apt/migration/configuration.apt Mon Apr 16 08:30:29 2007
@@ -87,4 +87,17 @@
 
   * \[3\] <<<\<add-list-attribute\>>>> is used when it is needed
to a list
   attribute as an element of another list attribute.
- 
\ No newline at end of file
+  
+  []
+
+   * Previous Migration Pages
+
+     ** {{{index.html}Introduction }}
+
+   * Next Migration Pages
+
+     ** {{{tags.html}Tiles JSP tags}}
+
+     ** {{{apis.html}Java APIs considerations}}.
+
+     ** {{{extension.html}Tiles extensions}}.

Modified: tiles/site/src/site/apt/migration/extension.apt
URL: http://svn.apache.org/viewvc/tiles/site/src/site/apt/migration/extension.apt?view=diff&rev=529289&r1=529288&r2=529289
==============================================================================
--- tiles/site/src/site/apt/migration/extension.apt (original)
+++ tiles/site/src/site/apt/migration/extension.apt Mon Apr 16 08:30:29 2007
@@ -21,6 +21,68 @@
          Tiles extensions migration
          -----------
 
-Migration of Tiles extensions
+Introduction
 
-  TBD
\ No newline at end of file
+  Tiles extensions is the part of Tiles where a major effort in refactoring is
+  needed.
+
+  The internal part of Tiles changed completely, not only in classes names, but
+  also in their behaviour.
+
+Writing definitions factories
+
+  Usually, Struts-Tiles extension writing meant writing a
+  <<<DefinitionsFactory>>> or a <<<FactorySet>>> implementation.
Here you will
+  find how to convert your definitions factory to work correctly with Tiles 2.
+
+* Requests management
+
+  Tiles 2 is now technology-independent, that means that Tiles 2 is no longer
+  bound to a Servlet environment. That means for you that all references to
+  <<<HttpServletRequest>>> and <<<HttpServletResponse>>>
have been removed,
+  replacing them with <<<TilesRequestContext>>>
+
+* Definitions factory implementation
+
+  The most common way to implement a Definitions Factory is extending the
+  <<<UrlDefinitionsFactory>>> class, that contains code to load definitions,
+  resolve Locale-specific definitions, etc.
+
+  If you implemented <<<FactorySet>>>, here comes the bad news: it has
been
+  <<removed>>! Getting a "key" to map different definitions factory was an
+  uncommon implementation detail. But it is easily reproducable, since you can
+  take the <<<TilesRequestContext>>> and calculate your "key". This key
can be
+  used to map different <<<Definitions>>> instances, or to be given to
an
+  instance of a class extending <<<Definitions>>>. Whatever you choose,
it's
+  only a question of taste.
+
+Class and interfaces new names
+
+  The following is a conversion table between Struts-Tiles and Tiles 2 class
+  names.
+
+*---------------------------------+---------------------------------+
+| <<Struts-Tiles>>                | <<Tiles 2>>                 
   |
+*---------------------------------+---------------------------------+
+| <<<ComponentDefinition>>>       | <<<Definition>>>
               |
+*---------------------------------+---------------------------------+
+| <<<XmlDefinitionsSet>>>         | <<<Definitions>>>
              |
+*---------------------------------+---------------------------------+
+| <<<XmlAttribute>>>              | <<<Attribute>>> 
               |
+*---------------------------------+---------------------------------+
+| <<<ComponentListAttribute>>>    | <<<ListAttribute>>>
            |
+*---------------------------------+---------------------------------+
+| <<<I18nFactorySet>>>            | <<<UrlDefinitionsFactory>>>
    |
+*---------------------------------+---------------------------------+
+| <<<XmlParser>>>                 | <<<DigesterDefinitionsReader>>>
|
+*---------------------------------+---------------------------------+
+
+   * Previous Migration Pages
+
+     ** {{{index.html}Introduction }}
+
+     ** {{{configuration.html}Tiles configuration files}}.
+
+     ** {{{tags.html}Tiles JSP tags}}
+
+     ** {{{apis.html}Java APIs considerations}}.

Modified: tiles/site/src/site/apt/migration/index.apt
URL: http://svn.apache.org/viewvc/tiles/site/src/site/apt/migration/index.apt?view=diff&rev=529289&r1=529288&r2=529289
==============================================================================
--- tiles/site/src/site/apt/migration/index.apt (original)
+++ tiles/site/src/site/apt/migration/index.apt Mon Apr 16 08:30:29 2007
@@ -44,6 +44,9 @@
 
    * {{{tags.html}Tiles JSP tags}}: How to migrate Tiles JSP tags, the
    <<<\<tiles:...\>>>> tags.
+
+   * {{{apis.html}Java APIs considerations}}: Some information and warnings on
+   the different behaviour of the Tiles Java API.
    
    * {{{extension.html}Tiles extensions}}: How to migrate Tiles
    extensions, with explanation of main changes in the code structure.

Modified: tiles/site/src/site/apt/migration/tags.apt
URL: http://svn.apache.org/viewvc/tiles/site/src/site/apt/migration/tags.apt?view=diff&rev=529289&r1=529288&r2=529289
==============================================================================
--- tiles/site/src/site/apt/migration/tags.apt (original)
+++ tiles/site/src/site/apt/migration/tags.apt Mon Apr 16 08:30:29 2007
@@ -118,3 +118,15 @@
 *---------------------------------+--------------------------------------------+
 | <<<\<tiles:initComponentDefinitions\>>>> | <<<\<tiles:initContainer\>>>>
    |
 *---------------------------------+--------------------------------------------+
+
+   * Previous Migration Pages
+
+     ** {{{index.html}Introduction }}
+
+     ** {{{configuration.html}Tiles configuration files}}.
+
+   * Next Migration Pages
+
+     ** {{{apis.html}Java APIs considerations}}.
+
+     ** {{{extension.html}Tiles extensions}}.



Mime
View raw message