19 Replies Latest reply on May 12, 2009 2:25 AM by ropeGun

    Can FLEX handle a full-blown commerce site?

    ropeGun

      Hello Community!

       

      I am a long time Flash user and have been getting way into AS3 on the Flash side of apps and am eager to learn more about FLEX. My question is, can an _entire_ commerce site be created using FLEX? When I say "Commerce Site" I mean a site that can handle viewing a database of products (which I know that FLEX can do), placing an order and then go all the way to when the user pays for the product -- secure credit card transactions and sensitive information handling.

       

      My motivation for asking this is that I know that FLEX is good for handling/viewing databases but can all the "secure" things (like credit card transactions) also be done in the FLEX app?  Or, will I still need to redirect the user to a https:// page where all credit card transfers take place?

       

      If so, are there any good tutorials that can help show me the way?

       

      As always, any information will be most appreciated.

       

      -ropeGun

        • 1. Re: Can FLEX handle a full-blown commerce site?
          Barna Biro Level 3

          Hi there,

           

          Flex is not a server-side language so you won't be able to handle transactions or queries from Flex. For that, you'd use a server-side language like PHP, ASP.NET or maybe ColdFusion. Flex is a client-side technology just like Flash, meaning that you can create the interface in Flex and make requests to scripts ( PHP, ASP.NET scripts ) that might query a database, or make a transaction and on success, send the information back to the Flex application ( where you can parse the received data - maybe edit it, and resend it to a scrit that inserts the new data into a database, and so on ).

           

          That's the most you can do with Flex.

           

          With best regards,

          Barna Biro

          1 person found this helpful
          • 2. Re: Can FLEX handle a full-blown commerce site?
            Michael Borbor Level 4

            As Barna said you need a backend server to do most of the processing 

            but you can never understimate security, you can run a Flex app over 

            SSL in order to send data over a "secure" channel.

             

            Sincerely,

             

            Michael

             

            El 11/05/2009, a las 2:42, ropeGun <forums@adobe.com> escribió:

             

            >

            Hello Community!

            >

            I am a long time Flash user and have been getting way into AS3 on 

            the Flash side of apps and am eager to learn more about FLEX. My 

            question is, can an entire commerce site be created using FLEX? 

            When I say "Commerce Site" I mean a site that can handle viewing a 

            database of products (which I know that FLEX can do), placing an 

            order and then go all the way to when the user pays for the product 

            -- secure credit card transactions and sensitive information handling.

            >

            My motivation for asking this is that I know that FLEX is good for 

            handling/viewing databases but can all the "secure" things (like 

            credit card transactions) also be done in the FLEX app?  Or, will I 

            still need to redirect the user to a https:// page where all credit 

            card transfers take place?

            >

            If so, are there any good tutorials that can help show me the way?

            >

            As always, any information will be most appreciated.

            >

            -ropeGun

            >

            1 person found this helpful
            • 3. Re: Can FLEX handle a full-blown commerce site?
              ropeGun Level 1

              Barna Biro!

               

              Thanks for the reply. You have helped me to better understand what FLEX cannot do. But, now I am more confused as to what FLEX is and what it can do. Why should one use Flex as opposed to Flash?

               

              I am considering using Flex (because I have heard that it can handle database queries) to create an on-line store interface where the potential customer can browse the items, choose color/size/etc... and place an order all within that one interface. What I would like to avoid is having the user be re-directed to some separate webpage when it comes time to pay and confirm the order. Can all of this be done with Flex on the client-side and PHP scripting on the server-side? Or, is it better to handle all this with Java, PHP, and HTML?

               

              I am trying to decide which path I should go down while trying to learn how to build a commerce site.

               

              Any other info would be much appreciated and thanks for your input thus far.

               

              -ropeGun

              • 4. Re: Can FLEX handle a full-blown commerce site?Michael Borbor
                ropeGun Level 1

                Michael Borbor!

                 

                Thanks for your input as well.

                 

                When you say "...you can run a Flex app over SSL in order to send data over a "secure" channel." do you mean that this is not as secure as a "normal" secure website (https://somesite.com) or that it is just as secure?

                 

                You can tell that there is a pretty large gap in my web publishing knowledge. I have been creating websites that provide information and are interactive (flash apps embedded) but never have I created a site where there is server-side scripting going on. Now, I would like to build a simple commerce site and I have only my knowledge with HTML, CSS, and Flash AS3 as the tools in my toolbox. Is Flex another good "tool" to pick up to help me get to my goal?

                 

                I guess that my real question is: "Is it a smart try and use Flex (and some sort of server-side scripting language) to build a commerce site, or is there another path to take that is easier and more bombproof (secure, that is). I am considering PHP, but is there another service that works better with Flex/Flash?

                 

                Any good tutorials to get me going or help me make a decision?

                 

                Thanks,

                 

                -ropeGun

                • 5. Re: Can FLEX handle a full-blown commerce site?
                  Barna Biro Level 3

                  Hi again,

                   

                  Nopes, Flex can't query a database on it's own. Again, it's a client-side language and not a server-side language ( only server-side languages can do such things ). The reason why one should use Flex is because it's a compact and complexe framework that can boost up development time insanely. If you have some Java experience and have worked with Eclipse before then Flex Builder is a piece of cake.

                   

                  Flash is more "designer focused" and it is used to handle the more aestethycal part of things. Flex Builder is a quite good IDE for development, something that Flash is not ( not even half as good as Flex Builder ). Flex comes with tons and tons of components that you can use "out of the box" in your projects ( and even extend them or create your own components ) where if choosing Flash, you'd need to reinvent most of what Flex can already offer ( or waste hours/days/weeks with the graphical part of things instead of focusing on the application itself and the real problems that might arise ).

                   

                  Again, nor Flash or Flex cand query a database, or do insane processing. These kind of things are handeled by server-side languages that query the database once they get a request from the Flex application. Once the querying is done, they send the read data back to Flex where you can display or manipulate it ( if you manipulate it and want to save the manipulated data, then again, you'll be forced to send the data to a server-side script that can handle the inserting into a database ).

                   

                  Regarding the payment: it depends. For example, I'd consider it more secure for you to use the PayPal web site when someone needs to pay for something. I'm not saying that it can't be done with Flex and PHP but you have to take in consideration if it's really worth the time to build something that can handle payment dirrectly in the Flex interface ( maybe waste a few weeks with this ) instead of simply using something that already exists and is secure ( the PayPal page ) and if something goes wrong then you can always blame PayPal.

                   

                  Flex can display and manipulate complex data but it can't talk to any server directly, for that, you need PHP or ASP.NET or whatever server-side language you prefer. I would never choose Flash over Flex when it comes to "serious applications", Flash is great for more "fancy looking stuff" like simple web sites but if you really want something done the way it should be then you'll go with Flex.

                   

                  With best regards,

                  Barna Biro

                  • 6. Re: Can FLEX handle a full-blown commerce site?
                    EgorKDie

                    Barna Biro wrote:

                     


                    Nopes, Flex can't query a database on it's own. Again, it's a client-side language and not a server-side language ( only server-side languages can do such things ).

                    That's not strictly true...

                     

                    The AIR runtime has access to a client side database (SQLite).

                     

                    You are failing to make the distinction between Flex, the Flash Player, and AIR.

                     

                    Broadly however, yeah. The OP will need a serverside component to his operation.

                     

                    And to the OP, you might want to check out BlazeDS if you are used to Java on the server.

                     

                    Gk.

                    • 7. Re: Can FLEX handle a full-blown commerce site?
                      ropeGun Level 1

                      Barna Biro!

                       

                      Wow! Thanks for the wealth of information -- it is VERY much appreciated! It seems as though I have LOTS to learn about server-side scripting. Great idea with using PayPal -- I had thought of doing something like that earlier but had dropped that line of thinking along the way.

                       

                      I believe that I will start digging into Flex and PHP and see if I can get them to work together.

                       

                      Do you have any good suggestions as where I might start? Or, if you know of any good commerce sites that use Flex as the interface for user's shopping experience?

                       

                      You input has been very much appreciated.

                       

                      -john

                       

                      John Culshaw | Engineering Animator

                      P: +46-31-725 1051 | M: +46-736-88 1051  | john.culshaw@xdin.com

                      XDIN AB | Anna Odhners gata 41 | SE-421 30 V Frölunda | www.xdin.com/tech/

                       

                      Xdin: develop and deliver expertise through committed engineering and IT consultants.

                      • 8. Re: Can FLEX handle a full-blown commerce site?
                        Barna Biro Level 3

                        @ EgorKDie: The only one here who is failing to make a distinction is you. Me and the author of the topic clearly stated that we are talking about FLEX applications. Flex is NOT AIR. Flex applications ARE WEB BASED, AIR applications ARE DESKTOP BASED, am I getting to you now?

                         

                        Flex nor Flash can query a database on their own, an AIR application can perform some database handling but AIR IS NOT FLEX ( it only uses components from the Flex framework but since it's a desktop applications it's quite different from the Flex applications that are only web based ). If you can't make a clear distinction between web based and desktop based applications then please don't reply so offensively ( especially when you're off track ).

                         

                        @ John: I think that you should buy a few book on PHP and E-commerce. The core of an E-commerce web site is the backend, which in this case will be PHP ( if I got your right ). Flex is only the interface and will not perform extremely complex tasks so connecting the Flex interface to the PHP backend should not be too hard. In my opinion, the PHP part is the more important since that's where you do the querying, storing, ecrypting and there's where you deal with all security issues.

                         

                        I'd recommend this book for Flex: http://www.amazon.com/Essential-Guide-Flex-3/dp/1590599500 I liked it a lot and I think that it should be enought to get your on tracks with Flex ( you even have a few examples where the author integrates Flex with different server-side languages like PHP and ColdFusion ).

                         

                        With best regards,

                        Barna Biro

                        • 9. Re: Can FLEX handle a full-blown commerce site?
                          EgorKDie Level 2

                          Wow... that's a lot of hate right there!

                           

                          Just throwing a link at you, and you can make up your own mind.

                          http://http://www.adobe.com/products/flex/

                          And a couple of quotes from it...

                           

                          "Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems."

                           

                          "Extend RIAs to the desktop

                          Create RIAs for the desktop using Flex 3 and the Adobe AIR™ runtime."

                           

                          No, Flex isn't AIR. But neither is it Flash. It's a framework that allows developers to target multiple platforms (Flash Player or AIR)

                           

                          I wasn't disagreeing with the assertion that the Flash Player cannot directly access databases, only that Flex cannot, which is patently false.

                          http://livedocs.adobe.com/flex/3/langref/flash/data/SQLConnection.html

                           

                          I was correcting a minor point in your post, nothing more.

                          • 10. Re: Can FLEX handle a full-blown commerce site?
                            Michael Borbor Level 4

                            A regular app and a Flex app using SSL have the same security but SSL 

                            only secures the  communication channel, you need to also secure both 

                            sides of the channel the client and the server, and a lot more.

                             

                            I'm a CF guy so I could suggest to use that but PHP is a good option 

                            as well.

                             

                            Sincerely,

                             

                            Michael

                             

                            El 11/05/2009, a las 6:21, ropeGun <forums@adobe.com> escribió:

                             

                            >

                            Michael Borbor!

                            >

                            Thanks for your input as well.

                            >

                            When you say "...you can run a Flex app over SSL in order to send 

                            data over a "secure" channel." do you mean that this is not as 

                            secure as a "normal" secure website (https://somesite.com) or that 

                            it is just as secure?

                            >

                            You can tell that there is a pretty large gap in my web publishing 

                            knowledge. I have been creating websites that provide information 

                            and are interactive (flash apps embedded) but never have I created a 

                            site where there is server-side scripting going on. Now, I would 

                            like to build a simple commerce site and I have only my knowledge 

                            with HTML, CSS, and Flash AS3 as the tools in my toolbox. Is Flex 

                            another good "tool" to pick up to help me get to my goal?

                            >

                            I guess that my real question is: "Is it a smart try and use Flex 

                            (and some sort of server-side scripting language) to build a 

                            commerce site, or is there another path to take that is easier and 

                            more bombproof (secure, that is). I am considering PHP, but is there 

                            another service that works better with Flex/Flash?

                            >

                            Any good tutorials to get me going or help me make a decision?

                            >

                            Thanks,

                            >

                            -ropeGun

                            >

                            • 11. Re: Can FLEX handle a full-blown commerce site?
                              Barna Biro Level 3

                              @ EgorKDie: Seriously, keep it civilized, you're not in the Zoo. By saying that "Flex can interact with a databse directly" you are misleading people. Flex and Flex applications can't interact directly with any database. Even in the link you have posted ( http://livedocs.adobe.com/flex/3/langref/flash/data/SQLConnection.html ), is it really that hard to see that the title clearly says: (AIR only) ( just to make sure you understand: the red text means that you can only use SQLConnection in an AIR application and if you would have payed attention then you had seen that the SQLConnection class is part of the flash.data package - and that package, does not come with the Flex framework ).

                               

                              Please mind your manners and try to actually understand the stuff you read. It's not our fault that you can't understand the stuff you read but, please, try not to mislead people with ignorant affirmations.

                               

                              Have a nice day,

                              Barna Biro

                              • 12. Re: Can FLEX handle a full-blown commerce site?
                                JeffryHouser Level 4

                                Just wanted to point out that the Flash Player supports sockets, so in theory you can create an ActionScript 3 class that can access a database server without the need for middleware.

                                 

                                Here is an open source project where someone did just that: http://code.google.com/p/assql/

                                 

                                I understand it works relatively well, but I'm not sure I'd want to go into production with it.

                                • 13. Re: Can FLEX handle a full-blown commerce site?
                                  Michael Borbor Level 4

                                  Come on guys keep it cool, if you feel that an affirmation isn't right 

                                  say so but be nice.

                                   

                                  Barns ignorance is the mother of knowledge.

                                   

                                  Sincerely,

                                   

                                  Michael

                                   

                                  El 11/05/2009, a las 7:52, Barna Biro <forums@adobe.com> escribió:

                                   

                                  >

                                  @ http://forums.adobe.com/people/EgorKDie: Seriously, keep it quiet. 

                                  By saying that "Flex can interact with a databse directly" you are 

                                  misleading people. Flex and Flex applications can't interact 

                                  directly with any database. Even in the link you have posted ( http://livedocs.adobe.com/flex/3/langref/flash/data/SQLConnection.html

                                  ) is it really that hard to see that the title clearly says: *(AIR 

                                  only)*

                                  >

                                  Please mind your manners and try to actually understand the stuff 

                                  you read. It's not our fault that you can't understand the stuff you 

                                  read but, please, try not to mislead people with ignorant 

                                  affirmations.

                                  >

                                  Have a nice day,

                                  Barna Biro

                                  >

                                  • 14. Re: Can FLEX handle a full-blown commerce site?
                                    Michael Borbor Level 4

                                    Actually Flex can access MySql using an AS3 library. But I wouldn't 

                                    recommend that'll make you DB highly unsecure and that's a bit 

                                    cumbersome too.

                                     

                                    When you create a Flex app for the web , whatever you create in Flex 

                                    can be done in Flash authoring tool but you'll lose a lot of time 

                                    trying to re invent the wheel.

                                     

                                    AIR and Flash are just runtimes

                                     

                                    Sincerely,

                                     

                                    Michael

                                     

                                    El 11/05/2009, a las 7:31, EgorKDie <forums@adobe.com> escribió:

                                     

                                    >

                                    Wow... that's a lot of hate right there!

                                    >

                                    Just throwing a link at you, and you can make up your own mind.

                                    http://http://www.adobe.com/products/flex/

                                    And a couple of quotes from it...

                                    >

                                    "Flex is a highly productive, free open source framework for 

                                    building and maintaining expressive web applications that deploy 

                                    consistently on all major browsers, desktops, and operating systems."

                                    >

                                    h4. http://www.adobe.com/products/air/develop/flex/

                                    Create RIAs for the desktop using Flex 3 and the Adobe AIR™ runtime

                                    ."

                                    >

                                    No, Flex isn't AIR. But neither is it Flash. It's a framework that 

                                    allows developers to target multiple platforms (Flash Player or AIR)

                                    >

                                    I wasn't disagreeing with the assertion that the Flash Player cannot 

                                    directly access databases, only that Flex cannot, which is patently 

                                    false.

                                    http://livedocs.adobe.com/flex/3/langref/flash/data/SQLConnection.html

                                    >

                                    I was correcting a minor point in your post, nothing more.

                                    >

                                    • 15. Re: Can FLEX handle a full-blown commerce site?
                                      Barna Biro Level 3

                                      @ Jeffry Houser: Yeah, true. I stand corrected ( totally ignored sockets ).

                                      @ Michael Borbor: "Barna's ignorance is the mother of knowledge." What?

                                      • 16. Re: Can FLEX handle a full-blown commerce site?
                                        Gregory Lafrance Level 6

                                        One of the reasons Flex came into being is that Flash is good for smallish animations, or even bigger animations that work well within the "timeline" paradigm Flash uses, but for event based true applications, Flash leads to headaches.

                                         

                                        So if you are creating applications, use Flex.

                                         

                                        There is a lot of stuff you might be able to do in ActionScript, and it is essential to experiment, but in the end, go with proven methodologies, like accessing databases with HTTPService, WebService, RemoteObject, to PHP, Java, ColdFusion, etc. and you'll be better off IMNABWICHO (in my not always but whenever I can humble opinion).

                                        • 17. Re: Can FLEX handle a full-blown commerce site?
                                          ropeGun Level 1

                                          Whoa! I didn't know I would set off this much debate.

                                           

                                          Thanks to all who have replied -- thanks to this wonderful community I now have a better picture of what Flex is all about and what I need to do to take the next step for making a commerce site.

                                           

                                          All you input has been very much appreciated.

                                           

                                          -ropeGun

                                          • 18. Re: Can FLEX handle a full-blown commerce site?
                                            ATIF FAROOQ Level 3

                                            Hi,

                                                If you are thinking of implementing a shoping cart in flex using paypal

                                            API's.Here is a good start for you.

                                             

                                                   http://www.bobjim.com/2008/03/02/example-code-for-my-360flex-session-accessing-secure-apis -within-flex/

                                            • 19. Re: Can FLEX handle a full-blown commerce site?
                                              ropeGun Level 1

                                              ATIF FAROOQ,

                                               

                                              Fantastic link! Thank you very much -- I will have to dive into it in the near future. I first need to get a better handle on flex in general first.

                                               

                                              Thanks again,

                                               

                                              -ropeGun

                                               

                                              John Culshaw | Engineering Animator

                                              P: +46-31-725 1051 | M: +46-736-88 1051  | john.culshaw@xdin.com

                                              XDIN AB | Anna Odhners gata 41 | SE-421 30 V Frölunda | www.xdin.com/tech/

                                               

                                              Xdin: develop and deliver expertise through committed engineering and IT consultants.