Re: [android-developers] Re: Adapter fetches and parses RSS feed to get data - best practice?

2010-12-08 Thread TreKing
This:

Many an atrocity has been committed in the name of best practices, object
 oriented design, design patterns, et al.  (Not to mention performance.)
  Any time someone's throwing around buzzwords like that I tend to run the
 other direction.


Followed by this:


 Ultimately, the only criteria for good code is that it works, it does the
 required job in a timely fashion, without excessive use of resources, it's
 reliable, it's maintainable, and it was written with a reasonable amount of
 effort and expenditure.


Is funny. As if you're going to end up with the latter without any
application of any of the former. =)

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Adapter fetches and parses RSS feed to get data - best practice?

2010-12-08 Thread Frank Weiss
I tend to agree with DanH as well as with Treking. Here's how I can agree
with both:

Best practices, object oriented design, design patterns,
performance, all tend to become *anti-patterns* when used to extreme. For
example, using a Singleton Pattern is considered a best practice by some
developers, but they sometimes fail to understand when and where to apply
it, creating unnecessary code. I think this is called the Golden Hammer
Anti-pattern, to wit: thinking that a particular pattern or technique is
universally applicable.

my $0.02

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Adapter fetches and parses RSS feed to get data - best practice?

2010-12-07 Thread DanH
Many an atrocity has been committed in the name of best practices,
object oriented design, design patterns, et al.  (Not to mention
performance.)  Any time someone's throwing around buzzwords like
that I tend to run the other direction.

Ultimately, the only criteria for good code is that it works, it does
the required job in a timely fashion, without excessive use of
resources, it's reliable, it's maintainable, and it was written with a
reasonable amount of effort and expenditure.  Any code that
accomplishes those goals is good code.  Any that doesn't isn't, no
matter how high-falutin' the technology is.

On Dec 5, 9:49 am, jim jcant...@gmail.com wrote:
 In a shared project, we have an Adapter class (extends BaseAdapter,
 implements ListAdapter).  In its constructor, this class fetches an
 RSS feed from the internet and parses the returned XML document to
 obtain the data it will 'adapt'; the data is kept in a private class
 variable.
 This is seen as the Android way of doing things by the author and is
 supported by the project lead.
 Can this be considered a Best Practice?
 Can it be justified on the grounds that it (may?) increase
 performance?
 Doesn't it violate the general Object Oriented Design (OOD) principle
 that a class should have only a Single Responsiblity?
 Are best practices for OOD or Java to be set aside in Android
 development?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en