Sergiu Dumitriu wrote:
> On 10/19/2009 09:41 PM, Marius Dumitru Florea wrote:
>> Hi Sergiu,
>>
>> Sergiu Dumitriu wrote:
>>> On 10/19/2009 03:37 PM, Marius Dumitru Florea wrote:
>>>> Hi devs,
>>>>
>>>> I'd like to create a xwiki-gwt-user module in platform-web which will
>>>> contain classes from the util and widget WYSIWYG packages. This module
>>>> corresponds to the com.google.gwt.user package which contains utility
>>>> and UI-related classed. The module will have this structure:
>>>>
>>>> org.xwiki.gwt.user.client.* (classes from the current util package)
>>>> org.xwiki.gwt.user.client.widget.* (classes from the current widget 
>>>> package)
>>>>
>>>> Since I want this module to be generic (an extension of what GWT
>>>> currently provides) I'd like to exclude the following class/packages
>>>> which are XWiki specific:
>>>>
>>>> * util.Attachment
>> util.ResourceName too
>>
>>>> * widget.explorer.*
>>>> * widget.wizard.util.*
>>>> * widget.PageSelector
>>>> * widget.SpaceSelector
>>>> * widget.WikiSelector
>>>>
>>>> These can remain in the WYSIWYG source tree for the moment but I'm
>>>> considering moving them to the gwt module which is XWiki specific.
>>>>
>>>> You can see the current sources here
>>>> http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/client/
>>>>
>>>> Here's my +1. WDYT?
>>> Why "user"? It doesn't look like a user thing to me, perhaps I'm wrong.
>>> Can you explain what this code does in more details?
>> GWT has 3 main jars:
>>
>> gwt-servlet-1.7.0.jar
>> gwt-user-1.7.0.jar
>> gwt-dev-1.7.0-linux.jar
>>
>> Some of the main packages from the user jar are:
>>
>> com.google.gwt.dom
>> com.google.gwt.emul
>> com.google.gwt.user
>>
>> The dom package exposes, obviously, the JavaScript DOM API in Java code.
>> We have extended what this package offers and created the xwiki-gwt-dom
>> module.
>>
>> The user package contains utility classes like Timer, Random or
>> DeferredCommand and basic widgets (ui.* package) like CheckBox or
>> RichTextArea. We have extended what this package offers with other
>> useful utility classes like Console, ShortcutKeyManager or
>> DeferredUpdater and other widgets (widget.* package) like
>> VerticalResizePanel, improved RichTextArea, generic dialog wizard.
>>
>> In order to be consistent I proposed a xwiki-gwt-user module. I'm open
>> to your suggestions regarding the name.
>>
>> Anyway, this module will be generic (reusable in any GWT application)
>> without any XWiki specific code.
>>
>> Hope it's clear now,
>> Marius
> 
> OK, so the "user" name comes from GWT. I agree with the consistency 
> reason, but my problem is that for those that don't know GWT (like me), 
> this name is misleading, since it doesn't suggest utility classes and 
> user interface elements. OK, maybe it could suggest *user* interface a 
> little, but only if you're searching for this connection. So, should we 
> stick with the "user" name for consistency, which would make users of 
> the editor coming from the GWT world happy, but which is misleading for 
> those that aren't familiar with GWT. or should we choose something more 
> meaningful?

I'm fine with both options. Let's see what others think.

> 
> How about org.xwiki.gwt.utils and org.xwiki.gwt.widgets as two distinct 
> modules? Can this work from a dependency PoV, or are the two modules 
> tightly connected?

Right now there are only a few cross dependencies and I can fix them. 
But in general we can have:

1) a utility class used by two or more widgets (e.g. StringUtils)
2) a utility class that uses one or more widgets (e.g. TextBoxNumberFilter)

In other words, if I write a widget and I discover that I need a generic 
utility class that might be useful for other widgets too then I'm going 
to place that utility class in the utility package. On the other hand, 
if I write an application and I discover that I need a generic utility 
class that makes my life easier while working with a specific widget 
then I'm going to place that utility class also in the utility package. 
I could move it in the widgets module under that specific widget but 
then the widgets module will become widgets&widgetUtilities and I'm 
going to ask myself why I have these two separate modules.

If we agree to fix 2) by moving those utility classes in the widgets 
module then I'm fine with having two modules: utils and widgets. 
Otherwise I'm more for having a single module.

Thanks,
Marius
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to