For sure, FlexJS is not so far along that you won’t have to use browser debugging. More thoughts inline.
On 10/21/15, 12:19 AM, "Harbs" <harbs.li...@gmail.com> wrote: >Changing the subject… > >Here’s a real-life scenario which I’m not sure how it’s going to work: > >I expect to spend the next many months building a JS version of my >PrintUI WYSIWYG web app. Many parts of the the code maps pretty well to >JS, especially when using EaselJS. However, I think it’s unreasonable to >expect that the app can be compiled to both a Flash target as well as a >JS one for the following reasons (and probably more). >1) EaselJS is not a 1-to-1 mapping to the Flash drawing APIs. It’s >similar, but there’s enough differences that I don’t see how to target >both. Maybe we can build some kind of class which handles conditionals >and edge cases. I don’t know. Om has successfully abstracted a lot of FXG and SVG and flash.graphics.* as well. >2) I’m not sure how targeting API requests will work with both targets. I >have to handle custom response codes and the like which required building >some custom classes which acted as a proxy for the URLLoaders. FlexJS is all about abstraction replacement. There is already an HTTPService that works well with JSON so you get the same experience whether on SWF or using XHR in JS. >3) There’s lots of XML processing needed. I’m not sure how to handle the >XML processing in a multi-target way. You sure you can’t switch to JSON? If you must use XML, I still think there is a common API you could come up that uses XMLDocument in Flash and something in JS. E4X would be a ton of work. >4) The biggest kicker is text editing. I’m going to have to do a LOT of >work getting text to render exactly in the HTML. I’m likely going to use >txtjs to help, but that’s really only a start. Besides the actual text >problem, trying to target both Flash and HTML seems like a total >nightmare. IMO, you would be a candidate to try porting TLF to JS. Most of the code doesn’t care too much about Flash. I think if you abstract the TextLine you can get quite far. > >Here’s my question: >Jetbrains seems to have worked out integrated debugging of JS[1]. If I >understand correctly, the Falcon compiler has symbols that map the code. >Is there any way of mapping the ActionScript code to the compiled JS >code, so it’s possible to maintain links between the code similar to how >debugging works with ABC code and ActionScript? Or is what I’m suggesting >completely non-sensical? It might be possible, but is a lot of work. If you want to work on it, I will definitely be supportive. Getting line numbers in AS to match up in the JS isn’t a priority for me right now because for me, when I open the JS debugger, it is generally quite obvious what line of AS the JS came from. > >I think having a really smooth debug experience on the JS side will help >immeasurably in terms of FlexJS adoption. Well, I can’t argue with that, but I hope it isn’t a critical feature because I think we currently don’t have enough person-power to create what you want soon. Hopefully we can get some momentum from early adopters without having to make FlexJS 1.0 feel as smooth as Flex 4. IMO, it isn’t really possible for two full-time developers and some part-time volunteers to quickly re-create what dozens of developers did over 8 years. I don’t know if you remember Flex 1.0, but it got traction without being Flex 4.x. -Alex