What we've worked on / What we intend to keep doing

2 views
Skip to first unread message

Jeremy

unread,
Jan 23, 2010, 3:21:11 PM1/23/10
to We Have, We Need Android
I thought it would be best if we could start a discussion explaining
what we've done and what we're working on at this stage:

So far I've created simple listviews that describe the categories of
needs that exist, and create a second list that will in theory display
the list of items available. I intend to continue integrating the
various portions into this UI.

Robotica

unread,
Jan 23, 2010, 3:33:55 PM1/23/10
to we-have-we-...@googlegroups.com
I have in my local an Activity that theoretically displays the detail
view, based on an extra Bundle with the name "detail_json". I'll
check in as soon as I can confirm that it does what I think it does
and figure out git. :)

--
ninjaneer. geomancer. licensed scientician.

http://www.thesepythonsaresick.com/

Robotica

unread,
Jan 23, 2010, 10:11:04 PM1/23/10
to we-have-we-...@googlegroups.com
Okay, just checked that in. Word to the wise: There's a bug in
eclipse where if you have the xml manifest open in the editor and then
you try to compile, it will compile the xml rather than the actual
source.

Jp

unread,
Jan 24, 2010, 7:29:26 AM1/24/10
to We Have, We Need Android
I've got the schema and the sqlite db; I was going to start work on
the db routines, etc... but the big thing is do we want to go with a
database or not.

On the plus side, that gives us a way to add/remove categories,
priorities, etc... from the server if they change.
On the minus side, it could be overkill if we can just save the json
objects locally to burst up/down as soon as coverage comes back.

I'm okay either way, but I'd rather work on something that we're going
to use.

-J

On Jan 23, 10:11 pm, Robotica <androidqu...@gmail.com> wrote:
> Okay, just checked that in.  Word to the wise:  There's a bug in
> eclipse where if you have the xml manifest open in the editor and then
> you try to compile, it will compile the xml rather than the actual
> source.
>
>
>
>
>
> On Sat, Jan 23, 2010 at 3:33 PM, Robotica <androidqu...@gmail.com> wrote:
> > I have in my local an Activity that theoretically displays the detail
> > view, based on an extra Bundle with the name "detail_json".  I'll
> > check in as soon as I can confirm that it does what I think it does
> > and figure out git.  :)
>

jeremy freeman

unread,
Jan 24, 2010, 9:47:34 AM1/24/10
to we-have-we-...@googlegroups.com
Hi JP,
Please feel free to correct my assumptions, but I'm thinking having
the data in a local DB would be beneficial as the size of the
downloaded data set grows, as I imagine it's going to do a much better
job of handling local data than anything we have time to write. I'm
thinking we can locally cache the outgoing queries that failed while
simultaneously keeping the data we got downloaded in the local DB. At
the same time, I'm hesitant to get behind you spending a ton of time
working on this until we know how much further participation we can
expect; I'd hate to see you dedicate a ton of your valuable time only
to have it go to waste due to the rest of the project remaining
stagnant.

Thoughts? Anyone else?

-Jeremy

Robotica

unread,
Jan 24, 2010, 2:49:17 PM1/24/10
to we-have-we-...@googlegroups.com
I don't know. Looks like the number of posts has about doubled
(meaning there are approximately 10), but frankly, while they're still
making posting only available to people with accounts I think it's
going to be slow. That said, Whoopi Goldberg pointed people to the
site on her blog yesterday, and I kind of suspect that once they add
captcha or something to open up posting, it'll get pretty big.

Knowing very little about Android programming, I'm not sure what a
better way to save these objects would be other than a database.

Also, I just checked in my code for realz instead of just committing
to my local clone. ;)

Also, also, is someone working on plugging the query code into the UI?

jeremy freeman

unread,
Jan 24, 2010, 3:13:58 PM1/24/10
to we-have-we-...@googlegroups.com
I plan on doing some work on that today/tonight and will update with
my progress or lackthereof

Robotica

unread,
Jan 24, 2010, 4:36:43 PM1/24/10
to we-have-we-...@googlegroups.com
Coolio. I recommend that we change the type of the Query member
"response" to string, as it looks like the ItemList wants that to be a
JSONArray and ItemDetail wants it to be a JSONObject, and I don't see
any reason not to leave the Query class agnostic.

Ranjit Chacko

unread,
Jan 24, 2010, 5:30:02 PM1/24/10
to we-have-we-...@googlegroups.com
I've got a possibly naive question about using a database.

If all we're doing is displaying the locally cached results as is then
is there really an advantage to using a database as opposed to saving
the json directly to a file? If the app is going to let the user sort
or filter the locally cached results though then I would think the
database becomes preferable. Is that right?

Agreed on the agnosticism of the Query object.

JP LaFond

unread,
Jan 24, 2010, 10:35:50 PM1/24/10
to we-have-we-...@googlegroups.com
I don't think that's naive at all. That's pretty much the issue in a nutshell - how far do we want to go with this.
I think there's enough ideas on how to use a database that writing the routines and schema certainly isn't a wasted effort.

Ranjit Chacko

unread,
Jan 25, 2010, 10:01:52 AM1/25/10
to we-have-we-...@googlegroups.com
Do you have a sense of how big of a database a typical phone can handle? I'm guessing it won't be a problem, but I don't have a feel for the numbers. 

And should we worry about how big that json file might get? If it takes a long time to download then the application might hang right?

Robotica

unread,
Jan 25, 2010, 10:08:03 AM1/25/10
to we-have-we-...@googlegroups.com
It seems like a good idea to put a timeout in the putQuery method.

Eric Mill

unread,
Jan 25, 2010, 11:25:57 AM1/25/10
to We Have, We Need Android
I would recommend against the complexity of adding a database right
away, and keeping everything synched, etc. The site's just returning
JSON that's quick to download and easy to parse. I've put up a couple
apps on the Market now that refresh their list activity from the
network, from a JSON feed, and having the user wait a second or two as
a spinner dialog pops up has not been a problem. It'll keep your code
a lot simpler.

Doing network activity in the background, and managing a dialog,
especially across screen flips, is actually more tricky to figure out
than you would expect. But I've done it enough now that I could
pretty easily contribute code to do that, using the best practices
I've developed.

Here's an example of an Activity that fetches a list of news items
from the Yahoo! News JSON API based on a search term, displays a
loading dialog while it's doing so, and uses a custom list adapter to
display different pieces from each news item. The actual JSON parsing
code is in a different class, but that's not the interesting work
here. It handles screen flips gracefully by storing the background
task in a holder object that you can preserve between screen flips,
and then makes sure to update the task object's pointer to its parent
context to the newly created one. (Screen flips destroy and recreate
an activity, so you have a whole new context.)

http://github.com/sunlightlabs/congress/blob/master/src/com/sunlightlabs/android/congress/LegislatorNews.java

My apologies for the awful indenting when displayed in Github - in
Eclipse it's perfectly fine.

-- Eric


On Jan 25, 10:08 am, Robotica <androidqu...@gmail.com> wrote:
> It seems like a good idea to put a timeout in the putQuery method.
>
>
>
>
>
> On Mon, Jan 25, 2010 at 10:01 AM, Ranjit Chacko <rjcha...@gmail.com> wrote:
> > Do you have a sense of how big of a database a typical phone can handle? I'm
> > guessing it won't be a problem, but I don't have a feel for the numbers.
> > And should we worry about how big that json file might get? If it takes a
> > long time to download then the application might hang right?
>

> > On Sun, Jan 24, 2010 at 10:35 PM, JP LaFond <jp.laf...@gmail.com> wrote:
>
> >> I don't think that's naive at all. That's pretty much the issue in a
> >> nutshell - how far do we want to go with this.
> >> I think there's enough ideas on how to use a database that writing the
> >> routines and schema certainly isn't a wasted effort.
>

> >> On Sun, Jan 24, 2010 at 5:30 PM, Ranjit Chacko <rjcha...@gmail.com> wrote:
>
> >>> I've got a possibly naive question about using a database.
>
> >>> If all we're doing is displaying the locally cached results as is then is
> >>> there really an advantage to using a database as opposed to saving the json
> >>> directly to a file? If the app is going to let the user sort or filter the
> >>> locally cached results though then I would think the database becomes
> >>> preferable. Is that right?
>
> >>> Agreed on the agnosticism of the Query object.
>
> >>> On Jan 24, 2010, at 1/24/10 4:36 PM, Robotica wrote:
>
> >>>> Coolio.  I recommend that we change the type of the Query member
> >>>> "response" to string, as it looks like the ItemList wants that to be a
> >>>> JSONArray and ItemDetail wants it to be a JSONObject, and I don't see
> >>>> any reason not to leave the Query class agnostic.
>
> >>>> On Sun, Jan 24, 2010 at 3:13 PM, jeremy freeman
> >>>> <jeremy.free...@gmail.com> wrote:
>
> >>>>> I plan on doing some work on that today/tonight and will update with
> >>>>> my progress or lackthereof
>

> >>>>> On Sun, Jan 24, 2010 at 2:49 PM, Robotica <androidqu...@gmail.com>

Robotica

unread,
Jan 25, 2010, 11:34:37 AM1/25/10
to we-have-we-...@googlegroups.com
Guys, this is Eric. He writes Android apps and he was involved with
the website (right?). Say hi!

I'm planning on putting a couple of hours into this tonight. Will
anybody be in the IRC room? (irc.freenode.net/ccandroid) I tend to
find IM group chat to be a better way to communicate than email.

Eric Mill

unread,
Jan 25, 2010, 11:59:31 AM1/25/10
to we-have-we-...@googlegroups.com
Oh, er, yeah, I should have introduced myself. I'm not a contributor
to the website, but my coworker across the room from me, Jeremy
Carbaugh, is the primary developer behind it, and I made some
contributions to a Titanium-based app on the first CrisisCamp in DC.

I wanted to do a native Android app for it at that time, and maybe I
should have gone with my gut and did it, but I had 4 teammates who all
knew Titanium, and the point of the day was to set one's ego aside, so
I went with that instead. Now that WHWN is up and running and the
website has demonstrated that it has inertia, I'd like to help with a
native app for it.

I'm totally available to meet up in your IRC room tonight and talk
about stuff. The main WHWN website team has a thriving Google Group
of their own at http://groups.google.com/group/wehave_weneed, and I
think the dev team has an IRC room of their own as well. While it's
useful to have spaces for Android-specific development, I think you
guys would benefit from being a part of their spaces as well.

I'm happy to come by the IRC room tonight if you guys'll be around.

-- Eric

Robotica

unread,
Jan 25, 2010, 1:47:14 PM1/25/10
to we-have-we-...@googlegroups.com
I'm on the Google Group (looks like we'll have to add Volunteer to the
categories!), but I'm too weirded out by the presence of Eric Miller.

JP LaFond

unread,
Jan 25, 2010, 2:16:12 PM1/25/10
to we-have-we-...@googlegroups.com
Database plans dropped. Thanks for the advice.
Jeremy, what would you like worked on?

Eric Mill

unread,
Jan 25, 2010, 2:50:46 PM1/25/10
to we-have-we-...@googlegroups.com
Sorry, my coworker's name is Jeremy Carbaugh, I'm Eric Mill (my
grammar before was confusing). Jeremy runs the website.

I just lobbied on the main WHWN list to allow posting without
authenticating, and Katie from the State Dept is on board with it, and
so is Jeremy, so I feel tentatively confident that that's gonna
happen.
http://groups.google.com/group/wehave_weneed/browse_thread/thread/171e8ebe5aff51ab

My proposed order of features would be:

1) A tabbed list activity, with lists for: new haves, new needs, in
the order returned by the API, from all categories.
2) Add a tab to let someone make new posts, anonymously. Capture the
lat/long from the phone if it's known.
3) Add support for replies to existing posts.
4) Add support for user accounts, and tie new posts/replies to the
user's account.
5) Add support for scoping the haves/needs lists to specific categories.

What do you guys think about that? I could probably bang out #1
tonight - at this point I've done so many JSON-backed custom lists
that poll from the network while hosting a popup dialog that I think I
could do it in my sleep. Setting up the tabs is pretty
straightforward too.

-- Eric

Jeremy Carbaugh

unread,
Jan 25, 2010, 2:57:30 PM1/25/10
to we-have-we-...@googlegroups.com
Hi there,

I did much of the initial setup of the web app. Michael Stephens has
done a lot of work since then and Alan Viars is running the production
boxes and managing the master repo.

I've spoken with Eric about changes that we will need to make on the
web side so I'll take care of getting those done.

Jeremy

Robotica

unread,
Jan 25, 2010, 2:59:51 PM1/25/10
to we-have-we-...@googlegroups.com
We've already got 5). That's where we started.

On Mon, Jan 25, 2010 at 2:50 PM, Eric Mill <kproj...@gmail.com> wrote:

Eric Mill

unread,
Jan 25, 2010, 8:59:10 PM1/25/10
to We Have, We Need Android
I'm on the IRC room now, chilling out.

-- Eric

> >http://github.com/sunlightlabs/congress/blob/master/src/com/sunlightl...

Reply all
Reply to author
Forward
0 new messages