Re: faster development with xul

"R. Dale Asberry" <[email protected]> Thu, 15 Apr 2004 06:26:36 -0500
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Installer DeLux doesn't require that each form requires a new Java class
to support it.  On the down side, it assumes certain simplifications and
conventions to make it happen.  However, depending on your app, the
approach might work.  A "shell" class wraps the xul form to provide
common functionality like window closing handling and callbacks.  A
display manager class dynamically instantiates each xul form, ties the
decorations to the forms (icons, window titles, menus), and associates
actions to each form.  Actions are created dynamically from xul files
where the most commonly used action is the "DelegatedAction" which
passes the execute() on to a custom handler.  Yes, this is an additional
layer of indirection, however, it allows the manager to reload updated
xul files at will.

On Thu, 2004-04-15 at 04:42, Vladimir Kvassov wrote:
> Hi to ALL
> 
>  I have an idea. Maybe it's not very good, but I think it can be
> usefull.
>  I have a lot of complains from our developers, that development with
> xul is quite complicated and takes too much time. You need to do at
> least three steps even for simple dialog:
>  1. create XUL form in separate file
>  2. make sure it will be loaded with xul-loader
>  3. write some java class
> 
> So, I offering to allow using "dynamic xul's", then everything will be
> in one place. For example:
> 
> class MyXulForm extends DynamicXulForm {
>   public MyXulForm {
>     super();
>   }
> 
>   //this method can be implemented in different ways
>   // - return custom (dynamic) xul form
>   // - return xul form loaded in standard way, by ID
>   protected Xul getXulFormDefinition() {
>     Xul xul = "
>       <vbox>
>          <hbox>
>             <label value="Select country "/>
>             <spacer flex="1"/>
>             <checkwidget id="currentCountry"/>
>          </hbox>
>       </vbox>
>     "
>   }
> 
>   Map getInitFields() {
>     Map map = new HashMap();
>     map.put(new Country());
>     return map;
>   }
> }



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click