Code bases for desktop and mobile versions of the same app
Posted
by
Code-Guru
on Programmers
See other posts from Programmers
or by Code-Guru
Published on 2012-09-11T17:55:53Z
Indexed on
2012/09/11
21:48 UTC
Read the original article
Hit count: 648
I have written a small Java Swing desktop application. It seems like a natural step to port it to Android since I am interested in learning how to program for that platform. I believe that I can reuse some of my existing code base. (Of course, exactly how much reuse I can get out of it will only be determined as I start coding the Android app.)
Currently I am hosting my Java Swing app on Sourceforge.net and use Git for version control. As I start creating the Android app, I am considering two options:
Add the Android code to my existing repository, creating separate directories and Java packages for the Android-specific code and resources.
Create a new Sourceforge project (or even host a new one) and creating a new Git repository.
a. With a new repository, I can simply add the files from my original project that I will reuse. (I don't particularly like this option as it will be difficult to modify both copies of the same file in both repositories.)
b. Or I can branch the original repository. This adds the difficulty of merging changes of shared source files.
Mostly I am trying to decide between choices 1. and 2b. If I'm going to branch the existing repository, what advantages are there to hosting it as a separate SF project (or even using another OSS hosting service) as opposed to keeping all my source code in the current SF project?
© Programmers or respective owner