Sep 3 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Luca L. | has entered the room |
Mark M. |
hello, Luca!
|
Mark M. |
how can I help you today?"
|
Luca L. |
Hi!
|
Luca L. |
Can you take a look to my stackoverflow question?
|
Luca L. | |
Mark M. |
OK, give me a moment to read that
|
Luca L. |
ok thank you
|
Sep 3 | 4:00 PM |
Mark M. |
some of the complexity you attribute to CursorAdapter is your own doing
|
Mark M. |
the whole HashSet stuff is not a general requirement
|
Mark M. |
beyond that, I do not see a problem with either approach
|
Mark M. |
BTW, I'm the close vote on that question, because StackOverflow explicitly is *not* about soliciting opinions
|
Mark M. |
had you phrased it as "are there other pros or cons that I should consider", that would have been better
|
Mark M. |
as to which to choose, if deletes are common and the data set is small, POJOs seem fine
|
Mark M. |
if deletes are uncommon, converting the data into POJOs may not be that beneficial
|
Sep 3 | 4:05 PM |
Mark M. |
and if the data set is large, Cursors (via
CursorWindow) support larger data sets transparently; an ArrayList or
something of POJOs will not
|
Luca L. |
but when i have to do some update/delete with
pojos i can udirectly update my data without respawn a task and requery
the database
|
Mark M. |
again, it's a matter of how common those are
|
Mark M. |
if they are common, that's an advantage of POJOs
|
Mark M. |
those operations are not necessarily common, or even possible (e.g., data is sync'd from some other source)
|
Sep 3 | 4:10 PM |
Luca L. |
i have understand, even with database driven data
there are pros and cons with both approaches like Cursor is better with
large datasets but need requery, pojos doesn't need requery and can be
easly manipulated but they add memory and initialization overhead
|
Mark M. |
precisely
|
Luca L. |
it all depends on the dataset size and what kind of operation the user can do
|
Mark M. |
at least -- there may be other criteria worth considering as well (e.g., are you using an ORM for database access?)
|
Luca L. |
i have seen some orm but i prefer to use sqlite with raw sql with cursors and pojos when i need
|
Sep 3 | 4:15 PM |
Mark M. |
if you have additional questions, feel free to ask -- it's a quiet chat room today :-)
|
Luca L. |
ok
|
Luca L. |
when i need to execute a sql update on a user
animated action (swipe to dismiss or similar) i have to wrap it in a
"fire and forget" AsyncTask or there are better alternatives?
|
Mark M. |
that's a reasonable choice
|
Sep 3 | 4:20 PM |
Luca L. |
do you have some advice to fight app piracy? i'm planning to realase an app with advertising and in-app billing
|
Mark M. |
my long-standing advice is: don't worry too much about it
|
Sep 3 | 4:25 PM |
Mark M. |
follow best practices as documented by the in-app purchasing and LVL docs
|
Mark M. |
but beyond that, focus instead on how you are going to market your app and making the app compelling for prospective users
|
Mark M. |
the most powerful tool out there right now to try
to prevent cracking is DexGuard, and I can think of a few ways to
subvert it too, if I had the inclination
|
Mark M. |
(besides, DexGuard is not cheap)
|
Sep 3 | 4:30 PM |
Luca L. |
even if dexguard can be subverted anyway, it discourages less experienced hackers?
|
Mark M. |
correct
|
Mark M. |
anyone with sufficient time and talent can get past it
|
Mark M. |
so, somebody specifically interested in cracking your app probably will do so
|
Mark M. |
if, OTOH, you are merely a "target of opportunity", they may move onto easier prey
|
Luca L. |
i see that the price is not very high, i think that another level of protection never hurts
|
Mark M. |
I suppose it all depends on how much you spend for tools -- I am used to developers panicking with a $795 price tag :-)
|
Sep 3 | 4:35 PM |
Luca L. |
my company is mainly focused on ios, we are
approaching for the first time to this world and we are a bit scared of
piracy and api fragmentation :P
|
Mark M. |
with regards to piracy: every hour you spend on
anti-piracy engineering is an hour you are *not* spending delighting
your paying customers
|
Luca L. |
true story :/
|
Sep 3 | 4:40 PM |
Luca L. |
thank you very much for your help, i'm a noob so expect further talking in the future :D
|
Mark M. |
happy to be useful
|
Mark M. |
BTW, the next book update should be released in the next couple of hours, barring problems
|
Mark M. |
so, be sure to refresh your Warescription page and download the update when it becomes available
|
Luca L. |
ok thank you, i think that your book is the bible of android development
|
Mark M. |
thanks!
|
Luca L. |
bye!
|
Sep 3 | 5:00 PM |
Mark M. |
that's a wrap for today's office hours chat
|
Mark M. |
the next chat is tomorrow, 10am Eastern
|
Luca L. | has left the room |
Mark M. |
the transcript for today's chat will appear at http://commonsware.com/office-hours/ shortly
|
Mark M. |
have a pleasant day!
|
Mark M. | turned off guest access |