Office Hours — Today, July 15

Tuesday, July 13

Mark M.
has entered the room
Mark M.
turned on guest access
Jul 15
8:05 PM
Brian C.
has entered the room
Mark M.
howdy, Brian!
Brian C.
Hi, Mark.
I have a question about the Application class
Mark M.
um, OK
Brian C.
In iPhone development, it is common to have a bunch of methods attached to the AppDelegate class
doesn't seem like that is very common in Android development
Mark M.
I'm not sure what role AppDelegate plays, as I'm not an iPhone developer
Brian C.
but I've also read and heard that it is a good place to stick global stuff
Mark M.
it is certainly a candidate
Brian C.
oh, it's kind of like the Application class. It has a couple of callbacks and you can get a reference to it elsewhere in the app
Mark M.
Dianne Hackborn is on record as saying using a custom Application class is not much better than using static data members
8:10 PM
Brian C.
anyway, is it a bad idea to put methods on the Application class and then call them from an Activity to manipulate global data?
Mark M.
I've used a custom Application class in a production app, and the results were so-so
it's not a bad idea per se
I would be a bit nervous about using Application as a Context, though
lots of people get bit by problems there
so long as you are treating Application as just some magically-created singleton, I don't think there's any particular problems
Brian C.
OK, I might be conflating with Contexts. I recalled there was an issue there.
with Application versus Activity context I mean
Mark M.
Activity and Service are each subclasses of Context and tend to be better choices when you need a Context
besides, you only get an Application by way of some other Context (e.g., getApplication())
Brian C.
OK. Thanks, that helps a bit
8:15 PM
Mark M.
any other questions?
Mark J.
has entered the room
Mark M.
howdy, Mark J!
Mark J.
Heya :)
Mark M.
it's your turn -- got a question?
Mark J.
Not at the moment :) Just hanging out
Mark M.
OK
Mark J.
Oh by the way. You were correct in suggesting my SQLite for my "Checklist" I am working on. I looked into the sdk "Notes" example, it was also what they used.
8:20 PM
Mark J.
Or actually it was titled Notepad
8:20 PM
Mark M.
yes
it's fairly simple to use
Mark J.
seems to be, I started reading through the book about it. Haven't gotten much work on it yet though.
8:40 PM
Brian C.
has left the room
8:45 PM
Mark M.
Zzzzzzzzzzzzzzzzzzzzzzz...
8:55 PM
Mark M.
well, any questions before I close down this office hour?
ok, well, then, have a pleasant evening!
9:00 PM
Mark J.
has left the room
9:00 PM
Mark M.
turned off guest access

Tuesday, July 13

 

Office Hours

People in this transcript

  • Brian Cooley
  • Mark Johnston
  • Mark Murphy