Hi Angelo, Comments inline.
On 10/19/15, 9:57 AM, "Angelo Lazzari" <[email protected]> wrote: >Hi all, i have a few flex mobile apps that i think they could be a good >initial test for the porting to FlexJS. > >Are there any tutorial or documentation that i can use to port my apps to >FlexJS? We don’t have tutorials or docs yet. Would you be willing to help us write it? We could give you write access to the wiki. Basically, we need pioneers like you to help us figure out best practices for migration by trying to migrate something. > >Actually my apps use: Flex 14.1 for the Front end, Robotlegs tecnique to >implement Model, view Controller, Services + inversion of Control + >Dependency >injection and GraniteDS for the comunication with the Java backend. > >So, do you think that i could do it? I do have some pre-formed ideas about migration that are scattered throughout the wiki and some presentation materials. Let me summarize them here: At least for now, FlexJS will not have a way to 100% reproduce everything you could do in your Flex application code base. Some things are going to be hard to implement, or may have performance issues if they do get implemented. The list includes things like: E4X XML AMF Dictionary Weak References Event Priority Deferred DisplayList Updates My current philosophy is that, instead of investing energy trying to implement these capabilities, folks may have to re-write sections of their code to use, for example, JSON instead of E4X, XML, and AMF. IMO, if FlexJS didn’t exist, you would have to migrate away from E4X, XML and AMF anyway, so what FlexJS really does is just give you fewer things to migrate. Hopefully, most of your other AS code will cross-compile with little modification. Note that I said “AS” code. For your MXML tags, there is currently a bit more re-writing to do for now because we haven’t found time to create a component set that more closely matches the Spark and/or MX components. Note that I say “for now” because I keep hoping someone will help us create these more backward-compatible component sets since lots of folks are asking for it. I do not promise 100% API compatibility with Spark and MX because there are some Flash-dependent things in the API like the assumption that you have Dictionary and weak references in the runtime. I did port the FlexStore example from Spark to FlexJS so there is an example you can reference when trying to port your UI. But you may also consider whether it is worth “upgrading” your UI instead of simply migrating it in order to take advantage of newer popular UI paradigms. Now for the AS code. A good quick check is to grep for ‘import flash’ to see which AS files have Flash dependencies. Hopefully there are very few if any in your code and dependent libraries like RobotLegs. Where there are dependencies, the question is whether it is possible to emulate it, or whether that code should be replaced. It is pretty easy to fake an event. So, hopefully you can help us out by being a pioneer and documenting your migration journey. We’ll try to answer questions as quickly as we can. Thanks, -Alex
