> It might be > the solution to have a monolith application, although my boss seems against > this idea.
I REALLY recommend doing some profiling. Your boss is probably basing their opinion on experience with Flash. Modules were pretty important there for performance. For other JS frameworks modules are also important because they are just so slow and big. Royale is so small and fast that modules will likely not gain you anything and might in fact hurt. I don’t know how complex your views are but I recommend you look at this: https://github.com/unhurdle/spectrum-royale <https://github.com/unhurdle/spectrum-royale> We have a demo here with 80 routed components https://unhurdle.github.io/spectrum-royale/ <https://unhurdle.github.io/spectrum-royale/> That’s wired up with a router here: https://github.com/unhurdle/spectrum-royale/blob/master/SpectrumBrowser/src/view/BrowserRouter.mxml <https://github.com/unhurdle/spectrum-royale/blob/master/SpectrumBrowser/src/view/BrowserRouter.mxml> All the code is a monolith and it’s all loaded at startup time. It loads and switches views pretty instantly. There’s also Tour de Jewel. https://royale.apache.org/tourdejewel/ > Can jewel components and mx components work together? Is a jewel > module completely different from an mx:Module? The underlying structure of all Royale components are based on Basic. So they are all compatible to a certain degree. You can definitely mix and match components from different sets. I’ve done so in the past. It’s possible that you might run into conflicts between the CSS and CSS application of beads. That’s something to keep your eye out for. HTH, Harbs > On Dec 3, 2021, at 3:25 AM, GAbe Barbosa <gbarbosa...@gmail.com> wrote: > > Ahh i see. The application I'm porting had a hub application where they > loaded at runtime .swf applications on user demand. They have about 150 of > these "views". ModuleLoader isn't fully baked out and I still have to > instantiate via window["module"["path"] which is a workaround. It might be > the solution to have a monolith application, although my boss seems against > this idea. Can jewel components and mx components work together? Is a jewel > module completely different from an mx:Module? > > On Thu, Dec 2, 2021 at 2:17 PM Harbs <harbs.li...@gmail.com> wrote: > >> There’s an <html:Iframe> component. You should use that. It sounds like >> you are trying to add an actual html element directly in MXML. That’s not >> going to work very well. >> >>> Not sure what you mean by cross-op, but would need the apps to share many >>> models or singletons. >> >> Sharing models and singletons is not going to work in an iframe. You can >> only share data by sending messages that can be sent as strings. >> >> If you need to share models and singletons, you’ll need modules. Have you >> looked at the ModuleExample app in the example folder? >> >> That said: Why do you need modules at all? In Flash I used modules to >> reduce the size of my main application. In Royale I have not found it to be >> an issue. >> >> Harbs >> >>> On Dec 2, 2021, at 8:57 PM, GAbe Barbosa <gbarbosa...@gmail.com> wrote: >>> >>> Thanks for responding Harbs! >>> >>> Could you give me an example of this please. The only way I've been able >> to >>> load the other mx:Application is modifying the index.html and adding an >>> <iframe src='indexOfAnotherApplication.html' > then instantiating the >>> object via: >>> var obj :Object = window.frames["0"]["application"]["path"]; >>> obj = new obj(); >>> >>> but then fails on adding to the screen via: >>> addChild(obj as IUIComponent) >>> >>> Not sure what you mean by cross-op, but would need the apps to share many >>> models or singletons. >>> >>> On Thu, Nov 25, 2021 at 2:48 AM Harbs <harbs.li...@gmail.com> wrote: >>> >>>> How much cross-op do you need? >>>> >>>> I’d probably load it in an iframe you can use either <html:Iframe> or >>>> <js:WebBrowser> >>>> >>>> If you need limited communication, you can use postMessage to >> communicate >>>> between the two apps. >>>> >>>> https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage >>>> >>>>> On Nov 25, 2021, at 1:29 AM, GAbe Barbosa <gbarbosa...@gmail.com> >> wrote: >>>>> >>>>> Hi royale folks, >>>>> >>>>> I've tried using mx:Modules with no success. I'm trying to come up with >>>> an >>>>> alternative solution and need help. >>>>> >>>>> How would you launch/load an application from the currently running >>>>> application at runtime. Ensuring I don't get any duplicate deps is a >>>> whole >>>>> other problem, so don't worry about that for now. >>>>> >>>>> Will be grateful for any ideas, suggestions. Thank you! >>>> >>>> >> >>