On 10/28/2011 12:12 PM, Gervase Markham wrote:
> On 27/10/11 16:44, Mark Finkle wrote:
>> Here is some current information, subject to change of course.
>
> Thanks - this is very informative.
>
>>> - Is the XUL UI going to be abandoned, or are we developing the two in
>>> parallel? Arguments against abandoning it include all the same
>>> cross-platform ones against abandoning XUL on the desktop, plus also
>>> that presumably we need a XUL-based browser UI for B2G.
>>
>> # The XUL UI will live on in the Mozilla source repo. The XUL UI is used
>> for Maemo/Meego and is still actively being maintained by Mozilla[1] and
>> contributors. We plan to add the Native UI code to mozilla-central in a
>> way that does not obsolete the XUL UI code.
>
> So just to be clear: even when the native UI is shipping on Android
> phones and tablets, Mozilla plans to officially maintain the XUL UI
> alongside?
Some clarity is needed here. At that point Mozilla won't be officially
maintaining the XUL UI, but the code will be in the Mozilla source-repo.
We only need to officially maintain the XUL UI until the Java UI is
shipping on phones and tablets.
The code will be available for other maintainers to keep moving forward,
if any will exist at that point.
>>> - Do we plan to reimplement all UI natively, or just the
>>> performance-critical main window?
>>
>> # We plan on implementing all chrome UI using native widgets.
>
> Is this because it's easier than having a hybrid UI?
>
> It seems to me that the motivations for native UI apply far more
> strongly to the main window than the rest of the UI. That's the bit that
> needs to appear quickly on startup, and which deals with scrolling.
>
> If we keep the rest of the UI in XUL, we would have far fewer problems
> with the effort of maintaining two UIs, and with addons which wanted to
> support both desktop and mobile having to deal with two UIs.
Yes. A hybrid approach opens news areas of pain. Keeping the "style" of
the UIs synced is not easy, for example. We already struggle to make XUL
UIs look like native UIs anyway. Finally, the "line" where native UIs
stop and XUL UIs would start would constantly be challenged and
contested. It's a slippery slope and we feel it's better to go all the
way now.
Maintaining two systems of UI (native and XUL) is in no way simpler than
doing one or the other.
> I realise there are plans to support addons using new APIs, but why
> create new APIs if we can just keep the old ones?
By old APIs you must mean "anything goes" because we currently have very
few APIs for add-ons. XPCOM interfaces, like nsIAlertService, exist and
will still function. Much of the current APIs for UI are raw DOM or XUL
overlays or whatever JSMs might exist. Many are not considered frozen
and could change at any time. This is why efforts like Jetpack exist.
We plan to make some docs on what add-ons can and can't do in the native UI.
> Of course, it's not a free lunch, but I'd be interested to understand
> why this option was discarded.
Many of the developers on the Mobile team are big add-on fans. We plan
to make the add-on experience in the native UI pretty damn nice. Given
those goals, trying to keep parts of the XUL UI around just to support
some add-on extensibility isn't a good long term goal. We feel those
potential XUL UI parts aren't as important as extending the core chrome
UI anyway - so we must provide some extensibility mechanism for native UI.
HTH