You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by donf yang <do...@gmail.com> on 2009/05/12 09:17:25 UTC

Something about ExtensionPoint and Extension of Tapestry

Hi,

Components is the greatest advantage of tapestry, especially in osgi
environment.

I just noticed that ExtensionPoint and Extension appeared in tapestry
package, it's great idea for tapestry, will take tapestry to a dynamic
service world, and it was what i'm thinking on Tapestry-OSGi.

I was just disturbed by Binding Service while programing with Tapestry-OSGi,
now what i'm doing is just find a entrance to provide a dynamic service
hood, it would be allows component bundles register a ExtensionPoint and
Extension to tapestry service hood dynamically.

Think that
1.  There is a Combox in login page, There are couple LoginServices in
service hood, we have a choice to decide which one is we'd like it to be
render.
2.  There is a ExtensionPoint "MenuService" in somepage, we can add a new
menu after we install a new menu component bundle dynamically(in runntime)
3.  There is a ExtensionPoint "GadgetService" in somepage, so that's will be
cool we can add some sadgets(from component bundles) in our page
dynamically.
4.  There is a Service management page lists all extensions, we can
do enable/disable on them.
............

This will be a good expansibility on tapestry, and I'm just doing some funny
things, package Ext js to a component bundle, and building ext.Form,
ext.TextField and something like that. the following codes generates a
ext.forpanel with 2 fields as what ext form example shows.

<t:ext.Body>
 <t:ext.FormPanel t:id="addUserForm" labelWidth="75"
title="'${message:formtitle}'" bodyStyle="'padding:5px 5px 0'"
  defaults="{width: 230}" frame="true" width="350">
  <t:ext.TextField t:id="username" t:label="${message:username}"
t:allowBlank="false"></t:ext.TextField>
  <t:ext.TextField t:id="password"
t:label="${message:password}"></t:ext.TextField>
  <t:ext.Button t:id="login" t:text="${message:login}" />
 </t:ext.FormPanel>
</t:ext.Body>

The purpose of the new form component is to provide the first
ExtensionPoint(Form) of tapestry-osgi to allows components bundles register
some Extensions(Form) into tapestry-osgi's service hood, then clients would
have a choice to decide which form to be render (The form of Ext js or the
form of tapestry)

-- 

Regards,

Donf Yang
------------------------------------------------------------------------------
To be surprised,to wonder,is to begin to understand.