--
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Visit this group at http://groups.google.com/group/polymer-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAEKsHmCBFffT3JcB0ptESSQr7kTHkn2g54Rvj0O-da630tLxZA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAHbmOLaX_6eiyH3rWQf_mLxfpnDa_CJm7y3qgCrR999pFO7w-A%40mail.gmail.com.
There's a lot of groovy information in their Igor, thanks for the write-up.However, I think there is a communication problem wrt to the scope of the problem. When the OP says:>> the implications for interop between custom elements and other frameworks that implement bindingsThen any discussion of a particular syntax goes out the window: we can impose no such syntax at the stated interop level.
But the framework still needs a way to tell when the declaration of a binding in the markup is attempting to bind to a property, not an attribute. Right now Polymer has it's own way of doing this that other frameworks will have to reverse engineer to be compatible with. I haven't looked at the x-tags interop, but my guess is that the bindings are only to string-valued attributes, not to arbitrarily valued properties.
On Sat, Jun 29, 2013 at 10:47 AM, Scott Miles <sjm...@google.com> wrote:
There's a lot of groovy information in their Igor, thanks for the write-up.However, I think there is a communication problem wrt to the scope of the problem. When the OP says:>> the implications for interop between custom elements and other frameworks that implement bindingsThen any discussion of a particular syntax goes out the window: we can impose no such syntax at the stated interop level.Yep, there's a communication problem :) I'm not talking about standardizing the syntax, far from it. Just recognizing that different frameworks out there implement bindings and currently allow binding data to HTML attributes with some framework-specific way of binding to properties or property/event pairs. The syntax will be defined by the framework, and the component, if it's acting like a standard element should hopefully not have to be especially aware that it's being bound. But the framework still needs a way to tell when the declaration of a binding in the markup is attempting to bind to a property, not an attribute.
Right now Polymer has it's own way of doing this that other frameworks will have to reverse engineer to be compatible with.
But the framework still needs a way to tell when the declaration of a binding in the markup is attempting to bind to a property, not an attribute. Right now Polymer has it's own way of doing this that other frameworks will have to reverse engineer to be compatible with. I haven't looked at the x-tags interop, but my guess is that the bindings are only to string-valued attributes, not to arbitrarily valued properties.This is precisely the line of thinking I'm trying to ward off. There is no concept of bindings at the element layer.
Polymer does not leak any semantic around using attributes to bind to properties. There is no such concept and nothing to reverse engineer.
This is exactly the thing I'm having a hard time making clear.
If some element has an Array valued `items` property, that's a *property*. Polymer defines a mechanism for declaring property mappings via attributes, but that mechanism only makes sense in Polymer. It may look like the element itself has some magic attribute that does binding, but this is not the case.If you want to access `items` property using any other framework or mechanism, that's great, go for it. There is nothing special about the element as an instance.
> except that Angular has no way of knowing that table-data-provider is not an attribute, but a property
As you described it, the object has a property tableDataProvider. There is no concept of 'table-data-provider' as an attribute, you made that up.
Yes, the user of element X must know what the properties of that object are, but if your framework is going to allow using attributes as a command to bind data to properties, the framework must provide a syntax for that. The underlying element X has nothing to say about it.
In other words, for any particular element (e.g. input), you must know that you cannot access `value` as an attribute, but only as a property.>> standardizing via convention the attribute nameThis implies the attribute names are somehow discoverable, which they are not.
IOW, if I make the example object you described above, I will document that it has a `tableDataProvider` property, but not that it has any kind of attribute for this concept. An object-valued attribute makes no sense in the first place. There is no attribute in my docs, and nothing for me to name conventionally.
I expect you are imagining Polymer code that looks like this: '<x-foo tableDataProvider="{{provider}}">. We can discuss whether this is a good idea or not, but to Polymer this is a directive to bind `provider` (property) and `tableDataProvider` (property). Again, this construction only works inside of a Polymer template. Outside of polymer, `tableDataProvider` is just a regular attribute and you wouldn't be able to use it for anything useful and it should not be documented.
On Sat, Jun 29, 2013 at 12:11 PM, Justin Fagnani <justin...@google.com> wrote:
On Sat, Jun 29, 2013 at 10:47 AM, Scott Miles <sjm...@google.com> wrote:
There's a lot of groovy information in their Igor, thanks for the write-up.However, I think there is a communication problem wrt to the scope of the problem. When the OP says:>> the implications for interop between custom elements and other frameworks that implement bindingsThen any discussion of a particular syntax goes out the window: we can impose no such syntax at the stated interop level.Yep, there's a communication problem :) I'm not talking about standardizing the syntax, far from it. Just recognizing that different frameworks out there implement bindings and currently allow binding data to HTML attributes with some framework-specific way of binding to properties or property/event pairs. The syntax will be defined by the framework, and the component, if it's acting like a standard element should hopefully not have to be especially aware that it's being bound. But the framework still needs a way to tell when the declaration of a binding in the markup is attempting to bind to a property, not an attribute.Why does a framework need to know about this?
Framework should not care about internals of a component. If DOM Element is the api where everyone meets, then a framework should just enable the developer to interact with this DOM api.
Let's say that a polymer element exposes an attribute, property, a method and is an event target for some type of event. A framework like angular just needs to enable reaching all of these kids of apis via data-binding or otherwise.
The framework doesn't need to know about what's the type of api it's talking to. That's the developers job. Developer needs to know that this particular component exposes attribute foo, property bar, etc. The framework should just enable reaching all of these apis in the right way.
Right now Polymer has it's own way of doing this that other frameworks will have to reverse engineer to be compatible with.If we agree on all types of apis that an element exposes then there is nothing to be reverse engineered. The element just needs to be documented so that the developer knows how to use it.
Now there is a separate issue of being able to introspect the api, so that for example IDEs and RAD tools can use reflection generate a meaningful UI for interacting with an element. But I don't think that that's what we are trying to solve now.
I urge you to re-read Igor's response. There is still a fundamental misunderstanding, and I believe he framed it more clearly than I did.It seems to me your thesis is that given some element that has an `items` attribute, how does framework X know that `items` refers to a (non string-valued) property and isn't just a plain old attribute.The problem with that thesis is that there are no such problem attributes.Example: here is my nifty new <x-filigree> component. It has an 'emboss' boolean attribute and a 'polisher' property. A 'polisher' is a special object that can polish things.Notice I described no 'polisher' attribute. There is no such thing.So, how can I bind an object to 'polisher'? That depends completely on your binding framework.Polymer let's you bind to 'polisher' using attribute syntax
, and this is where the confusion sets in. This usage only works in Polymer context and doesn't make sense in any other context.Another binding framework may use some completely other way of binding to the 'polisher' property (or may simply not support doing that).
>> Can you describe how? As I see it Polymer will just attempt to set the attribute 'polisher'. I'm assuming that <x-filigee> is _not_ a Polymer component.
Yes, sorry, that is correct. It can only do that if <x-filigree> is a Polymer component.
>> I agree. I'm just worried that so far these methods don't appear to be compatible, because there are framework-specific ways of publishing the properties
There is nothing INcompatible. The notion of 'publishing' is handshaking that Polymer does with itself, it's not necessary for data binding in general.Perhaps Polymer should have a more general syntax for binding to properties, but this is a feature question for Polymer, not any interoperability problem. If your binding layer has a way to bind to a data property (e.g. `ng-model`), that will work just fine with any element (including Polymer elements).
On Sat, Jun 29, 2013 at 6:30 PM, Scott Miles <sjm...@google.com> wrote:
>> Can you describe how? As I see it Polymer will just attempt to set the attribute 'polisher'. I'm assuming that <x-filigee> is _not_ a Polymer component.
Yes, sorry, that is correct. It can only do that if <x-filigree> is a Polymer component.
>> I agree. I'm just worried that so far these methods don't appear to be compatible, because there are framework-specific ways of publishing the properties
There is nothing INcompatible. The notion of 'publishing' is handshaking that Polymer does with itself, it's not necessary for data binding in general.Perhaps Polymer should have a more general syntax for binding to properties, but this is a feature question for Polymer, not any interoperability problem.
On Sat, Jun 29, 2013 at 6:30 PM, Scott Miles <sjm...@google.com> wrote:
>> Can you describe how? As I see it Polymer will just attempt to set the attribute 'polisher'. I'm assuming that <x-filigee> is _not_ a Polymer component.
Yes, sorry, that is correct. It can only do that if <x-filigree> is a Polymer component.
>> I agree. I'm just worried that so far these methods don't appear to be compatible, because there are framework-specific ways of publishing the properties
There is nothing INcompatible. The notion of 'publishing' is handshaking that Polymer does with itself, it's not necessary for data binding in general.Perhaps Polymer should have a more general syntax for binding to properties, but this is a feature question for Polymer, not any interoperability problem. If your binding layer has a way to bind to a data property (e.g. `ng-model`), that will work just fine with any element (including Polymer elements).Right, so this is what I'm getting at. Instead of having framework-specific internal handshakes, maybe we should encourage property binding support in the syntax. Then we'll truly have interop at the property binding level. If everyone implements an internal mapping/handshake with an overloading of attribute names first, then _property_binding_ interop won't come until people try, fail and file a property binding syntax request.If that happens, then there will be two different ways to bind to a property: publish it and overload the attribute name, or use the property binding support in the binding syntax. I'd suggest just removing the overloaded attribute name as an option.I'll file an issue to track allowing property bindings on non-Polymer elements though.Thanks Scott and Igor!-Justin
<snip>
On Sat, Jun 29, 2013 at 6:41 PM, Justin Fagnani <justin...@google.com> wrote:
On Sat, Jun 29, 2013 at 6:30 PM, Scott Miles <sjm...@google.com> wrote:
>> Can you describe how? As I see it Polymer will just attempt to set the attribute 'polisher'. I'm assuming that <x-filigee> is _not_ a Polymer component.
Yes, sorry, that is correct. It can only do that if <x-filigree> is a Polymer component.
>> I agree. I'm just worried that so far these methods don't appear to be compatible, because there are framework-specific ways of publishing the properties
There is nothing INcompatible. The notion of 'publishing' is handshaking that Polymer does with itself, it's not necessary for data binding in general.Perhaps Polymer should have a more general syntax for binding to properties, but this is a feature question for Polymer, not any interoperability problem.Oh, so the reason why I though that this might be something to consider for MDV, and not just Polymer, is that every binding system will have this problem, MDV too. If MDV doesn't support binding to properties and event handlers, then it's yet another indication (in addition to it's lack of expressions, filters, etc.) that the default MDV syntax isn't very useful. I suppose this can wait till the various frameworks have experiments with their own syntaxes.
If your binding layer has a way to bind to a data property (e.g. `ng-model`), that will work just fine with any element (including Polymer elements).Right, so this is what I'm getting at. Instead of having framework-specific internal handshakes, maybe we should encourage property binding support in the syntax. Then we'll truly have interop at the property binding level. If everyone implements an internal mapping/handshake with an overloading of attribute names first, then _property_binding_ interop won't come until people try, fail and file a property binding syntax request.If that happens, then there will be two different ways to bind to a property: publish it and overload the attribute name, or use the property binding support in the binding syntax. I'd suggest just removing the overloaded attribute name as an option.I'll file an issue to track allowing property bindings on non-Polymer elements though.Thanks Scott and Igor!-Justin
<snip>
>> Right, so this is what I'm getting at. Instead of having framework-specific internal handshakes, maybe we should encourage property binding support in the syntax.It's INTERNAL. It has no effect or usefulness at any other level. It has to do only with how we implemented our own binding.When you say "in the syntax" what syntax do you mean?
>> If everyone implements an internal mapping/handshake with an overloading of attribute names first,
What? I'm sorry, but this doesn't make any sense. You keep insisting there is some kind of interop problem, I'm saying there is not.
--
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Visit this group at http://groups.google.com/group/polymer-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAEKsHmAC6VyrAoSKMpBAkZLMoiktAzE4nNZ5%3DALpD0ENLpcOzQ%40mail.gmail.com.
--
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Visit this group at http://groups.google.com/group/polymer-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAGGHi2u4p-0YNEJ6E6-AAL2Tc%3DC0MyS6sc34665DHzhZ4iivkg%40mail.gmail.com.
When Polymer consumes an <input> (very much standard element) How exactly do you get Polymer to bind to value property bidirectionally rather than value attribute unidirectional?
I'll let Scott respond to the implementation question, but is it relevant? How Polymer handles this binding internal to Polymer doesn't seem related to whether something should be introduced to the web platform to handle this situation across elements external to a framework. .
It's hard to debate solutions to a problem Scott and I are saying doesn't exist - I think this is the root of the confusion and I'm not sure we're managing to resolve it over email...
Apologies if jumping in here I have something incorrect.It seems to me what is being misunderstood here is Scott's point earlier that "the framework is DOM." Most of the misunderstanding seems to me to be related to some *other*, non-DOM framework needing information about interop. I can understand why this is a little strange to the world of Angular.
>> When we say "the framework is the DOM" do we mean:Polymer requires Custom Elements to be (as if) part of DOM. Everything else that Polymer does is encapsulated inside Polymer elements.Polymer requires nothing else from DOM, but also doesn't prevent anything else from being DOM.Adding data binding into DOM is a great discussion. Let's have that discussion (in a new thread please =P).
But any claims that Custom Elements do not interoperate somehow, or that Polymer elements are distinguishable from any other Custom Elements, will cause me to chime in and call FUD.I don't want users to think that x-tags cannot play with polymer-elements, or that either cannot work with Angular, Ember, or whatever your tool of choice is. This universality of these elements is a core part of the design.
Yes, sorry, that is correct. It can only do that if <x-filigree> is a Polymer component.
On Mon, Jul 1, 2013 at 12:58 PM, Scott Miles <sjm...@google.com> wrote:
>> When we say "the framework is the DOM" do we mean:Polymer requires Custom Elements to be (as if) part of DOM. Everything else that Polymer does is encapsulated inside Polymer elements.Polymer requires nothing else from DOM, but also doesn't prevent anything else from being DOM.Adding data binding into DOM is a great discussion. Let's have that discussion (in a new thread please =P).
But any claims that Custom Elements do not interoperate somehow, or that Polymer elements are distinguishable from any other Custom Elements, will cause me to chime in and call FUD.I don't want users to think that x-tags cannot play with polymer-elements, or that either cannot work with Angular, Ember, or whatever your tool of choice is. This universality of these elements is a core part of the design.I don't understand this claim. You just agreed earlier, with the <x-filigree> example, that Polymer could not bind to a property of a non-Polymer element:
I don't understand this claim. You just agreed earlier, with the <x-filigree> example, that Polymer could not bind to a property of a non-Polymer element:
This is exactly the problem I'm trying to talk about.
--
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Visit this group at http://groups.google.com/group/polymer-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAJup4OU1h%2BZF_kjdqvTJuqfULon9b8kNhQFoa1_JAM7qccWGhg%40mail.gmail.com.