On 8/8/16, 7:39 AM, "Harbs" <[email protected]> wrote:
>Yeah. But it’s only a tiny bit of extra code. It is "tiny" in the handling of that extra property, but it brings in Blob and breaks type-checking on the source property. If your app does: image.source = someXML.@url when will the toString() get called? The point of PAYG, is that you only pay for what you use. The bleeding-in of "just-in-case" code is why UIComponent is 13,000 lines long. Every "tiny bit" adds up. That said, we don't have to actually agree. That is why FlexJS is being designed to support multiple component sets and composition via beads with models and views. There is no reason you can't create a heavier version of Image that has the implementation you want. I just want to make sure we keep around the simple versions for those who want really small and simple. I expect that there will be a "medium weight" component set that bakes a lot of things in. Basic will be the lightweight set, and the MX/Spark port will be the heavyweight, and the middleweight set might be the most popular starting point because it produces a decent-sized application without the app developer having to added so many beads to strands. It might have the prompt beads already baked into TextInput, etc. But a lesson I think I learned from the past is that you want to own the lowest layer, otherwise you fracture energy in the community. By Flex being relatively heavy, lots of folks created other lighter Flex-like frameworks forcing developers to choose between frameworks instead of choose between components. Given the number of active committers right now, I don't want to create a base layer that leaves folks wanting to "go lower/lighter". Aggregation/composition is a theme of FlexJS and it is easier to build up to heavier things and re-use code from the lighter pieces. So, go make a ImageModelWithBlob, and ImageViewWithBlob. I'm not disagreeing that there shouldn't be such a thing. But ImageModel and ImageView should not bring in Blob. Folks can use CSS to swap out the default model and view underneath Image, and/or we could provide a ImageWithBlob, or create a ImageWithSourceOrBlob, or start on the middle-weight component set. But I think we want to avoid tempting folks to undercut us. In an earlier email on a different topic, you were worried about 1.5K download. A "tiny bit" of code here and there adds up to 1.5K quickly. Let's make it optional. My 2 cents, -Alex
