Do you know the Views GUI toolkit?

263 views
Skip to first unread message

Dave Schuyler

unread,
Feb 13, 2018, 5:11:32 PM2/13/18
to chromium-dev
Imagine you have a friend/co-worker that would like to learn to use the Views GUI toolkit in Chromium. 
  • What advice would you give?

  • What would you suggest they read?

  • Whom would you suggest they ask Views Noogler-type questions of?

Peter Kasting

unread,
Feb 13, 2018, 5:50:49 PM2/13/18
to Dave Schuyler, chromium-dev
First question would be "learn to use" for what purpose?  Views isn't (currently) a general-purpose toolkit in the vein of GTK, Qt, WxWidgets, etc., but a specific tool that only does what Chrome needs -- so its design and APIs are often unorthodox.  So my suggestion would generally be, if they're trying to build some particular kind of UI, to study the implementation of a similar piece of UI.  This should often be easy because most Chromies should be building similar UI to stuff that already exists, and the folks doing very one-off stuff are likely working on things like tabstrip and window frame and should be on the core team that does that stuff :)

There isn't any particular set of stuff I know to read, but for questions, I'd ask any of the following folks, all of whom are knowledgeable in different areas, but all of whom can answer basics and redirect as appropriate:
sky (the core ui/views/ code itself, window manager, anything thorny)
pkasting (anything in chrome/)
tapted (Mac stuff, typography, layout providers)
bsep (window frame, dialogs)
ellyjones (Mac stuff, dialogs)
kylixrd (layout managers, future direction)

PK

Claudio deSouza

unread,
Feb 14, 2018, 4:37:44 AM2/14/18
to Chromium-dev, dsch...@google.com
Views can easily outmatch most UI toolkits out there with no effort, but in this list the canned response we receive is to not use it, and to keep it low key. I understand the Chromium authors don't want to be flooded with frivolous requests/questions but it is quite hard to find a any alternative for native UI that is cross-platform and has the same quality of //ui/views.

Don't even get me started about QT.

Matt Giuca

unread,
Feb 14, 2018, 10:05:38 PM2/14/18
to claudi...@gmail.com, Chromium-dev, dsch...@google.com
I don't think we want to be in the business of maintaining open source libraries from parts of Chrome.

Reminds me of a public post I saw once from an ex-Googler who said, "You know what's the best networking library out there? //net from Chromium. I use it in all my projects by just copying it out of the Chromium tree." Seems like a very bad idea to me, since even though it's kind of a separate component from Chromium, it's still much more tightly coupled than a separate library. We'll refactor across that boundary without a second thought, and we can change any API surface as long as we're prepared to update all the users within Chromium. Then an external app using it will break, or be left behind on an old version.

On the other hand, if we were to actively promote it as a stand-alone library (maybe spin it off onto GitHub and pull it in as a dependency), then we'd be massively slowed down because we'd be stuck supporting an old API that has external clients. There's an advantage to us having our own bespoke support libraries, which is that we are neither dependent on an upstream project to make changes, nor beholden to downstream projects that depend on our surface.

On Wed, 14 Feb 2018 at 20:38 Claudio deSouza <claudi...@gmail.com> wrote:
Views can easily outmatch most UI toolkits out there with no effort, but in this list the canned response we receive is to not use it, and to keep it low key. I understand the Chromium authors don't want to be flooded with frivolous requests/questions but it is quite hard to find a any alternative for native UI that is cross-platform and has the same quality of //ui/views.

Don't even get me started about QT.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/0b9a01ad-2146-497e-baa4-ac65eebbe549%40chromium.org.

Roger Wang

unread,
Feb 15, 2018, 1:59:05 AM2/15/18
to Chromium-dev
The views toolkit doesn't have any support for the menubar. Might want to know that before using it.

Claudio deSouza

unread,
Feb 15, 2018, 4:19:41 AM2/15/18
to Chromium-dev, claudi...@gmail.com, dsch...@google.com
Hello Matt,

We have multiple products that depend on Chromium (//net, //base, //crypto, //content, etc), and in 4 years we have had no single breaking change that couldn't be amended in a couple of minutes. Besides, our projects live inside src, rather than extracting anything from there. This allows us to sync in a daily basis. So right there, more than half of your objections can be dismissed.

I understand you guys have this amazing product and would rather not be bothered by people trying to repurpose it, but the value of this code is not only the code itself. It is a fast evolving code. Besides, all the tools provided to use/build the chromium code outweigh any costs keeping up with API changes.

On a side note... I actually like the fact the code is not kept as a public library. I looked into absail and I noticed it has no stringprintf, because the code wants to be a external-library material, so it has nothing that could be tricky. I'm not a big fan to be taken by the hand each step of the way.

Cheers,

Colin Blundell

unread,
Feb 15, 2018, 4:25:53 AM2/15/18
to claudi...@gmail.com, Chromium-dev, dsch...@google.com
It's really great that you get such value out of Chromium! Obviously we don't at all mind people using the codebase externally as long as they understand the (complete lack of a) contract in doing so :). It's the latter that Matt is speaking to I believe.
 

Cheers,

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.

Dave Schuyler

unread,
Feb 15, 2018, 3:39:16 PM2/15/18
to Colin Blundell, Claudio M. DeSouza Junior, Chromium-dev
I see now that my initial question lead into a discussion of using Views outside of Chromium*. Let me ask a different question:

Imagine you have a Noogler/Googler that would like to learn to use the Views GUI toolkit in Chromium for use in Chromium
  • What advice would you give?

  • What would you suggest they read?

  • Whom would you suggest they ask Views Noogler-type questions of?



*Good discussion though :)

Scott Violet

unread,
Feb 15, 2018, 3:43:37 PM2/15/18
to dsch...@google.com, Colin Blundell, Claudio M. DeSouza Junior, Chromium-dev

Sadrul Chowdhury

unread,
Feb 15, 2018, 4:39:15 PM2/15/18
to dsch...@google.com, Colin Blundell, Claudio M. DeSouza Junior, Chromium-dev
This could also be interesting: https://www.chromium.org/developers/how-tos/inspecting-ash (works at least on Linux desktop)

Sadrul

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAOsj%2BYn-Fw18oqhTd9Xas0DEu53%2BB-8PAcoY-reoa3wARAxNMg%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages