15 Replies Latest reply on Oct 12, 2010 7:31 AM by robglobal

    Real benefits of Flex 4?

    robglobal

      I have read lots of articles on how to ugrade from Flex 3 to Flex 4, but I haven't seen too many testimonials on why I should upgrade my code from MX to spark components.

       

      Can anyone answer this for me?

       

      Why should I not use viewstacks anymore? Why are s:Groups better than H:Boxes? How can I minimize the number of framework files DL-ed to support my app?

       

      I can see where Flex 4 is greatly improved over Flex 3 in terms of CSS, skinning, data visualization, but as for changing the mx to spark controls I'm not really seeing much on this.

       

      Please advise, thanks.

        • 1. Re: Real benefits of Flex 4?
          Devtron Level 3

          I can tell you that s:Group sucks compared to mx:HBox because it does not keep the order of layout in design mode.

           

          If layout does not matter, use s:Group. if layout does matter, stay far far away from it.

          • 2. Re: Real benefits of Flex 4?
            NateWeb Level 1

            You actually use design mode?

            • 3. Re: Real benefits of Flex 4?
              Flex harUI Adobe Employee

              What about s:Hgroup?  That's the equivalent of mx:HBox

              • 4. Re: Real benefits of Flex 4?
                Flex harUI Adobe Employee

                Main benefits are:

                -more consistent skinning model

                -right-to-left text support

                -smooth scrolling in Lists.

                 

                There will be spark Navigators someday, just not now.  You may have to

                continue to blend in some mx components for a little while longer.

                • 5. Re: Real benefits of Flex 4?
                  Devtron Level 3

                  No, not normally. I do not use design mode much or often.

                   

                  But I know for my CSS partner, it was hell trying to use s:Group everywhere, as it really mucks up the layout.

                   

                  When you run your application and all your components are in an s:Group, it is a P.I.T.A. to get layout correct. Atleast that's been my experience.

                   

                  When you create a new MXML component, it uses s:Group as the parent container BY DEFAULT. yet, s:Group does not persist any real layout for design. I really do not see the benefit in using it at all.

                   

                  Maybe you can enlighten me, since you obviously do not use design mode in Flashbuilder 4?

                  • 6. Re: Real benefits of Flex 4?
                    NateWeb Level 1

                    Someone correct me if I'm wrong, but I would guess the main benefit of using s:Group is that it's more lightweight than some of the other containers like hgroup, bordercontainer and skinnablecontainer. I haven't looked under the hood myself, but I imagine hgroup has a lot of additional logic and events that fire so that it can automatically align your content. Likewise, bordercontainer and skinnablecontainer are bulkier due to their additional functionalities.

                     

                    More bells-and-whistles more than likely brings added overhead.

                    • 7. Re: Real benefits of Flex 4?
                      Flex harUI Adobe Employee

                      Hgroup is essentially the same as a Group with a HorizontalLayout.  Other

                      than minimal code overhead for the class, I don't see it taking up extra

                      memory per instance, and might save you that code overhead in other places

                      • 8. Re: Real benefits of Flex 4?
                        Devtron Level 3

                        ^ Yup.

                         

                         


                        HGroup:
                        -----------
                        http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/HGroup .html

                         

                        The HGroup container is an instance of the Group container that uses the HorizontalLayout class. Do not modify the layout property. instead, use the properties of the HGroup class to modify the characteristics of the HorizontalLayout class.

                         


                        s:Group:
                        -----------
                        http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Group. html

                         

                        The Group class is the base container class for visual elements. The Group container takes as children any components that implement the IUIComponent interface, and any components that implement the IGraphicElement interface. Use this container when you want to manage visual children, both visual components and graphical components.

                         

                         

                         

                        BorderContainer:
                        ------------------
                        http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Border Container.html

                         

                        The BorderContainer class defines a set of CSS styles that control the appearance of the border and background fill of the container.

                         


                        Skinnable Container:
                        ---------------------
                        http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Skinna bleContainer.html

                         

                        The SkinnableContainer class is the base class for skinnable containers that have visual content. The SkinnableContainer container takes as children any components that implement the IVisualElement interface. All Spark and Halo components implement the IVisualElement interface, as does the GraphicElement class. That means the container can use the graphics classes, such as Rect and Ellipse, as children.

                        1 person found this helpful
                        • 9. Re: Real benefits of Flex 4?
                          robglobal Level 1

                          Thanks everyone for your input. Very helpful. What I've mostly been trying figure out is why we should switch all our MXML over to Spark controls... we've been working on an app for 2 years now that has over 6 different vendor skins, so it's a pretty extensive overhaul.

                           

                          Thanks again.

                          • 10. Re: Real benefits of Flex 4?
                            tntomek

                            We ask ourselves the exact same question and in my opinion 4.5 Hero might be that magical version. Until most of the rich controls are migrated we see very little value in moving. Maybe thats why 3.x has all been abandoned, to force us to move

                            • 11. Re: Real benefits of Flex 4?
                              Daniel Pride Level 1

                              Thank you all for this discussion and the clear honesty of it.

                              I have been working in Flex 4 now since Jan 1.

                              There are an aweful lot of problems.

                               

                              Design wise, and in many other areas it is super cool,... really really supercool.

                              The time wasted tho to get the great results is a bit extreme.

                              Simple things like pulling a Date dataType from SQL through Coldfusion

                              to Flex Arrives at Flex correctly but is displayed in a dataGrid

                              Column always one day off.

                               

                              I think the worst is it doesn't always compile the copy you are working on...

                              frequently getting stuck on something and never tells you

                              when its doing this so you are working on a problem

                              and not seeing the results of your changes so you

                              have to check that all the time with a visual object change

                              as a sort of flag that you set each time....

                               

                              I am seriously thinking of going back to 3, I hear no words about a change

                              or a revision coming up or anything.

                               

                              We need bug fixes bad. Its an insanely great product, but we need bug fixes bad.

                               

                               


                              Thanks
                              Dan Pride

                              • 12. Re: Real benefits of Flex 4?
                                SiHoop Level 1

                                I frequently have the same problem-- the app simply fails to recompile. Have may others noticed this? It's extremely frustrating-- it causes a false negative leading you to think that a bug fix has failed and sends you down the wrong solution path.

                                • 13. Re: Real benefits of Flex 4?
                                  robglobal Level 1

                                  One other benefit I just read of is that all styling properties can be put into the CSS now, whereas for example width and height were considered properties before and were not recognized in the CSS.

                                   

                                  I haven't updated my CSS yet, but I can't wait to use this. Thanks.

                                  • 14. Re: Real benefits of Flex 4?
                                    Gregory Lafrance Level 6

                                    I think Alex gave a bit of an over-simplified answer as to the benefits of Flex 4.

                                     

                                    If the major benefits are the more consistent skinning model, right-to-left text support, and smooth scrolling in Lists, then because most people don't use the rtl text model (think Arabic, Hebrew, etc.), Flex 4 does not have much to offer.

                                     

                                    In reality, Flex 4 offers a better skinning model, a better states model, and a more flexible layout model. Group used properly has its place.

                                     

                                    Design mode has always had its problems, I never use it, and Flex 4 didn't seem to fix many of the complaints people had about it, though it does have some improvements.

                                     

                                    Flex in general is great, really great, and I just don't think HTML 5 will beat it, but that's another discussion.

                                    • 15. Re: Real benefits of Flex 4?
                                      robglobal Level 1

                                      Thanks Greg. I have read about the better states model, and have considered several places for me to utilize this.

                                       

                                      I don't ever use design mode either, coming from a front-end hand coding background myself I think UI coding in Flex is pretty straightforward. I also agree with you, it's been my favorite UI development tool to date, although I am eager to jump into HTML5 and jQuery.

                                       

                                      The biggest thing I want to try out with new skinning options is the FXG graphics.