Multiple Projects one Source
Asked Answered
N

4

6

We have a program that we wish to deploy across multiple devices.

  • Standalone Captive AIR
  • Web based flash app
  • iOS app
  • Android app

The code other than some UI stuff is identical in a lot of parts. I'm wondering what's the best approach. Should we have a shared library project or should we have one big project with different complier settings controlled through ant or some other method.

Neurath answered 15/5, 2012 at 11:31 Comment(0)
P
3

Accessing and using Shared Library Project is the best way to be implemented for cross platform Projects. Other than this Approach you can use ant Build.

Parapet answered 15/5, 2012 at 11:34 Comment(1)
I think this is the best solutionNeurath
R
2

The answer would ordinarily have a lot to do with the "UI stuff" that's different, but since it sounds like you're Flash/AIR, that's probably not a big concern. If it were me, I would go w/ the "one big project" approach, and get a serious CI/NI and SCM suite that was compatible w/ my IDE. If you're using Eclipse/Aptana, I like Husdon/Surround. (Full disclosure: I used to work @ Seapine.) If you're not using Eclipse, you should check out the CI/SCM options that integrate w/ your IDE (and themselves; e.g., Hudson has a Surround module and vice versa). The shared library thing works, but since Flash is Flash darn near everywhere, I don't see the need for the increased division of separate projects. A full-featured CI can manage the compiler differences for you quite effectively.

Racy answered 21/5, 2012 at 14:34 Comment(0)
F
1

We're using this combination of approaches for a large scale mobile/web project that currently exists in the IOS AppStore, and will soon be released on Android and the web:

  • One main project that uses compiler directives to handle specific platform logic and elements
  • Compiler directives to handle specific platform logic within the main project codebase
  • A separate project for our video and interactivity engine, which is mostly platform independent, using switch statements for platform specific logic
  • One shared SWC for graphical assets. Platform specific elements are prefixed with the platform and an underscore. Compiler directives are used to specify which movieclips get displayed on screen
  • Ant scripts to do the compiling for the various platforms
  • Native Extensions to interface with hardware specific features

We use some commercial, some open source, and some homemade ANE's for things like AppStore integration, social media features, network monitoring, notifications and inter-app communications.

  • com.adobe.extension.NetworkInfo.ane
  • com.milkmangames.extensions.EasyPush.ane
  • com.milkmangames.extensions.GoViral.ane
  • com.milkmangames.extensions.StoreKit.ane

(I have no affiliation with milkmangames)

I'm currently writing an Android ANE to handle inter-app communication using Intents. It's a project I'm open sourcing at:

https://github.com/interactivenyc/ANESampleProject.

I'm currently stuck on a problem there and will be posting a question very soon with the details if anyone is interested in following that project. The project setup is fairly well described in the ReadMe file displayed on the front page of the project.

Feeding answered 7/10, 2013 at 14:59 Comment(0)
C
0

If you use git for versioning take a look at submodules. I used it to keep everything in one project, but versioning each module separately, and it resulted a fine solution.

Confessedly answered 7/10, 2013 at 15:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.