Android Architecture

This page has originated from a discussion of how to implement design principles described by Craig Larmen as "Responsibility Driven Design" and different styles of Software Architecture, such as layered design, with packages reaching more and more technical operations.

The relationship between Activities and Services

Bind / unbind is used for Local Services, which are only available to the running process. AIDL is used for interprocess communication.

Bind() / Unbind()

It seems that to connect to a service, one is supposed to use the bind and unbind method calls, but can you then communicated directly with it by interacting with the methods on the service?
The AIDL comment from the google reference guides seems contrary to that belief.

!! This is not correct. One could create a service as a singleton, and in this way always connect to the right, instantiated service. In our case we should look an other options than letting the Activities call the Service. Please see [ImplementingTheService?] for further details.

AIDL

 http://developer.android.com/guide/developing/tools/aidl.html
AIDL (Android Interface Definition Language) is an IDL language used to generate code that enables two processes on an Android-powered device to talk using interprocess communication (IPC). If you have code in one process (for example, in an Activity) that needs to call methods on an object in another process (for example, a Service), you would use AIDL to generate code to marshall the parameters.

Looper / Handler

Clarification on the below confusion
It seems that a Handler is the same concept as an event / eventlistener known from C#. The handler is given code which it processes and once it is done it calls back to the thread which created it, to let the process know that it is done.
 http://www.developer.com/ws/other/article.php/10949_3762056_3/Handling-Lengthy-Operations-in-Googles-Android.htm
 http://saeedsiam.blogspot.com/2009/02/first-look-into-android-thread.html
Mark L. Murphy: Beginning Android - (Chapter 15)

Confusion

What is the relationsship between a  Handler and a  Looper?
 Dianne Hackborn from the Core Android Team at Google explains a little about the handler and looper relationsship in response to a thread on the official Android developer newsgroup.

Dianne also says If you want a thread running a looper, use HandlerThread?. Suggesting that one shouldn't create a new Handler and instanciate it using the constructor Handler(Looper looper).
 http://groups.google.com/group/android-developers/browse_thread/thread/8fd0b86f1dd310b8/3917193dbc42c494?lnk=gst&q=Looper#3917193dbc42c494