What design patterns should I learn before developing Android

Besides knowing Java, what design patterns should I learn before starting a search in the Android SDK?

Edit: The reason I ask this question is because, looking at sdk, I think I'm not sure about it that it uses the adapter template heavily and I was wondering if I can find out what other templates it uses, and this can help in my learning process.

Thanks.

+7
source share
6 answers

One of the biggest transitions from desktop programming in Java to Android programming is the use of XML for styles and layout management. I would definitely take the time to get started with XML if you want to look at programming for the Android system. I don’t know much about the exact design practice, but the model-vision modeling system is very emphasized in iOS development, and I won’t be surprised if this also applies to Android programs.

Of course, the developer site will be a great place to view any resources: http://developer.android.com/index.html

This article I found over the weekend, while at the coding contest, can also help you go the right way http://answers.oreilly.com/topic/1133-how-to-start-programming-in-android /

+4
source

There is no need to learn any development template to start using the Android SDK (perhaps knowledge of the Observer / Listener template will help you become familiar with event handling in Android).

Obviously, knowing about them will help you understand the intentions of some parts of Api.

+4
source

Higher-level structures such as Android usually follow the very set of design patterns. It is almost the same as you study the sample at work. A great example is the OnXXXListener interface publisher / subscriber model. If you follow the example set out in the frame, it really comes to you (in my opinion, of course). For example, I created a color picker view. I want View (Activities) users to be able to receive notifications, such as "selected color." I just looked at how the SDK classes will do this, and follow their example (create the OnColorSelectedListener interface using the onColorSelected method, expose this function through setOnColorSelectedListener in my color picker view, etc.).

Based on the .Net background for Android / Java, I really see the differences .. Net has many different design patterns that provide a very good guide for your custom classes. The good news is that the engineers behind the .Net BCL and Android SDK have followed some very common design patterns very well, so there are great examples.

+1
source

In my opinion, you can start writing code first, and when you find that your code is ugly, or find that you are writing redundant code, you can look for design patterns to make your design better.

+1
source

opinions? Just start hacking. A developer guide can help you with this.

0
source

I don’t see how you can erroneously separate your application algorithms (model) from event processing code (ActivityClass) and presentation code (XML). Key ideas would be separation of concerns and weakening grip.

Jal

0
source

All Articles