Hi
I've got a bit complicated app and I'm not sure if I designed connections in proper/best way.
I'm building an app which is supposed to work both on desktop (air) and on web (flash builder). Since I don't want to develop 2 separate applications I'm trying to find a way to develop both of them with mostly one code.
So I've created 3 projects in Flash Builder:
- projectCD (air project) - connects to sqlite db and do some minor stuff
- projectWWW (flash project) - connets to mysql db do some other minor stuff
- projectMain (flash project) - main code for both applications
(projectMain is type of flash project, but it doesn't matter since I don't run it directly, only through CD or WWW projects)
Connection between projects is through the src folder of projectMain. In settings of projectCD and projectWWW I added src folder of projectMain to the source path. So every file/class in projectMain is available in both CD and WWW applications. So now I just need to write code in just one project - projectMain to have changes in both CD and WWW apps.
What's more in projectMain I got around 15 modules which are supposed to load dynamically on user click. To have modules available I had to add output folder of projectMain to the source folders of projectWWW and projectCD.
Furthermore projects are using some graphics in .swc files. Some of them I need to use in projectCD or projectWWW so they need to be put in the projectCD and projectWWW libs folders, because when put in projectMain libs folder I can't see them. In the end I got some of them added to projectCD libs folder and projectWWW libs folder, and others in projectMain libs folder.
My solution works for now, but I'm not sure if it's the best way of achieving my goal. I'm confused that I have to add src folder and output folder of projectMain to source paths of WWW and CD. And about splitting .swc graphics between projects instead of keeeping them all together.
I'm reading now about Runtime Shared Library. Will it be any easier if I make my projectMain a Library project and share it's swc output? Or is there any other way of designing such applications? Maybe someone has experience with these kind of connections between projects and would like to share it?