Cairngorm to Crux

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Cairngorm to Crux

T-san

Greg, I'm providing a simplified Flex application example that uses Cairngorm framework.  
I'd like to know changes required to migrate to Crux and any possible problems for migration.

I take our Login function for this case study. Royale.zip contains the following:
(I hope you have time to look at these files and give me advices on migration)


- Login.mxml
        Here, put focus only on LoginLoadEvent and LoginSignInEvent.

- LoginLoadEvent.as
        LoginLoadEvent dispatcher

- LoginSignInEvent.as
        LoginSignInEvent dispatcher

- LoginController.as
        Associate events and commands.
        Here, put focus only on LoginSignInCommand.

- LoginServiceDelegate.as
        Find remote service from service locator (Services.mxml) and call it.

- Services.mxml
        Service locator

- LoginModelLocator.as
        Update Login.mxml with returned value object.

- UserLoginVO.as: Sent to server

- UserMainVO.as: Returned from server




--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove
Hi Takeshita,

My work day has just started. Sure, I will take a look at that later today and let you know.

On Wed, 30 Oct 2019, 00:58 Takeshita Shoichiro, <[hidden email]> wrote:

Greg, I'm providing a simplified Flex application example that uses Cairngorm framework.  
I'd like to know changes required to migrate to Crux and any possible problems for migration.

I take our Login function for this case study. Royale.zip contains the following:
(I hope you have time to look at these files and give me advices on migration)


- Login.mxml
        Here, put focus only on LoginLoadEvent and LoginSignInEvent.

- LoginLoadEvent.as
        LoginLoadEvent dispatcher

- LoginSignInEvent.as
        LoginSignInEvent dispatcher

- LoginController.as
        Associate events and commands.
        Here, put focus only on LoginSignInCommand.

- LoginServiceDelegate.as
        Find remote service from service locator (Services.mxml) and call it.

- Services.mxml
        Service locator

- LoginModelLocator.as
        Update Login.mxml with returned value object.

- UserLoginVO.as: Sent to server

- UserMainVO.as: Returned from server




--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove

Hi Takeshita,

I had to push a fix to Crux to make Crux work with MXRoyale and/or Spark Applications (there is not a common base class with the Basic/Jewel/Express applications). So you will need the latest royale build with that change.

I also had to make some changes to the code you supplied to get something that will compile. See the dropbox download.... it should show some examples for how to get things working with Crux.
FYI there is also a Mock service helper in the Crux library which I did not try to use yet, but might be helpful to try if you want to do some local testing before you you try with real remote object. If you do try that please let me know if you see any problems with it and I will work to solve them.

At the moment the Crux setup is only for the application startup (configuration) and the 'Login' flow to the signIn call, so it triggers the command etc. So there are only basic examples of Injection and configuration etc. I left some 'singleton' like access on some of the configuration classes, so it is possible to use a mix of the singleton pattern access that Cairngorm has or via injection. For Crux you would usually use injection though.


I have no IDE configuration in that file set. I used maven locally to build that, as a local variation inside the royale crux examples. So I did add a file that shows the injection metadata and other compiler options I was using. Hopefully you can use those compiler options along with a normal setup for all the royale dependencies.

I left copies of the built javascript versions inside, so you can take a look. I did not try to make the UI look good, and it has some bugs under different conditions (make sure you choose the 2nd 'fake role' from the dropdown, which does not appear correctly).

I hope there are useful clues in that - ask questions if you need clarification. I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.
regards,
Greg


On Wed, Oct 30, 2019 at 8:58 AM Greg Dove <[hidden email]> wrote:
Hi Takeshita,

My work day has just started. Sure, I will take a look at that later today and let you know.

On Wed, 30 Oct 2019, 00:58 Takeshita Shoichiro, <[hidden email]> wrote:

Greg, I'm providing a simplified Flex application example that uses Cairngorm framework.  
I'd like to know changes required to migrate to Crux and any possible problems for migration.

I take our Login function for this case study. Royale.zip contains the following:
(I hope you have time to look at these files and give me advices on migration)


- Login.mxml
        Here, put focus only on LoginLoadEvent and LoginSignInEvent.

- LoginLoadEvent.as
        LoginLoadEvent dispatcher

- LoginSignInEvent.as
        LoginSignInEvent dispatcher

- LoginController.as
        Associate events and commands.
        Here, put focus only on LoginSignInCommand.

- LoginServiceDelegate.as
        Find remote service from service locator (Services.mxml) and call it.

- Services.mxml
        Service locator

- LoginModelLocator.as
        Update Login.mxml with returned value object.

- UserLoginVO.as: Sent to server

- UserMainVO.as: Returned from server




--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Alex Harui-2

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex

Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove

@aharui
Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).



On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex

Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

I have your favors for the following matters.

- Mock service helper in the Crux library
I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.
Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

Appreciate your help.

S. Takeshita

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:

@aharui
Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).



On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex



--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Alex Harui-2

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎

asconfig.json (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg, thanks for your advice.  I will try after change.

2019年11月1日(金) 7:51 Greg Dove <[hidden email]>:

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg, the build worked after removing source-path, which I added.  Thanks.  I've confirmed the same output as yours was generated.

Well, some warning messages are shown as follows.  Would you please check?

----------------------------------------------------------------------------------------------------------------------------

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc      
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
The project 'Main' has been successfully compiled.
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(60): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var userName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(61): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var userId:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(62): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var roleName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(63): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var headerViewControl:ArrayCollection;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(44): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var loginModel:LoginModel;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(47): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var dispatcher:IEventDispatcher;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\command\LoginSignInCommand.as(25): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var loginModel:LoginModel;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginLoadEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var callBack:Function;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginSignInEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var vo:UserLoginVO;
                ^

12.539034 seconds

Terminal will be reused by tasks, press any key to close it.

On Fri, Nov 1, 2019 at 7:54 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks for your advice.  I will try after change.

2019年11月1日(金) 7:51 Greg Dove <[hidden email]>:

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Greg Dove
Hi Takeshita,

Great! Yes those warnings are not unexpected. One issue with public vars in Royale is that they can be renamed in the minified javascript output, and not accessible via dynamic access e.g this['dispatcher'] is not reliable inside Login.mxml, for example. Most often this is not an issue, but that warning is just to remind people about this.

But Crux uses reflection to set those correctly for [Inject] processing even when they are renamed/minified.

You can avoid the warnings by using doc-comment directives.

For an actionscript class, you can annotate individual public vars, or (easier) the class itself with the following before :
         /** 
         *  @royalesuppresspublicvarwarning
         */

In mxml script blocks I expect this is only possible for each individual member.


On Fri, Nov 1, 2019 at 1:39 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, the build worked after removing source-path, which I added.  Thanks.  I've confirmed the same output as yours was generated.

Well, some warning messages are shown as follows.  Would you please check?

----------------------------------------------------------------------------------------------------------------------------

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc      
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
The project 'Main' has been successfully compiled.
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(60): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var userName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(61): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var userId:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(62): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var roleName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(63): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var headerViewControl:ArrayCollection;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(44): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var loginModel:LoginModel;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(47): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var dispatcher:IEventDispatcher;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\command\LoginSignInCommand.as(25): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var loginModel:LoginModel;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginLoadEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var callBack:Function;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginSignInEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var vo:UserLoginVO;
                ^

12.539034 seconds

Terminal will be reused by tasks, press any key to close it.

On Fri, Nov 1, 2019 at 7:54 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks for your advice.  I will try after change.

2019年11月1日(金) 7:51 Greg Dove <[hidden email]>:

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg, thanks.

Warning messages have gone.

I will prepare a migration note to be shared with members.  Before that, I will ask some questions shortly.

On Fri, Nov 1, 2019 at 9:51 AM Greg Dove <[hidden email]> wrote:
Hi Takeshita,

Great! Yes those warnings are not unexpected. One issue with public vars in Royale is that they can be renamed in the minified javascript output, and not accessible via dynamic access e.g this['dispatcher'] is not reliable inside Login.mxml, for example. Most often this is not an issue, but that warning is just to remind people about this.

But Crux uses reflection to set those correctly for [Inject] processing even when they are renamed/minified.

You can avoid the warnings by using doc-comment directives.

For an actionscript class, you can annotate individual public vars, or (easier) the class itself with the following before :
         /** 
         *  @royalesuppresspublicvarwarning
         */

In mxml script blocks I expect this is only possible for each individual member.


On Fri, Nov 1, 2019 at 1:39 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, the build worked after removing source-path, which I added.  Thanks.  I've confirmed the same output as yours was generated.

Well, some warning messages are shown as follows.  Would you please check?

----------------------------------------------------------------------------------------------------------------------------

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc      
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
The project 'Main' has been successfully compiled.
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(60): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var userName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(61): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var userId:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(62): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var roleName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(63): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var headerViewControl:ArrayCollection;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(44): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var loginModel:LoginModel;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(47): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var dispatcher:IEventDispatcher;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\command\LoginSignInCommand.as(25): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var loginModel:LoginModel;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginLoadEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var callBack:Function;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginSignInEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var vo:UserLoginVO;
                ^

12.539034 seconds

Terminal will be reused by tasks, press any key to close it.

On Fri, Nov 1, 2019 at 7:54 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks for your advice.  I will try after change.

2019年11月1日(金) 7:51 Greg Dove <[hidden email]>:

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

T-san
Greg and others,

I have prepared the document for creating Apache Royale project using Visual Studio Code.  Just for your information.

Thanks.

On Fri, Nov 1, 2019 at 9:04 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks.

Warning messages have gone.

I will prepare a migration note to be shared with members.  Before that, I will ask some questions shortly.

On Fri, Nov 1, 2019 at 9:51 AM Greg Dove <[hidden email]> wrote:
Hi Takeshita,

Great! Yes those warnings are not unexpected. One issue with public vars in Royale is that they can be renamed in the minified javascript output, and not accessible via dynamic access e.g this['dispatcher'] is not reliable inside Login.mxml, for example. Most often this is not an issue, but that warning is just to remind people about this.

But Crux uses reflection to set those correctly for [Inject] processing even when they are renamed/minified.

You can avoid the warnings by using doc-comment directives.

For an actionscript class, you can annotate individual public vars, or (easier) the class itself with the following before :
         /** 
         *  @royalesuppresspublicvarwarning
         */

In mxml script blocks I expect this is only possible for each individual member.


On Fri, Nov 1, 2019 at 1:39 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, the build worked after removing source-path, which I added.  Thanks.  I've confirmed the same output as yours was generated.

Well, some warning messages are shown as follows.  Would you please check?

----------------------------------------------------------------------------------------------------------------------------

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc      
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
The project 'Main' has been successfully compiled.
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(60): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var userName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(61): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var userId:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(62): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var roleName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(63): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var headerViewControl:ArrayCollection;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(44): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var loginModel:LoginModel;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(47): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var dispatcher:IEventDispatcher;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\command\LoginSignInCommand.as(25): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var loginModel:LoginModel;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginLoadEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var callBack:Function;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginSignInEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var vo:UserLoginVO;
                ^

12.539034 seconds

Terminal will be reused by tasks, press any key to close it.

On Fri, Nov 1, 2019 at 7:54 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks for your advice.  I will try after change.

2019年11月1日(金) 7:51 Greg Dove <[hidden email]>:

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎

Create Apache Royale Project.docx (293K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cairngorm to Crux

Piotr Zarzycki
Hi Takeshita,

Try to look into following instruction and let us know what we miss here [1].


Thanks,
Piotr

niedz., 3 lis 2019 o 08:14 Takeshita Shoichiro <[hidden email]> napisał(a):
Greg and others,

I have prepared the document for creating Apache Royale project using Visual Studio Code.  Just for your information.

Thanks.

On Fri, Nov 1, 2019 at 9:04 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks.

Warning messages have gone.

I will prepare a migration note to be shared with members.  Before that, I will ask some questions shortly.

On Fri, Nov 1, 2019 at 9:51 AM Greg Dove <[hidden email]> wrote:
Hi Takeshita,

Great! Yes those warnings are not unexpected. One issue with public vars in Royale is that they can be renamed in the minified javascript output, and not accessible via dynamic access e.g this['dispatcher'] is not reliable inside Login.mxml, for example. Most often this is not an issue, but that warning is just to remind people about this.

But Crux uses reflection to set those correctly for [Inject] processing even when they are renamed/minified.

You can avoid the warnings by using doc-comment directives.

For an actionscript class, you can annotate individual public vars, or (easier) the class itself with the following before :
         /** 
         *  @royalesuppresspublicvarwarning
         */

In mxml script blocks I expect this is only possible for each individual member.


On Fri, Nov 1, 2019 at 1:39 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, the build worked after removing source-path, which I added.  Thanks.  I've confirmed the same output as yours was generated.

Well, some warning messages are shown as follows.  Would you please check?

----------------------------------------------------------------------------------------------------------------------------

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc      
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
The project 'Main' has been successfully compiled.
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(60): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var userName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(61): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var userId:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(62): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var roleName:String;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(63): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.      

                        public var headerViewControl:ArrayCollection;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(44): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var loginModel:LoginModel;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(47): col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                        public var dispatcher:IEventDispatcher;
                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\command\LoginSignInCommand.as(25): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var loginModel:LoginModel;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginLoadEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var callBack:Function;
                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\event\LoginSignInEvent.as(11): col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter instead.

                public var vo:UserLoginVO;
                ^

12.539034 seconds

Terminal will be reused by tasks, press any key to close it.

On Fri, Nov 1, 2019 at 7:54 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks for your advice.  I will try after change.

2019年11月1日(金) 7:51 Greg Dove <[hidden email]>:

Hi Takeshita,

The one thing that strikes me as wrong is this:

  "source-path": [
            "src"
        ],

I don't have that in mine, the 'files' reference to the application mxml is sufficient I think.
But if you need to include, that it should probably be like:
        "source-path": [
            "src/main/royale"
            ],

That src/main/royale path is a convention used by maven.



On Fri, Nov 1, 2019 at 2:47 AM Takeshita Shoichiro <[hidden email]> wrote:
Greg,

The build ends with error.  The problem is caused by Main.mxml and LoginController.as.  I attached terminal log.  Sorry for the garbage characters.  I could not fix.  I will try later.
I changed a bit your provided asconfig.json.  Check the attachment.  Appreciate your check.

===============================================================================================================================

> Executing task in folder Porting: C:\Program Files\Java\jdk-11.0.5\bin\java.exe -jar c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project c:\Workspace\CairngormToCrux\Porting\asconfig.json <



MXMLJSC
+royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
--debug=true
+configname=royale
--targets=JSRoyale
--source-path+=src
--js-library-path+=${royalelib}/js/libs/BasicJS.swc
--js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
--js-library-path+=${royalelib}/js/libs/CoreJS.swc
--js-library-path+=${royalelib}/js/libs/LanguageJS.swc
--js-library-path+=${royalelib}/js/libs/CruxJS.swc
--js-library-path+=${royalelib}/js/libs/HTMLJS.swc
--js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
--js-library-path+=${royalelib}/js/libs/BindingJS.swc
--js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
--js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
--js-library-path+=${royalelib}/js/libs/TLFJS.swc
--js-library-path+=${royalelib}/js/libs/XMLJS.swc
--js-library-path+=${royalelib}/js/libs/TextJS.swc
--js-library-path+=${royalelib}/js/libs/NetworkJS.swc
--source-map=true
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
-keep-code-with-metadata=Inject
--
src/main/royale/Main.mxml
c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(30): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <business:Services/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(32): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー繧・ActionScript class 縺ォ隗」豎コ縺ァ縺阪∪縺帙s縺ァ縺励◆縲ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <model:CruxModelConfig/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(35): col: 6 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                        <control:LoginController/>
                                        ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(78): col: 5 繧ィ繝ゥ繝シ : 縺薙・繧ソ繧ー縺ッ辟。蜉ケ縺ァ縺吶ゅ%縺ョ繧ソ繧ー縺ッ辟。隕悶&繧後∪縺吶・

                                <view:Login id="login"/>
                                ^

c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as 繧ィ繝ゥ繝シ : 縲稽ain.royale.jp.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺ッ隕九▽縺九j縺セ縺帙s縺ァ縺励◆縲・


c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\control\LoginController.as(14): col: 15 繧ィ繝ゥ繝シ : 縲桂p.co.tak.control.LoginController縲阪→縺・≧蜷榊
燕繧呈戟縺、縲∝、夜Κ縺九i陦ィ遉コ蜿ッ閭ス縺ェ螳夂セゥ縺御コ域悄縺帙★隕九▽縺九j縺セ縺励◆縲・

        public class LoginController extends CommandMap
                     ^

1.7805689 seconds
The terminal process terminated with exit code: 3

Terminal will be reused by tasks, press any key to close it.

On Thu, Oct 31, 2019 at 10:01 AM Greg Dove <[hidden email]> wrote:

No problem... and yes Crux is an IOC approach, it is a close approximation of Swiz, that works in Javascript (with a few tweaks, like emulation of stage events, for example)
I think Cairngorm 3 is more a set of additional tools and libraries, some that work with various other IOC libraries (I assume Cairngorm 3 was a recognition of the growing popularity of those other options at the time it was developed). That set of options includes Swiz, which is what Crux is based on, but also Parsley and others. However I expect that other things in the Cairngorm 3 code will continue to work with the original Cairngorm 2 that you are using. See [1] below ... I would assume that any of the 'libraries' that don't say 'requires' probably would still work with the original Cairngorm 2.
So, as Alex said, I think the only thing to check is whether you are using any of Cairngorm 3 (those libraries). I did not see evidence of that in your minimized example.






On Thu, Oct 31, 2019 at 1:37 PM Takeshita Shoichiro <[hidden email]> wrote:
Greg, thanks a lot.  The URL is very helpful. At a glance, the new thing for Cairngorm 3 is an introduction of Inversion of Control. And your Crux’s recommendation is the use of injection.  Right?  So, Crux is more equivalent to Cairngorm 3. That’s my impression.

As to the new Dropbox, the download at the customer’s office is prohibited.  I will do the work at home tonight.

2019年10月31日(木) 8:41 Greg Dove <[hidden email]>:

Just another quick update, Takeshita. Please re-download the same zip from dropbox, which has been updated

' Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.'
I am not a frequent user of VSCode (although I do think it's great!). I updated the zip file in dropbox with something that works for me using VSCode. Hopefully it works for you too. It probably will not represent 'best practice' for using VSCode, but others may be able to advise for that.
I expect you need to check this:
"settings": {
"as3mxml.sdk.framework": "c:\\development\\asf\\royale-asjs"
}
inside 'cairngorm-port-example.code-workspace' to be whatever makes sense on your system.

'Mock service helper in the Crux library'
I added a mock response in the LoginServiceDelegate - I am not sure what the various fields should be returning, so there are some random values in those, but I expect you can substitute those with more realistic contents.




On Thu, Oct 31, 2019 at 11:39 AM Greg Dove <[hidden email]> wrote:

I was just investigating this also. The main MVC setup does not change, and version 3 is more about enhancing general approaches: 'The original Cairngorm library remains a part of Cairngorm 3, but has not been updated for this release.' [1]

I only saw the original Cairngorm 2 approach in your (minimal) code so far, Takeshita.

1. Here is a good description for version 3 Cairngorm: https://sourceforge.net/adobe/cairngorm/wiki/GettingStartedWithCairngorm/

On Thu, Oct 31, 2019 at 11:12 AM Takeshita Shoichiro <[hidden email]> wrote:
Alex, I think version 2 by looking at the source. Version 3 seems to have a different application architecture, which is not our case.  If I can find the different information from the build materials, I will inform.

2019年10月31日(木) 1:01 Alex Harui <[hidden email]>:

Hi T-San,

 

Just to make sure:  What version of Cairngorm did you use in your app?

 

Thanks,

-Alex

 

From: Takeshita Shoichiro <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, October 30, 2019 at 5:02 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Greg, thanks a lot for your great work.  It seems it's very possible to migrate from Cairngorm to Crux.  I will check the changes you made in details tomorrow at the office.

 

I have your favors for the following matters.

 

- Mock service helper in the Crux library

I'm interested in this.  Would you provide the information?

- I used maven locally to build that, as a local variation inside the royale crux examples.

Could you provide your maven build procedure for this application?  I do not know how to build an application with product-like architecture (the one I sent to you).  I'd like to build my application and see the result quickly.  Using Visual Studio Code with ActionScript & MXML and Chrome Debugger extension is desirable.  However, if it takes time, Maven is fine but I want to build one application.

 

Appreciate your help.

 

S. Takeshita

 

On Wed, Oct 30, 2019 at 3:52 PM Greg Dove <[hidden email]> wrote:


@aharui

Actually it looks like I already based the 'QuickStart' examples in crux-examples on that, so maybe I did already 'test' the serviceHelper/Mock services stuff. I had forgotten these details. I need to attribute those 2 specific examples with that Swiz source. I will add that tomorrow.

 

For the Cairrngorm stuff I believe Cairngorm 3 became more generic and provided various enhancements to the other newer architectural frameworks (Swiz, Robotlegs, Parsley etc) instead of being an evolution of the original Cairngorm, but I might be wrong about that. The app I ported was using Cairngorm 2 which was the 'original' I think (I don't know about any Cairngorm 1, but presumably there was a Cairngorm 1 before 2) . I'll take a look at those version 3 examples as well, but in terms of 'porting' I think the main use will probably be Cairngorm 2 -> Crux. It still might be viable to port the Cairngorm 2 code itself to Royale, I think I only saw something that would need to be resolved with the view processing part,  but I don't know about the Adobe licence for that (it is permissive, but I don't know offhand whether it is compatible for Apache).

 

 

 

On Wed, Oct 30, 2019 at 7:11 PM Alex Harui <[hidden email]> wrote:

 

 

From: Greg Dove <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 29, 2019 at 10:22 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Cairngorm to Crux

 

Snip…

I will try to make another example (maybe the github viewer again) in royale examples using MXRoyale instead of Jewel/Basic in the coming days.

regards,

Greg

 

It would be interesting to find out how many changes to this example are needed to get it to run in Royale

https://swizframework.jira.com/wiki/spaces/SWIZ/pages/1999155/Quick+Start

 

Same for some of the Cairngorm examples:

https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm3/trunk/samples/

 

Just an idea…

-Alex


 

--

Shoichiro Takeshita
武下 祥一郎

--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎


--
Shoichiro Takeshita
武下 祥一郎


--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

12