[jira] Commented: (TAP5-1364) Documentation about ExtJS integration

2010-12-07 Thread Borut Bolcina (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12968625#action_12968625
 ] 

Borut Bolcina commented on TAP5-1364:
-

In Chapter 1.5.1 of the ExtJS book the author explains the content of the 
distribution. There is a folder adapter and what it does is:

Contains the ext-base.js, which is the base Ext JS library, which is used for 
an all-Ext JS
setup. It also contains necessary adapters and supported versions of Prototype, 
jQuery,
or YUI libraries if you want to use any of those as a base.

And chapter 1.5.3 talks about configuring  ExtJS with other libraries:

link rel=stylesheet type=text/css href=extjs/resources/css/ext-all.css /
script type=text/javascript 
src=extjs/adapter/prototype/prototype.js/script
script type=text/javascript 
src=extjs/adapter/prototype/scriptaculous.js?load=effects.js/script
script type=text/javascript 
src=extjs/adapter/prototype/ext-prototype-adapter-debug.js/script
script type=text/javascript src=extjs/ext-all-debug.js/script

and follows with:

As you can see, this is like the generic Ext JS setup with two additional JS 
files. The Prototype
and Scriptaculous libraries take the place of ext-base, and 
ext-prototypeadapter.
js maps the external library methods to Ext.

How can this help with T5 integration?

 Documentation about ExtJS integration
 -

 Key: TAP5-1364
 URL: https://issues.apache.org/jira/browse/TAP5-1364
 Project: Tapestry 5
  Issue Type: Improvement
  Components: documentation
Reporter: Borut Bolcina

 Maybe there should be some docs about integrating with other JS libraries at 
 the http://tapestry.apache.org/user-guide.html. Maybe the chapter Ajax  
 JavaScript should be separated. Some clear examples of how to include other 
 js libs would be very helpful.
 I saw a very short email on the user list about extjs integration issue 
 (http://tapestry.markmail.org/thread/6zz7zz7ewuzkengv), but I doubt this 
 hidden info will be found early enough for someone trying to start with T5 
 and extjs, before he/she gets in the bad mood.
 I am writing this beforehand - I haven't even tried T5  ExtJS web app yet, 
 but I am doing a field research as what troubles I might have. I just bought 
 a book ExtJS in action so there will be plenty of info from the Extjs side, 
 now I wish there would be some from the T5 side also.
 Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[CONF] Apache Tapestry Exploring the Project

2010-12-07 Thread confluence







Exploring the Project
Page edited by Bob Harner


 Changes (1)
 



...
* All non-static fields must be *private*  
As we saw when running the application, the page displays the current date and time. The {{currentTime}} property is where that value comes from; shortly well see how that value is referenced in the template, so it can be extracted from the page and output. 
 Tapestry always matches a page class to a template; neither is functional without the other.  In fact, components within a page are treated the same way (except that components do not always have templates). 
...

Full Content

Loading the Project Into EclipseTapestry TutorialImplementing the Hi-Lo Guessing Game

The layout of the project follows the sensible standards promoted by Maven:


	Java source files under src/main/java
	Web application files under src/main/webapp (including src/main/webapp/WEB-INF)
	Java test sources under src/test/java
	Non-code resources (including Tapestry component templates) under src/main/resources and src/test/resources



Let's look at what Maven has created from the  archetype, starting with the web.xml configuration file:

src/main/webapp/WEB-INF/web.xml

?xml version="1.0" encoding="UTF-8"?
!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd"
web-app
display-nametutorial1 Tapestry 5 Application/display-name
context-param
!-- The only significant configuration for Tapestry 5, this informs Tapestry
of where to look for pages, components and mixins. --
param-nametapestry.app-package/param-name
param-valuecom.example.tutorial/param-value
/context-param
filter
filter-nameapp/filter-name
filter-classorg.apache.tapestry5.TapestryFilter/filter-class
/filter
filter-mapping
filter-nameapp/filter-name
url-pattern/*/url-pattern
/filter-mapping
/web-app



This is short and sweet: you can see that the package name you provided earlier shows up as the tapestry.app-package context parameter; the TapestryFilter instance will use this information to locate the Java classes for pages and components.

Tapestry 5 operates as a servlet filter rather than as a traditional servlet. In this way, Tapestry has a chance to intercept all incoming requests, to determine which ones apply to Tapestry pages (or other resources). The net effect is that you don't have to maintain any additional configuration for Tapestry to operate, regardless of how many pages or components you add to your application.

Tapestry pages minimally consist of an ordinary Java class plus a component template file.

In the root of your web application, a page named "Index" will be used for any request that specifies no additional path after the context name.  

Index Java Class

Tapestry has very specific rules for where page classes go. Tapestry adds a sub-package, "pages", to the root application package ("com.example.tutorial"); the Java classes for pages goes there. Thus the full Java class name is com.example.tutorial.pages.Index.

src/main/java/com/example/tutorial/pages/Index.java

package org.apache.tapestry5.tutorial.pages;

import java.util.Date;

/**
 * Start page of application tutorial1.
 */
public class Index
{
  public Date getCurrentTime()
  {
return new Date();
  }
}



That's pretty darn simple: No classes to extend, no interfaces to implement, just a very pure POJO (Plain Old Java Object). You do have to meet the Tapestry framework halfway:


	You need to put the Java class in the expected package, org.apache.tapestry5.tutorial.pages
	The class must be public
	You need to make sure there's a public, no-arguments constructor (here, the Java compiler has silently provided one for us)
	All non-static fields must be private



As we saw when running the application, the page displays the current date and time. The currentTime property is where that value comes from; shortly we'll see how that value is referenced in the template, so it can be extracted from the page and output.

Tapestry always matches a page class to a template; neither is functional without the other.  In fact, components within a page are treated the same way (except that components do not always have templates).

You will often hear about the Model-View-Controller pattern (MVC).  In Tapestry, the page class acts as both the Model (the source of data) and the controller (the logic that responds to user interaction).  The template is the View in MVC.  As a model, the page exposes JavaBeans properties that can be referenced in the template.

Let's look at how the component template builds on the Java class to provide the full user interface.

Component Template

Tapestry 

[CONF] Apache Tapestry IoC

2010-12-07 Thread confluence







IoC
Page edited by Bob Harner


Comment:
Changed external links to footnote (experimental)


 Changes (13)
 



...
 {float:right} 
{info:title=Related Info} Article} 
* [IoC FAQ|Tapestry Inversion of Control Container] 
{info} {float}  
The inner construction of the Tapestry framework is based on [_inversion of control|http://www.martinfowler.com/articles/injection.html], control_{footnote}http://www.martinfowler.com/articles/injection.html{footnote} (IoC), a design approach that allows a working system to be fabricated from many small, easily testable pieces. 
 
An additional benefit of using IoC (Inversion of Control) is that, by breaking a complex system into small pieces, it becomes easier to modify and extend the system, by overriding or replacing selected parts of the system. 
 The use of IoC in Tapestry represents an evolution from Tapestry 3 to Tapestry 4 to Tapestry 5. Tapestry 3 did not use IoC, though it included some weaker mechanisms, such as extensions, that served a similar purpose. To make large scale changes to the behavior of Tapestry 3 required subclassing key classes and overriding methods.  
Tapestry 4 introduced the use of the [Apache HiveMind|http://hivemind.apache.org/] Apache HiveMind{footnote}http://hivemind.apache.org/{footnote} IoC container. In fact, the HiveMind project was created specifically for use as the IoC container for Tapestry 4. Tapestry 4 has met its goals for extensibility and configurability, largely because of HiveMinds flexibility. 
 Tapestry 5 extends on this, replacing HiveMind with a new container specifically build for Tapestry 5, designed for greater ease of use, expressiveness and performance. HiveMind itself has been subsequently shelved; T5 IoC can be considered a streamlined and improved HiveMind. And T5 IoC can be used separately from the rest of Tapestry! 
...
h2. Why Not Spring?  
[Spring|http://www.springframework.org] Spring{footnote}http://www.springframework.org{footnote} is the most successful IoC container project. The Spring project combines a very good IoC container, integrated [AspectJ|http://www.eclipse.org/aspectj/] AspectJ{footnote}http://www.eclipse.org/aspectj/{footnote} support, and a large number of libraries built on top of the container. Spring is an excellent _application_ container, but lacks a number of features necessary for a _framework_ container: 
 * Spring beans can be wired together by name (or id), but it is not possible to introduce additional naming abstractions. Tapestry 4s infrastructure: abstraction was the key to allowing easy spot overrides of internal Tapestry services without having to duplicate the large web of interrelated services (nearly 200 in Tapestry 4.0). 
...
The use of HiveMind is also related to one of the common criticisms of Tapestry 4: startup time. The time it takes to parse and organize all that XML shows up as several seconds of startup time. Creating a streamlined IoC container that is not driven by XML has alleviated those issues.  
With the advent of new technologies (in particular, [JDK 1.5 Annotations|http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html], Annotations{footnote}http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html{footnote} and runtime class generation via [Javassist|http://www.jboss.org/products/javassist]) Javassist{footnote}http://www.jboss.org/products/javassist]{footnote}) some of the precepts of HiveMind have been undermined. That is to say, in HiveMind (and Spring), all that XML is an awkward way to describe a few basic Java operations: instantiating classes and invoking methods on those classes (to inject dependencies into the instantiated instances). The central concept in Tapestry IoC is to eliminate XML and build an equivalent system around simple objects and methods. 
 Tapestry IoC also represents many simplifications of HiveMind, representing lessons learned while creating both HiveMind and Tapestry 4. HiveMind itself has wound down (it is not longer in active development), with the user base moving to Tapestry 5. 
...
h2. Why not Guice?  
[Google Guice|http://code.google.com/p/google-guice/] Google Guice{footnote}http://code.google.com/p/google-guice/{footnote} is a newcomer to the IoC landscape. Guice and T5 IoC are very close and, in fact, T5 IoC expressly borrows many great and innovative ideas from Guice. Guice abandons not only XML but even any concept of a service id ... for injection, services are matched by type and perhaps filtered based on annotations. 
 Guice is still missing some core ideas needed in T5 

[CONF] Apache Tapestry IoC cookbook - patterns

2010-12-07 Thread confluence







IoC cookbook - patterns
Page edited by Bob Harner


Comment:
Added scrollbar at top  bottom, fixed broken link


 Changes (3)
 



{scrollbar} 
h1. Using Patterns  Tapestry IoC has support for implementing several of the [Gang Of Four Design Patterns|http://en.wikipedia.org/wiki/Design_pattern_(computer_science)]. In fact, the IoC container itself is a pumped up version of the Factory pattern.  
The basis for these patterns is often the use of _service builder methods_, where a [configuration|#servconf.html] [configuration|IoC cookbook - servconf] for the service is combined with a factory to produce the service implementation on the fly. 
 {anchor:chainofcommand} 
...
 Reducing the chain to a single object vastly simplifies the code: weapos;ve _factored out_ the loop implicit in the chain of command. That eliminates a lot of code, and thatapos;s less code to test, and fewer paths through InjectWorker, which lowers its complexity further. We donapos;t have to test the cases where the list of injection providers is empty, or consists of only a single object, or where itapos;s the third object in that returns true: it looks like a single object, it acts like a single object ... but its implementation uses many objects. 
 {scrollbar} 

Full Content

IoC cookbook - overrideIoC cookbookIoC cookbook - servconf
Using Patterns

Tapestry IoC has support for implementing several of the Gang Of Four Design Patterns. In fact, the IoC container itself is a pumped up version of the Factory pattern.

The basis for these patterns is often the use of service builder methods, where a configuration for the service is combined with a factory to produce the service implementation on the fly.


Chain of Command Pattern

Main Article: Chain of Command

Lets look at another example, again from the Tapestry code base. The InjectProvider interface is used to process the @Inject annotation on the fields of a Tapestry page or component. Many different instances are combined together to form a chain of command.

The interface has only a single method (this is far from uncommon):



public interface InjectionProvider
{
  boolean provideInjection(String fieldName, Class fieldType, ObjectLocator locator,
  ClassTransformation transformation, MutableComponentModel componentModel);
}


The return type indicates whether the provider was able to do something. For example, the AssetInjectionProvider checks to see if theres an @Path annotation on the field, and if so, converts the path to an asset, works with the ClassTransformation object to implement injection, and returns true to indicate success. Returns true terminates the chain early, and that true value is ultimately returned to the caller.

In other cases, it returns false and the chain of command continues down to the next provider. If no provider is capable of handling the injection, then the value false is ultimately returned.

The InjectionProvider service is built up via contributions. These are the contributions from the TapestryModule:



public static void contributeInjectionProvider(
OrderedConfigurationlt;InjectionProvidergt; configuration,
MasterObjectProvider masterObjectProvider,
ObjectLocator locator,
SymbolSource symbolSource,
AssetSource assetSource)
{
  configuration.add(quot;Defaultquot;, new DefaultInjectionProvider(masterObjectProvider, locator));

  configuration.add(quot;ComponentResourcesquot;, new ComponentResourcesInjectionProvider());

  configuration.add(
  quot;CommonResourcesquot;,
  new CommonResourcesInjectionProvider(),
  quot;after:Defaultquot;);

  configuration.add(
  quot;Assetquot;,
  new AssetInjectionProvider(symbolSource, assetSource),
  quot;before:Defaultquot;);

  configuration.add(quot;Blockquot;, new BlockInjectionProvider(), quot;before:Defaultquot;);
  configuration.add(quot;Servicequot;, new ServiceInjectionProvider(locator), quot;after:*quot;);
}


And, of course, other contributions could be made in other modules ... if you wanted to add in your own form of injection.

The configuration is converted into a service via a service builder method:



  public InjectionProvider build(Listlt;InjectionProvidergt; configuration, ChainBuilder chainBuilder)
  {
return chainBuilder.build(InjectionProvider.class, configuration);
  }


Now, lets see how this is used. The InjectWorker class looks for fields with the InjectAnnotation, and uses the chain of command to inject the appropriate value. However, to InjectWorker, there is no chain ... just a single object that implements the InjectionProvider interface.



public class InjectWorker implements ComponentClassTransformWorker
{
  private final ObjectLocator 

[CONF] Apache Tapestry Creating The Skeleton Application

2010-12-07 Thread confluence







Creating The Skeleton Application
Page edited by Howard M. Lewis Ship


 Changes (1)
 



...
What well do is create an empty shell application using Maven, then import the application into Eclipse to do the rest of the work.  
For the tutorial, were using a fresh install of Eclipse and an empty workspace at {{/Users/Howard/Documents/workspace}}{footnote}Yes, /Users/Howard/Documents/workspace{footnote}Yes, Howard is on a Mac. Get one.{footnote}.  You may need to adjust a few things for other operating systems or local paths. 
 From our workspace directory, well use Maven to create a skeleton Tapestry project.  
...

Full Content

Dependencies, Tools and PluginsTapestry TutorialLoading the Project Into Eclipse

Using the Quickstart Archetype

Before we can get down to the fun, we have to create an empty application. Tapestry uses a feature of Maven to do this: archetypes (a too-clever way of saying "project templates").

What we'll do is create an empty shell application using Maven, then import the application into Eclipse to do the rest of the work.

For the tutorial, we're using a fresh install of Eclipse and an empty workspace at /Users/Howard/Documents/workspace




1


.  You may need to adjust a few things for other operating systems or local paths.

From our workspace directory, we'll use Maven to create a skeleton Tapestry project. 

Before proceeding, we have to decide on four things: A Maven group id and artifact id for our project, a version, and a base package name.

Maven uses the group id and artifact id to provide a unique identity for the application, and Tapestry needs to have a base package name so it knows where to look for pages and components.

For this example, we'll use the group id com.example, artifact id tutorial1, version 1.0-SNAPSHOT and we'll use com.example.tutorial as the base package.

Our final command line is:



mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org



It will then prompt you to pick the archetype - choose Tapestry 5.2.4 Quickstart Project, enter the group id, artifact id, version and package when prompted.


~/Documents/workspace
$ mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 
[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO] 
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: http://tapestry.apache.org - quickstart (Tapestry 5.2.4 Quickstart Project)
2: http://tapestry.apache.org - tapestry-archetype (Tapestry 4.1.6 Archetype)
Choose a number: : 1
Choose version: 
1: 5.1.0.5
2: 5.0.19
3: 5.2.4
Choose a number: 3: 3
Define value for property 'groupId': : com.example
Define value for property 'artifactId': : tutorial1
Define value for property 'version': 1.0-SNAPSHOT: 
Define value for property 'package': com.example: com.example.tutorial
Confirm properties configuration:
groupId: com.example
artifactId: tutorial1
version: 1.0-SNAPSHOT
package: com.example.tutorial
Y: 
[INFO] 
[INFO] BUILD SUCCESSFUL
[INFO] 
[INFO] Total time: 1 minute 41 seconds
[INFO] Finished at: Wed Nov 17 17:00:16 PST 2010
[INFO] Final Memory: 16M/81M
[INFO] 
~/Documents/workspace
$ 



The first time you use Maven, you'll see quite a bit more output, mostly about downloading all sorts of JARs and other files. These downloaded files are cached locally and will not need to be downloaded again, but you do have to be patient on first use.

After executing the command, you'll see a new directory, tutorial1.

Maven Behind a FirewallIf you are behind a firewall, before running any "mvn" commands, you will need to configure your proxy settings in settings.xml. Here is an example:

settings.xml

settings
  proxies
proxy
  activetrue/active
  protocolhttp/protocol
  hostmyProxyServer.com/host
  port8080/port
  usernamejoeuser/username
  passwordmyPassword/password
  nonProxyHosts/nonProxyHosts
/proxy
  /proxies
  localRepositoryC:/Documents and 

[CONF] Apache Tapestry Implementing the Hi-Lo Guessing Game

2010-12-07 Thread confluence







Implementing the Hi-Lo Guessing Game
Page edited by Howard M. Lewis Ship


 Changes (9)
 



...
Lets start building a basic Hi-Lo Guessing game.  
In the game, the computer selects a number between 1 and 10. You try and guess the number, clicking links. At the end, the computer tells you how many guesses you required to identify the target number. Even a simple example like this will demonstrate several important concepts in Tapestry: 
 
Well build it in small pieces, using the kind of iterative development that Tapestry makes so easy. 
* Breaking an application into individual pages * Transferring information from one page to another * Responding to user interactions * Storing client information in the server-side session 
 
Well build this little application in small pieces, using the kind of iterative development that Tapestry makes so easy.  
!hilo-flow.png!  
...
!hilo-1.png|thumbnail!  
However, clicking the link doesnt do anything yet.  
However, clicking the link doesnt do anything yet, as its just a placeholder \a\ tag, not an actual Tapestry component. Lets think about what should happen when the user clicks that link: 
 
Lets fix that.   First: what should happen when the link is clicked?  
* A random target number between 1 and 10 should be selected * The number of guesses taken should be reset to 0 * The user should be sent to the Guess page to make a guess  
Our first step is to find out when the user clicks that start guessing link.  In a typical web application framework, we might start thinking about URLs and handlers and maybe some sort of XML configuration file.  But this is Tapestry, so were going to work with components and methods on our classes. 
 First, the component.  We want to perform an action (selecting the number) before continuing on to the Guess page.  The ActionLink component is just what we need; it creates a link with a URL that will trigger an action event in our code ... but thats getting ahead of ourselves.  First up, convert the \a\ tag to an ActionLink component: 
...
{code}  
If you refresh the browser, youll see that the URL for the start guessing link is now {{/tutorial1/index.start}}}, /tutorial1/index.start, which identifies the name of the page (index) and the id of the component (start). 
 If you click the link, youll get an error: 
...

Full Content

Exploring the ProjectTapestry TutorialUsing BeanEditForm To Create User Forms

Let's start building a basic Hi-Lo Guessing game.

In the game, the computer selects a number between 1 and 10. You try and guess the number, clicking links. At the end, the computer tells you how many guesses you required to identify the target number. Even a simple example like this will demonstrate several important concepts in Tapestry:


	Breaking an application into individual pages
	Transferring information from one page to another
	Responding to user interactions
	Storing client information in the server-side session



We'll build this little application in small pieces, using the kind of iterative development that Tapestry makes so easy.



Our page flow is very simple, consisting of three pages: Index (the starting page), Guess and GameOver. The Index page introduces the application and includes a link to start guessing. The Guess page presents the user with ten links, plus feedback such as "too low" or "too high". The GameOver page tells the user how many guesses they took before finding the target number.

Index Page

Let's get to work on the Index page and template.

Index.tml

html t:type="layout" title="Hi/Lo Guess"
  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"

  p
I'm thinking of a number between one and ten ... /p

  p
a href="" class="code-quote">"#"start guessing/a
  /p

/html



Running the application gives us our start:



However, clicking the link doesn't do anything yet, as its just a placeholder \a\ tag, not an actual Tapestry component. Let's think about what should happen when the user clicks that link:


	A random target number between 1 and 10 should be selected
	The number of guesses taken should be reset to 0
	The user should be sent to the Guess page to make a guess



Our first step is to find out when the user clicks that "start guessing" link.  In a typical web application framework, we might start thinking about URLs and handlers and maybe some sort of XML configuration file.  But this is Tapestry, so we're going to work with components and methods on our classes.

First, the component.  We want to perform an action (selecting 

[CONF] Apache Tapestry IoC

2010-12-07 Thread confluence







IoC
Page edited by Bob Harner


Comment:
Removed {footnote} tags in favor of (eventually) applying a CSS style to external links


 Changes (9)
 



...
{float}  
The inner construction of the Tapestry framework is based on _[inversion of control_{footnote}http://www.martinfowler.com/articles/injection.html{footnote} control|http://www.martinfowler.com/articles/injection.html] (IoC), a design approach that allows a working system to be fabricated from many small, easily testable pieces. 
 An additional benefit of using IoC is that, by breaking a complex system into small pieces, it becomes easier to modify and extend the system, by overriding or replacing selected parts of the system. 
...
The use of IoC in Tapestry represents an evolution from Tapestry 3 to Tapestry 4 to Tapestry 5. Tapestry 3 did not use IoC, though it included some weaker mechanisms, such as extensions, that served a similar purpose. To make large scale changes to the behavior of Tapestry 3 required subclassing key classes and overriding methods.  
Tapestry 4 introduced the use of the Apache HiveMind{footnote}http://hivemind.apache.org/{footnote} [Apache HiveMind|http://hivemind.apache.org/] IoC container. In fact, the HiveMind project was created specifically for use as the IoC container for Tapestry 4. Tapestry 4 has met its goals for extensibility and configurability, largely because of HiveMinds flexibility. 
 Tapestry 5 extends on this, replacing HiveMind with a new container specifically build for Tapestry 5, designed for greater ease of use, expressiveness and performance. HiveMind itself has been subsequently shelved; T5 IoC can be considered a streamlined and improved HiveMind. And T5 IoC can be used separately from the rest of Tapestry! 
...
h2. Why Not Spring?  
Spring{footnote}http://www.springframework.org{footnote} [Spring|http://www.springframework.org] is the most successful IoC container project. The Spring project combines a very good IoC container, integrated AspectJ{footnote}http://www.eclipse.org/aspectj/{footnote} [AspectJ|http://www.eclipse.org/aspectj/] support, and a large number of libraries built on top of the container. Spring is an excellent _application_ container, but lacks a number of features necessary for a _framework_ container: 
 * Spring beans can be wired together by name (or id), but it is not possible to introduce additional naming abstractions. Tapestry 4s infrastructure: abstraction was the key to allowing easy spot overrides of internal Tapestry services without having to duplicate the large web of interrelated services (nearly 200 in Tapestry 4.0). 
...
The use of HiveMind is also related to one of the common criticisms of Tapestry 4: startup time. The time it takes to parse and organize all that XML shows up as several seconds of startup time. Creating a streamlined IoC container that is not driven by XML has alleviated those issues.  
With the advent of new technologies (in particular, JDK 1.5 Annotations{footnote}http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html{footnote} [Annotations|http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html] and runtime class generation via Javassist{footnote}http://www.jboss.org/products/javassist]{footnote}) [Javassist|http://www.jboss.org/products/javassist]) some of the precepts of HiveMind have been undermined. That is to say, in HiveMind (and Spring), all that XML is an awkward way to describe a few basic Java operations: instantiating classes and invoking methods on those classes (to inject dependencies into the instantiated instances). The central concept in Tapestry IoC is to eliminate XML and build an equivalent system around simple objects and methods. 
 Tapestry IoC also represents many simplifications of HiveMind, representing lessons learned while creating both HiveMind and Tapestry 4. HiveMind itself has wound down (it is not longer in active development), with the user base moving to Tapestry 5. 
...
h2. Why not Guice?  
Google Guice{footnote}http://code.google.com/p/google-guice/{footnote} [Google Guice|http://code.google.com/p/google-guice/] is a newcomer to the IoC landscape. Guice and T5 IoC are very close and, in fact, T5 IoC expressly borrows many great and innovative ideas from Guice. Guice abandons not only XML but even any concept of a service id ... for injection, services are matched by type and perhaps filtered based on annotations. 
 Guice is still missing some core ideas needed in T5 IoC. Theres no concept of configurations or anything similar. And there are limitations on injection based on scope (a request scoped