the-blue-alliance / the-blue-alliance-android

An Android app for accessing information about the FIRST Robotics Competition.
MIT License
78 stars 35 forks source link

New App Structure #366

Closed phil-lopreiato closed 9 years ago

phil-lopreiato commented 9 years ago

WANT TO HELP REWRITE THE APP?

See https://github.com/the-blue-alliance/the-blue-alliance-android/issues/366#issuecomment-108135342


This ties in with #330 - we should really do a global rewrite this offseason to make the whole app cleaner, simpler, and testable.

I'm thinking that I want to take a similar approach to this sample app: https://github.com/tehmou/rx-android-architecture but use rxandroid, which has some special android features. This example does a very good job of decoupling data loads from actually displaying the content, which I like.

We're probably also going to want to cave and make a content provider for all the underlying data.

nwalters512 commented 9 years ago

I've worked with content providers, and they're kind of a mess. I like our custom data layer a lot better for this particular application; if we add I'm a subscribe/update mechanism, it should be suitable for use in a structure like this.

I completely agree that we should rewrite a lot of the app.

phil-lopreiato commented 9 years ago

Some other things I want to use after our full rewrite:

Adam8234 commented 9 years ago

Is there any UX we would like to change or improve with this rewrite?

On Tue, Jun 2, 2015 at 12:18 PM Phil Lopreiato notifications@github.com wrote:

Some other things I want to use after our full rewrite:

  • Dagger http://square.github.io/dagger/ for dependency injection. This makes it easy for classes to depend on others, and encourages separating code into things that are easily testable
  • Mockito http://mockito.org/ for test-level mocking. This means we define static outputs for a class's dependencies, meaning we can test each class in isolation. Very important.
  • When the code is structured better, improve instrumentation testing with robolectric

— Reply to this email directly or view it on GitHub https://github.com/the-blue-alliance/the-blue-alliance-android/issues/366#issuecomment-108021967 .

phil-lopreiato commented 9 years ago

Oh, that's what I forgot...

The main UX change is going to be migrating to the new Data Binding Library. The current plan is to have most of the rewrites be under the hood changes with no visual difference, save some minor improvements.

Is there any part of UX that requires a major rewrite in your opinion?

Adam8234 commented 9 years ago

Ah Yes! Data Binding! It looks really cool. But with some playing around with it. It would only help to remove a ton of Id's and provide less under the hood programming with setting views. :)

I thought about having insights. Not really UX, but it'd be consistent with the website. We could use WilliamChart for charting # of matches, etc. Cards for Most Blue Banners etc.

Have we thought about using the Android Support Design Library? It has lots of cool stuff. FAB, Navigation Drawer with Scrim, Tabs, and the App Bar Layout, which helps a lot with scrolling techniques with the Toolbar.

nwalters512 commented 9 years ago

I had looked at the DSL, and were we starting from scratch, we'd definitely make greater use of it. However, what we have works and looks very good, and I don't feel the need to fix what ain't broke. I'd love to make use of some of the more fancy Toolbar stuff, but we don't have enough imagery for the huge header views to make sense.

nwalters512 commented 9 years ago

Insights is definitely something we should work on - designing an API to serve up data that would let us render charts and stuff client-side shouldn't be too hard. I'm pretty sure that was part of the discussions about API v3.

Adam8234 commented 9 years ago

Yep, I understand. Do you think that a preliminary UI would be worth while until API v3 is ready to ship? Do you want a separate issue for discussing layout for insights?

nwalters512 commented 9 years ago

Yeah, a new issue is probably best.

phil-lopreiato commented 9 years ago

Agreed - ideally, the rewrite should just be about code quality and simplicity. We get the data model redone to be equivalent but better, then work on a richer feature set.

Of course, in reality, the dependencies might be a little more complicated

phil-lopreiato commented 9 years ago

Anybody who wants to help

I've made a few issues and they're tagged with this milestone. If you want to work on a piece, comment to claim. You can see some of our planning thoughts here.

Make sure that all changed classes are unit tested as much as possible. We should move away from global/created dependencies and instead inject them (it'll really simplify things). See https://github.com/the-blue-alliance/the-blue-alliance-android/issues/366#issuecomment-108021967