Responses inline.

> On Dec 2, 2021, at 12:22 AM, Roman Isitua <romanisi...@gmail.com> wrote:
> 
> I have started development using crux with modules. My current observation is 
> that crux initialize classes defined in the beans.xml of the child module.
> 
> 
> To share data between modules e.g. parent and child are recently discovered 
> the local shared object functionality.  I tried it, it works.
> 
> You comments raises a few concerns for me namely:
> 
> 1. Are you suggesting I should not make the app multi module ? If yes what is 
> the alternative ?

Compile everything into a single app. I have a number of swcs for pieces of my 
projects, but the final app is a single compile. I have found very little 
reason to use modules in Royale (even for an app with hundreds of thousands of 
lines of code). In Flash, each component added considerably to the size of your 
app. In Royale, there’s very little bloat when adding UI. I think you’ll find 
the whole Royale application including all the “modules” will be considerably 
smaller than just your main Flex application in Flash. Using modules will 
probably just make your life more difficult and cause your app to load slower.

> 2. What's the difference between debug and release builds ? 

Release build minifies all the Javascript into a single file and often renames 
things. You can control how much renaming is done using the compiler options: 
https://apache.github.io/royale-docs/compiler/compiler-options

> 
> 3. Can I run the app in production using the debug builds ? The app will be 
> in testing phase and beta phase for a while before being released.

You can run it, but it will be MUCH slower to load. You need to load each as 
and mxml file as a separate js file. It’s good for debugging because you can 
see exactly where the code is, but not so good for performance.
> 
> 
> On Wed, 1 Dec 2021, 20:58 Greg Dove, <greg.d...@gmail.com 
> <mailto:greg.d...@gmail.com>> wrote:
> 
> It is fair to say that Crux has not been tested with modules. But also 
> current modules support is not yet reliable and needs additional work 
> (community contributors are definitely welcome) - they might work for debug 
> builds, but they are not currently a working solution for release builds.
> 
> 
> 
> 
> On Thu, Dec 2, 2021 at 7:03 AM Roman Isitua <romanisi...@gmail.com 
> <mailto:romanisi...@gmail.com>> wrote:
> My application is  multi module and crux based. In my main module, I have a 
> class ConfigData that holds app configuration.  The ConfigData class is 
> declared in the crux beans.xml file.  This class is initialized during 
> application start up. A call to a web service fetches the data and populates 
> this class.
> 
>  Whenever the app switches modules from the main module (i.e. parent crux 
> module) to another module ( i.e. a child crux module), I notice that the 
> configData instance is null. This happens even when I have injected the 
> configData instance in the class that uses configData..
> 
> So my questions are:
> 
> 1. How can an instance initialized in a parent crux module be referenced in a 
> child module ? 
> 
> 2. How can I share data between modules in a crux app ?
> 
> 
> Regards,

Reply via email to