6 Replies Latest reply on Oct 23, 2009 9:36 AM by Ely Greenfield

    FXG in Flex 4 has been neutered?  Say it isn't so...

    RickBullotta

      It seems that the capabilities of FXG from the time of the original spec to the latest documentation have been terribly and inexplicably neutered.  Can someone confirm which FXG objects and properties are or are not data bindable?  There are some indications in the documentation that "nothing" is data bindable, whereas in the original spec, in theory, almost EVERYTHING would be data bindable.

       

      I, for one, will be terribly disappointed if data binding has been removed.  It would render FXG useless for virtually anything except design-time skinning and static graphics...and would make it a virtual joke when compared to the capabilities of SVG, Silverlight, or WPF.  We were very much looking forward to using Flex/Flash as the primary UI for one aspect of an upcoming product, but this would be a complete deal killer.

       

      Also, it is not clear if FXG objects can be instantiated and created at runtime via ActionScript.  Can anyone confirm or deny whether this capability exists?

       

      Many thanks,

       

      Rick Bullotta

      CTO/Co-Founder

      Burning Sky Software

        • 1. Re: FXG in Flex 4 has been neutered?  Say it isn't so...
          Daniel Freiman Level 1

          The closest thing I could think of would be this:

           

          http://opensource.adobe.com/wiki/display/flexsdk/VerbosePathSyntax

           

          - Daniel Freiman

          • 2. Re: FXG in Flex 4 has been neutered?  Say it isn't so...
            RickBullotta Level 1

            From the Flex docs at http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WSda78ed3a750d6b8f-237979311225c0987ce-7ffe. htmlhttp://livedocs.adobe.com/flex/gumbo/html/WS145DAB0B-A958-423f-8A01-12B679BA0CC7.html:

             

            FXG does not support data binding. If you try to use the data binding short-hand syntax in an FXG document, the compiler treats it as literal String values.

             

            That's not very encouraging.  Also, there was an article from Mark Anders' blog at: http://www.andersblog.com/archives/2009/05/post.html

             

            In the end, this all contradicts from the original charter of FXG as described in Mike Chambers' blog at: http://www.mikechambers.com/blog/2008/08/29/data-binding-with-fxg-in-flex-4/

             

            Bottom line is that there isn't a clear answer on what you can and can do. 

             

            Anyone on the Flex team that can provide some insight?  Ely, you lurking out there?

             

            Thanks.

            • 3. Re: FXG in Flex 4 has been neutered?  Say it isn't so...
              CoreyRLucier Adobe Employee

              Dynamic FXG (that is FXG markup that appears in context with an MXML 

              document) does in fact support binding.

               

              Static FXG (compiled and optimized) e.g. FXG that lives in an FXG file 

              and is compiled down to Flash primitives, does not support binding, 

              nor could it ever, as it's a compile time concept.

               

              -C

              • 4. Re: FXG in Flex 4 has been neutered?  Say it isn't so...
                Ely Greenfield Level 1

                Hi Rick.   Are you asking whether FXG can be the target of a binding 

                (i.e., is runtime editable), or the source of a binding (dispatches 

                change events?).

                 

                There's probably some confusion here about the difference between FXG 

                and MXML Graphics.

                 

                FXG is a file format that is separate from MXML.  FXG is understood by 

                creative suite and Catalyst, and can be compiled by the Flex compiler 

                to a component, the same way an MXML file can.  FXG is designed to be 

                similar to MXML, to make reading FXG easy for flex developers.  FXG 

                and MXML cannot be mixed in the same file.

                 

                FXG is compiled to optimized graphics that are not runtime editable, 

                and thus can't support binding (in either direction).

                 

                MXML Graphics are a set of new classes that are usable in MXML, just 

                like other flex components. They are designed to appear in MXML just 

                like their corresponding tags in FXG.  MXML Graphics are runtime 

                editable, just like any other components in flex.

                 

                Any property on a graphics object can be the target of a binding 

                expression (i.e., can be modified at runtime).

                 

                graphics objects follow our general policy for what can be the 

                source of a binding expression (dispatches the right change 

                notifications).  If it is a property that can be modified by code 

                outside of the developer's control -- meaning network responses, user 

                operations, or properties that are derived by compations out of the 

                developers view (specifically, width/height changing due to layout 

                calculations).   If a property change generally only results from the 

                developer's code changing it, the property is not made bindable.

                 

                Does that address your concerns?  Or is there something still missing?

                 

                Ely.

                • 5. Re: FXG in Flex 4 has been neutered?  Say it isn't so...
                  RickBullotta Level 1

                  Thanks for the clarification, Ely.  As evidenced by the varying responses to my original post, I think the issue is one of terminology (FXG vs MXML graphics).  I breathed a huge sigh of relief when you indicated that MXML graphics can do what I had hoped!  As I recall, the original FXG vision was more of what is now called MXML graphics.  It made sense that in the designer/developer workflow there would be challenges, as it seems you've encountered.

                   

                  The missing link, however, is that there are no drawing tools for MXML graphics.  Any plans for an "export as MXML graphic" option in any of the CS apps?  That would be awesome.  I suppose one could make an FXG to MXML graphics converter pretty easily, if there is equivalent coverage in MXML graphics for all of the objects in FXG.  Is that a valid assumption?

                   

                  Thanks again for the info.  I think some tweaks/updates to the docs would help a ton.

                   

                  When you add in the ubiquity of the Flash player, Flex's capability/productivity, the data visualization components, FXG/MXML graphics, and the new live cycle collaboration stuff, it's a really compelling solution.

                  • 6. Re: FXG in Flex 4 has been neutered?  Say it isn't so...
                    Ely Greenfield Level 1

                    It would be very easy to convert from FXG to MXML Graphics -- that's the goal of keeping them so similar.

                     

                    At one point during development, we had the compiler compiling FXG to either static or dynamic graphics, but given how easy it is to get confused between FXG and MXML Graphics as it is, we thought it would be best to simply give them distinct roles.  Catalyst, of course, is the tool that does conversion between FXG and MXML Graphics, and can edit/generate MXML Graphics directly.  As that team well knows, creating a design tool that can understand all of the power and features of MXML is a daunting task -- not something we would expect from general design tools like Creative Suite.  On the other hand, if we hear a lot of demand for workflows where the designer can edit FXG in design tools and the developer can dynamically modify them, we can consider putting the dynamic FXG feature back into the product in a future release.

                     

                    When you add in the ubiquity of the Flash player, Flex's capability/productivity, the data visualization components, FXG/MXML graphics, and the new live cycle collaboration stuff, it's a really compelling solution.

                     

                    We certainly think so -- glad to hear you agree

                     

                    Ely.

                     

                     

                    p.s. One detail I'll mention...The current CS tools export FXG 1.0, while MXML Graphics are designed to align with FXG 2.0.  So there's a little more work to convert from FXG1 <--> MXML, but it shouldn't be a big deal.