I've been thinking of the C++ Mojo bindings as the foundation of one
particular C++ based framework rather than as a canonical client
implementation. There's nothing all that special about these bindings
other than the fact that we think they are generally useful. Someone else
could quite reasonably build completely different bindings of their own.
Given the importance of IPC in Mojo, it seems reasonably clear that
applications will need to be able to communicate directly over Mojo
interfaces, even though they will likely rely on their framework to provide
an easier foundation to work with (wrappers, base classes, APIs).
So that means we're likely to see this name collision crop up fairly often
because we'll often have two different representations of a given concept
coexisting. eg. Application (mojom contract type) vs ApplicationImpl
(framework type).
I might recommend one of the following approaches:
1. Push mojom generated types into their own namespace, separate from other
framework types. eg. mojo::contracts vs mojo.
2. Deemphasize mojom generated types by applying a prefix or suffix. eg.
IApplication or ApplicationInterface. (ick)
In general, I would prefer using a "contracts" (or "interfaces") namespace
since it will help with API hygiene and prevent implementation details of
generated code from leaking into the primary API surface of the framework.
An app can always use contract types directly but developers should
generally be shown the framework types first.
Jeff.
My two cents: 1. The interface is generally the most important thing, it's undesirable to
clutter names of interfaces with additional verbiage. E.g., if |Foo| is a
mojom interface, the thing that people will deal with the most are
|FooPtr|s (or even |Foo*|s) and |FooRequest|s.
Trung wrote:My two cents: 1. The interface is generally the most important thing, it's undesirable to
clutter names of interfaces with additional verbiage. E.g., if |Foo| is a
mojom interface, the thing that people will deal with the most are
|FooPtr|s (or even |Foo*|s) and |FooRequest|s.Why? That's not the case for Application & the View Manager or the GL stuff.
Trung wrote:My two cents: 1. The interface is generally the most important thing, it's undesirable to
clutter names of interfaces with additional verbiage. E.g., if |Foo| is a
mojom interface, the thing that people will deal with the most are
|FooPtr|s (or even |Foo*|s) and |FooRequest|s.Why? That's not the case for Application & the View Manager or the GL stuff.
To unsubscribe from this group and stop receiving emails from it, send an email to mojo-dev+u...@chromium.org.
- Application is odd because it's something that the shell talks to, not other apps.
- People (here in mojo land) are unhappy with the ViewManager, because it's (perceived) as being too hard to use, especially from other languages.
- GL is special, since we don't want to provide stable mojom interfaces but instead have the system provide C entrypoints. (This is mainly so we don't have a stable interface to command buffers. E.g., in the future, we might be able to make Vulkan the first class thing, and just provide GL on top of Vulkan.)
I think language-specific helpers are useful to make things more convenient/less verbose, but I think that it's a design failure if it's actually hard (as opposed to merely tedious) to use an interface without a client library.
On Tue, Aug 11, 2015 at 2:55 PM, Viet-Trung Luu <viettr...@chromium.org> wrote:
- Application is odd because it's something that the shell talks to, not other apps.
Does that make it odd? Isn't the shell just another app?
- People (here in mojo land) are unhappy with the ViewManager, because it's (perceived) as being too hard to use, especially from other languages.
I'm curious to learn more. I'm quite willing to believe the current implementation is imperfect. I know there are some simplifications that could be achieved by flattening some of the UI services in mojo-land. We've already begun to do this downstream in the Mandoline forks. But that's service side consolidation, unrelated to the client-lib.
On Tue, Aug 11, 2015 at 3:04 PM Ben Goodger (Google) <b...@chromium.org> wrote:On Tue, Aug 11, 2015 at 2:55 PM, Viet-Trung Luu <viettr...@chromium.org> wrote:
- Application is odd because it's something that the shell talks to, not other apps.
Does that make it odd? Isn't the shell just another app?The shell is the one thing in the system that isn't an app. :)
- People (here in mojo land) are unhappy with the ViewManager, because it's (perceived) as being too hard to use, especially from other languages.
I'm curious to learn more. I'm quite willing to believe the current implementation is imperfect. I know there are some simplifications that could be achieved by flattening some of the UI services in mojo-land. We've already begun to do this downstream in the Mandoline forks. But that's service side consolidation, unrelated to the client-lib.The client lib makes it difficult to interact with the view_manager from other languages. That makes it difficult to embed child views in Sky apps, for example, because they're written in Dart. We could write client libraries for all the various languages we support, but it seems better to redesign how apps visually embed each other in order to remove the need for a client library at all.
On Tue, Aug 11, 2015 at 3:52 PM, Adam Barth <aba...@chromium.org> wrote:On Tue, Aug 11, 2015 at 3:04 PM Ben Goodger (Google) <b...@chromium.org> wrote:On Tue, Aug 11, 2015 at 2:55 PM, Viet-Trung Luu <viettr...@chromium.org> wrote:
- Application is odd because it's something that the shell talks to, not other apps.
Does that make it odd? Isn't the shell just another app?The shell is the one thing in the system that isn't an app. :)In practice it isn't, but are the connections between it and applications any different than those between applications?
- People (here in mojo land) are unhappy with the ViewManager, because it's (perceived) as being too hard to use, especially from other languages.
I'm curious to learn more. I'm quite willing to believe the current implementation is imperfect. I know there are some simplifications that could be achieved by flattening some of the UI services in mojo-land. We've already begun to do this downstream in the Mandoline forks. But that's service side consolidation, unrelated to the client-lib.The client lib makes it difficult to interact with the view_manager from other languages. That makes it difficult to embed child views in Sky apps, for example, because they're written in Dart. We could write client libraries for all the various languages we support, but it seems better to redesign how apps visually embed each other in order to remove the need for a client library at all.Do you have a particular design in mind?
The View Manager was designed so that there would be a single FIFO between the view manager and an embedded application so that there could be some guarantee around ordering of messages. This led to a monolithic interface quite different to the type of API typical in UI frameworks. It's certainly possible to program against ViewManagerService directly, you just end up having to carry around some view specific state/bookkeeping to make it manageable. The client lib emerged to unify some of this.
The client lib makes it difficult to interact with the view_manager from other languages. That makes it difficult to embed child views in Sky apps, for example, because they're written in Dart. We could write client libraries for all the various languages we support, but it seems better to redesign how apps visually embed each other in order to remove the need for a client library at all.Do you have a particular design in mind?Some folks were going to experiment with different approaches. One approach that I'd like to try is to remove notions of position and extent from the view manager and just have view manager understand hierarchy. The position and extent of child views would be handled via Surfaces, which might also then be involved in hit testing. That would also solve the problem that the view manager doesn't understand rotations and other matrix transformations.
The View Manager was designed so that there would be a single FIFO between the view manager and an embedded application so that there could be some guarantee around ordering of messages. This led to a monolithic interface quite different to the type of API typical in UI frameworks. It's certainly possible to program against ViewManagerService directly, you just end up having to carry around some view specific state/bookkeeping to make it manageable. The client lib emerged to unify some of this.The reality is that the view manager is basically abandoned code. The folks who worked on it left the project to work on other things. In the intervening time, we've iterated on other parts of the system to align them with our goals. It's possible that if we had someone that was enthusiastic about the current view manager design that they could iterate on it to make it do what we want it to do, but instead the current plan is to get a new set of people interested in composability and to have them design and build something (potentially new) that does what we need.