Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving the Eclipse project into a directory #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srdjanrosic
Copy link

Hi,

I want to factor out the simple remote / event client code into it's own app that would be smaller, simpler, and easier to build and maintain (think of XBMC Remote lite).

Standard android way of doing that is to create 3 separate android "projects", one that would be an android library and would contain shared resources and base class sources, and another two, one for each app => hence the move of the app into a directory, so that other xbmc remote apps that share resources and sources could also be tracked within the same repository (ie. there might be a dedicated tablet app in the future).

Thanks,
-s

@freezy
Copy link
Owner

freezy commented Aug 13, 2011

Hi,

Thanks for this pull request. Generally I think it's a good idea to separate code. In your commit 37b386a, what you did was move everything to a subfolder named "XBMC Remote", right? I don't see any further separation, there still seems to be one single project (correct me if I'm wrong).

Could you explain to me how you would separate the code? Also, please avoid spaces in folders.

@srdjanrosic
Copy link
Author

avoid spaces .. DONE

I already have a functioning work in progress code here:

https://github.com/srdjanrosic/android-xbmcremote/tree/refactoring-wip

There are a couple of things that don't look pretty, there are a couple of things that don't look pretty, but I think there are some solutions to those.

A major problem is the HostProvider, as far as I could see there's no clean way to share host providers unless you're willing to redirect users to download a HostProvider apk from the market separately ... if not, then you got to go with two, which means every single thing that touches these has to somehow be factored out.

TODO: (could be filed as issues maybe)

  • Fix graphics, the -lite app needs an icon, and there are currently no sources for any of the resource PNGs, these were in the svn sources, and they could be on github but they should probably be separately licensed since GPL doesn't really cover artwork (at least from what I heard, IANAL)
  • The way I did it in this branch there is the standard GoF design patterns (no fancy reflection stuff or anything) that could be used to simplify things, it would be good if that was fixed to utilize some class magic maybe so that we could get rid of at least some of the factory methods.
  • I'm also not sure what kind of style guide the code follows. Android style or .. ? It would be good if there was a STYLE.md or something like that specifying it and maybe an eclipse set of rules to follow.
  • It's lacking a way to build a project outside of eclipse - which is very useful if any kind of unit tests are going to end up getting written for automated testing and such. Also if we're considering maven for that kind of thing, by using it we could just pull in deps such as jackson and other stuff from the web without having to store their code in our repo. Once the automated builds / tests are in, people could start hacking on the code more freely, since it'll be easy to test for functionality and that alone should make merging from master->release and versioning much quicker and easier, the project could have a new build up on the market with new functionality twice a week - provided new code holds to the same standard. This also rids us of bad code.

Anyway that was a list of what I saw needing to be done. I'll try to continue to merge and rebase until you decide whether you want to go down this road.

Thanks.

@srdjanrosic srdjanrosic reopened this Aug 14, 2011
@freezy
Copy link
Owner

freezy commented Aug 15, 2011

Okay, so a few questions from my side:

  1. If I get this correctly, your "lite" version contains only lowres graphics?
  2. What's the problem with moving the host provider to the lib?
  3. What's the GoF design pattern?

About your remarks:

  • You should be able to find most graphics here, including the icon.
  • Code style should be Android code style. Of course, having multiple authors for this project doesn't help concerning this issue. If you see weird styling, let me know.
  • We're using Maven at work for an Android project of similar structure, so my guess is that it should work. However, it wasn't me who set it up, so I can't be for sure.

@freezy
Copy link
Owner

freezy commented Aug 15, 2011

Oh, one thing I forgot. How about this structure:

  • app
  • app-lite
  • library (or common?)

That was I meant by "no spaces" actually :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants