On 3/26/13 12:04 AM, "Om" <bigosma...@gmail.com> wrote:
>> But in thinking more about it, your transform of MXMLG or FXG to SVG is
>> essentially an optimization.
>
>
> I would characterize it more as laziness. An XSLT transform is the easiest
> way to get to our end goal, which is rendering fidelity between the two
> platforms.
The reason I say it is an optimization is that right now, we reduce MXML
down to a set of components that wrap DOM and probably someday, SVG
elements. That means that you have to run that wrapping code (which is
relatively thin, but it does exist). However, if you can reduce it further
to a set of unwrapped JS, CSS and SVG, then it will perform much faster.
>
>
>
>> The reason I say that is because, if you start
>> from SparkSkin, you have the problem that in more complex components, the
>> skin is not pure MXMLG/FXG, it is comprised of other top-level components.
>> It is only in cases where you have an uninterrupted stream of graphics that
>> you can apply this transform. I guess we could make the compiler that
>> smart, but that sounds like advanced work.
>>
>
> I dont think it needs to be an uninterrupted stream. As I showed in my
> latest prototype, the XSLT can skip over certain parts of the MXML file
> which does not interest it.
See above. By having it be uninterrupted, you can make it much smaller and
faster.
>
>
>
>>
>> One way I think about developing FlexJS is that we are trying to identify
>> the smallest, most self-contained, best practice for doing things in HTML
>> (whether it is skinning, drag-drop, effects) and then designing an
>> ActionScript equivalent for it, and then tweaking both sides to make it
>> more
>> Flex-like. At least for now, that is the most efficient way to get more
>> components up and running faster because there is less mucking around in JS
>> trying to get it to do something that was easy in Flash.
>>
>> So, I need to research more about how skinning works in HTML5, but I have
>> this vague recollection that skins in HTML5 are entirely graphics.
>
>
> I dont think so. SVG is part of the HTML5 spec now, so what we are doing
> is completely legitimate.
That's sort of what I meant. I think a skin in HTML5 doesn't have
sub-components, and is a bitmap or SVG.
>
>
>
>>
>> I also need to understand how an HTML5 button skin changes its visuals with
>> hover/down/selected/focused/emphasized. That would also educate how we set
>> up a skinning model for FlexJS.
>>
>
> Here is an example: http://demos.madeinthenorth.com/slicker-buttons/#
> Notice how they use SVG in IE9 and CSS3 for Firefox and Webkit. This also
> shows how to use CSS to control the various states.
I took a look at this post. It uses the "hover" pseudo selector as expected.
But the button did not have support for things like focused and emphasized.
>
>
>
> A restriction on skins to not have sub-components would be great IMHO. A
> new suffix would be great as well. One more modification from our current
> spark skins would be to perhaps have a HostInterface instead of a
> HostComponent in skins.
>
Actually, I don't envision any sort of HostInterface or HostComponent
contract for skins. The actual skins shouldn't really know anything about
the host. The view bead, which sets up the sub-componentry for the visuals
may bind to the component's model.
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui