Marc -
Great information!
You've exposed a significant portion of my article as incorrect, and
based on my limited knowledge of the Android platform. That's exactly
what I asked for. ;)
If you don't mind, I'll modify the article accordingly, and point to
your message for further information...unless you put it in a blog
article, then I'll point to that (hint, hint). ;)
I would still be curious, though...
* Regarding Android's anti-duplication measures that you mentioned,
have you had the need to use them, and if you've used them, how well
implemented are they? Is using them straightforward and intuitive?
* Do GUI builders support these reusable components?
* Do you have any feedback about using XML as a programming language?
* In your experience, observation, or expectations, how likely is it
that development teams would actually use these features to avoid
duplication? My observations about Java Swing were that many
developers continued imitating approaches shown in oversimplified
example code way beyond their appropriate use; if this is also true
among Android developers, then these features might not be used (of
course, it would be unfair to blame the framework for this). While a
developer can similarly abuse Java (or Ruby) code, duplicating things
that could be extracted into a single place, developers are more
accustomed to eliminating duplication in source code than in
configuration files -- therefore my contention that using a
programming language rather than a configuration language would result
in less duplication.
Cheers,
Keith
On May 28, 11:09 pm, Marc Lester Tan <
mail...@gmail.com> wrote:
> Hi Keith,
>
> Nice article there. Do note that there are several ways of preventing
> copy/paste nightmare when developing android UI. You can use themes and
> styles to move out all of the repeating style properties in your components
> to a single xml. You can also use the <include> tag to reuse certain layouts
> (for example, header or navigation bar) and the latest ADT 11 provides
> visual refactoring where you can extract styles as well as generate includes
> automatically from selected layout container.
>
>
http://www.youtube.com/watch?v=Oq05KqjXTvs&feature=player_profilepage...
>
> In the code, you can always inflate any xml layout and attach it to where
> ever you want. That gives you the ability to provide consistent L&F like for
> example, rows in your ListView or to layout your dialogs.
>
> Another way of preventing code duplication is to use Library Project:
>
>
http://developer.android.com/guide/developing/projects/index.html
>
> This is often used when creating paid and free versions of your app. So you
> define the common stuff of your app in the library such as the UI, styles
> and logic and then just override those when writing the normal Android
> project that uses the library you created. In this way, you will only have
> single code base for two different versions of your app preventing code
> duplication and putting several checks in your code for checking paid or
> free version.
>
> --
> Cheers,
>
> *Marc Lester Tan *
>
> Singapore #:
+6597896575
>
> http://www.appalert.cohttp://www.appcellar.comhttp://moonphase.pendukosoftware.comhttp://
blogs.marctan.com
>
> <
http://www.proudlypinoy.org/>
>
> On Sun, May 29, 2011 at 10:33 AM, Keith Bennett <
keithrbenn...@gmail.com>wrote:
>
>
>
> > Hi, everyone. This discussion inspired me to finally write about my
> > pet peeve with GUI builders and data driven GUI configuration.
>
> > The article is at:
>
> >
http://krbtech.wordpress.com/2011/05/28/android-guis-the-case-against...
>
> > (orhttp://
snipurl.com/27xpi6)