Hi, I've extended the Wiki page for creating components on the FlexJS Wiki pages. I've also placed the sample code I used, called "DataGridXcompile", in the FlexJS examples directory.
Peter Ent Adobe Systems On 12/6/13 1:14 PM, "Peter Ent" <p...@adobe.com> wrote: >I will update the wiki. >Thanks. >--peter > >On 12/6/13 1:08 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote: > >>This is fantastic news, Peter! >> >>If you can add a page in the wiki describing the process of converting a >>simple AS3 component into JS, that would be so much helpful for folks >>like >>me, who want to help with building components for FlexJS. >> >>Thanks, >>Om >>On Dec 6, 2013 9:39 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote: >> >>> Way to go, Peter! >>> >>> Let me know if there is a way to optimise the process. There is a lot >>> we can do with FalconJx and maybe the framework architecture that will >>> allow us to do more with this paradigm... >>> >>> EdB >>> >>> >>> >>> >>> On Fri, Dec 6, 2013 at 6:31 PM, Cosma Colanicchia <cosma...@gmail.com> >>> wrote: >>> > Very nice job! >>> > >>> > >>> > 2013/12/6 Mr. Rich <mrrich....@gmail.com> >>> > >>> >> Great news Peter, >>> >> On Dec 6, 2013 11:42 AM, "Peter Ent" <p...@adobe.com> wrote: >>> >> >>> >> > Hi, >>> >> > >>> >> > I've just finished an experiment with pretty good results. >>> >> > >>> >> > A little while ago I created a first pass at a FlexJS DataGrid. >>>This >>> >> meant >>> >> > building both the ActionScript and the JavaScript components and >>>all >>> of >>> >> > their parts (data model, view, and so forth). Creating a new >>>component >>> >> for >>> >> > FlexJS follows the same pattern: build the component in one >>>language >>> and >>> >> > then build it in the other. >>> >> > >>> >> > The experiment was to take the ActionScript component and compile >>>it >>> into >>> >> > JavaScript and compare the result with my hand-crafted JavaScript >>> >> version. >>> >> > Well, the result was a success. Doing this uncovered some issues >>>with >>> the >>> >> > FalconJX compiler that were resolved by either Alex Harui or Erik >>>de >>> >> Bruin, >>> >> > which I think, strengthened the compiler. Once things were ironed >>>out, >>> >> the >>> >> > ActionScript DataGrid compiled cleanly into JavaScript and ran. >>> >> > >>> >> > This experiment worked for the DataGrid because it is really a >>> composite >>> >> > component. That is, the DataGrid I created is a Container with a >>> >> ButtonBar >>> >> > for column headers and Lists for the columns; the DataGrid >>> co-ordinates >>> >> the >>> >> > events between all of the lists. This technique would not work for >>> >> > components that have very custom JavaScript requirements or which >>>have >>> >> > "native" JavaScript/HTML versions (such a Label or a Button). >>> >> > >>> >> > What this experiment means is that some components - specifically >>>ones >>> >> > that are composed of existing components - can be created and >>>tested >>> in >>> >> > ActionScript, then cross-compiled into JavaScript to provide a >>> fast-path >>> >> to >>> >> > the JavaScript version. This technique may not work 100% in all >>>cases, >>> >> but >>> >> > what it has shown me is that you can get a lot of good code on the >>> >> > JavaScript side from the ActionScript source, at least enough to >>> quickly >>> >> > finish the JavaScript version. >>> >> > >>> >> > Regards, >>> >> > Peter Ent >>> >> > Adobe Systems >>> >> > >>> >> >>> >>> >>> >>> -- >>> Ix Multimedia Software >>> >>> Jan Luykenstraat 27 >>> 3521 VB Utrecht >>> >>> T. 06-51952295 >>> I. www.ixsoftware.nl >>> >