12 Replies Latest reply on Jan 15, 2010 10:43 AM by pauland

    Generate flex with flex ?

    hushcoder77

      Hi !

       

      I need to create a Flex Application, that generates another Flex App.... Its like a simple IDE, where when i  click "save" button would generate me an SWF file...

       

      Any ideas on how this is possible ?

      Thanx in Advance

       

      Health & Fun

        • 1. Re: Generate flex with flex ?
          Claudino Bur Level 2

          Hello,

           

          You would have to use the Flex's compiler for that... What do you wish to acomplish?

           

          Claude Bur.

          • 2. Re: Generate flex with flex ?
            Gregory Lafrance Level 6

            I don't think you can do that on the client machine, but you might be able to send it to the server and compile it.

             

            If this post answers your question or helps, please mark it as such.


            Greg Lafrance - Flex 2 and 3 ACE certified

            www.ChikaraDev.com

            Flex / AIR Development, Training, and Support Services

            1 person found this helpful
            • 3. Re: Generate flex with flex ?
              hushcoder77 Level 1

              I wich to create somethin like a mini-IDE, where i drag and drop SOME flex components to a panel (AREAPANEL)... associate thosse components with some webservice actions, and then, when cliking SAVE, to generate a SWF application, reflecting what's in the panel...

               

              Thanx

              • 4. Re: Generate flex with flex ?
                hushcoder77 Level 1

                Ok, no problem... it compiles on the server ... no problem... if then i can Download the SWF from the server.... and how do i achieve that ? how do i compile iin the server ?

                 

                tahnx

                • 5. Re: Generate flex with flex ?
                  pauland Level 4

                  You'll need to roundtrip to the server.

                   

                  Your front end will generate a description of whats required and pass it back to the server to assemble and compile the code using the command line compiler, then you would transfer the resulting swf back to the client.

                   

                  It won't be straightforward.

                   

                  Paul

                  • 6. Re: Generate flex with flex ?
                    hushcoder77 Level 1

                    What do you mean with description to send to the server ? A XML dor example having the components and they're properties ? Or the Panel MXML itselfs ?

                    • 7. Re: Generate flex with flex ?
                      marco.rossi

                      Yeap, I think he meant a xml.

                      • 8. Re: Generate flex with flex ?
                        pauland Level 4

                        hushcoder77 wrote:

                         

                        What do you mean with description to send to the server ? A XML dor example having the components and they're properties ? Or the Panel MXML itselfs ?

                         

                        What you send to the server is up to you. It could be an XML description of what is required or the actual code that's required.

                         

                        Basically your front end has the design and the server will need to have the compiler installed. How you marry up transfering the design on the client to code for the compiler is your own choice. You have a lot of work to do.

                        • 9. Re: Generate flex with flex ?
                          hushcoder77 Level 1

                          hmmm... why LOT's of work ?

                          for what i have i mind i need:

                           

                          - the design/flex client...

                          - a webservice to connect my client to the server, and proveide the generated SWF..

                          - a method for compiling the mxml, in the server.

                           

                          Am i missing something ?????

                           

                          Thanx !

                          • 10. Re: Generate flex with flex ?
                            pauland Level 4

                            hushcoder77 wrote:

                             

                            hmmm... why LOT's of work ?

                            for what i have i mind i need:

                             

                            - the design/flex client...

                            - a webservice to connect my client to the server, and proveide the generated SWF..

                            - a method for compiling the mxml, in the server.

                             

                            Am i missing something ?????

                             

                            Thanx !

                             

                            OK, well since it's not so much work, we'll look forward to a demo when you've finished it.  ;-)

                             

                            A few people have asked about doing similar things in the past, but I have yet to hear of one actually being completed. It's certainly doable, but I think there's more work involved than your post tries to imply. Probably the thing that makes this difficullt is the synchronisation and robustness of the parts on the server and even the things that you have dismissed - the designer and code generation parts.

                             

                            I don't regard this as a trivial project.

                            1 person found this helpful
                            • 11. Re: Generate flex with flex ?
                              hushcoder77 Level 1

                              Hmmm.... ok, i will pay attention about your comments on the difficulty of this task...

                               

                              And, what you think abou this alternative approach ?

                               

                              1 - My Flex Studio with the designer bla bla, generates a XML configuration in a DATABASE through a WebService.

                               

                              2 - For the result, i would have always the same FLEX app, that onLoad event get's it's own configuration from the Xml from the DATABASE (through webservice also) and creates itself it's own contents.... Resuming, instead of a FLEX Studio that generates SWF, i would have a STUDIO that generates XML to feed the COMMON SWF...

                               

                              Is this approach more doable ?

                               

                              Thanx for the help, guys !

                              • 12. Re: Generate flex with flex ?
                                pauland Level 4

                                I think that's a better approach.