Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Design Patterns and Best Practice

You're reading from   Android Design Patterns and Best Practice Create reliable, robust, and efficient Android apps with industry-standard design patterns

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher Packt
ISBN-13 9781786467218
Length 370 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Kyle Mew Kyle Mew
Author Profile Icon Kyle Mew
Kyle Mew
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Design Patterns FREE CHAPTER 2. Creational Patterns 3. Material Patterns 4. Layout Patterns 5. Structural Patterns 6. Activating Patterns 7. Combining Patterns 8. Composing Patterns 9. Observing Patterns 10. Behavioral Patterns 11. Wearable Patterns 12. Social Patterns 13. Distribution Patterns

How this book works

The purpose of this book is to show how the application of design patterns can directly assist the development of Android applications. During the course of the book we will be concentrating on the development of a complete client-side mobile application, focusing particularly on when, why, and how patterns can and should be employed during Android development.

Historically, there has been a certain amount of disagreement as to what exactly constitutes a pattern. However, the 23 patterns laid out in the 1994 book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, the so-called gang of four, are widely accepted as the definitive set and provide solutions to nearly all of the software engineering problems that we are likely to encounter, and it is for this reason that these patterns will form the backbone of the book. These patterns can be broken down into three categories:

  • Creational - Used for creating objects
  • Structural - Used for organizing groups of objects
  • Behavioral - Used for communication between objects

The practical nature of this book means that we will not be tackling these categories in the order they appear here; instead, we will explore individual patterns as and when they arise naturally during the development of our app, although this generally means starting with creating a structure first.

It would be difficult, clumsy, and unrealistic to incorporate all design patterns into a single application, so here will attempt to apply as many as might seem realistic. For those patterns we decide not to use directly, we will at least explore how we might have done so, and in every case give at least one practical example of how they are used.

Patterns are not written in stone, nor do they solve every possible problem, and towards the end of the book we will look at how, once we have a grasp of the subject, we can create our own patterns or adapt extant ones to suit the rare circumstances where none of the established patterns fit.

In short, patterns are not a set of rules but rather a series of well-worn paths leading from known problems to tested solutions. If you spot a shortcut along the way, then by all means use it. If you stick to it consistently, then you will have created a pattern of your own that is just as valid as the traditional ones that we will cover here.

The first few chapters of the book concentrate on UI design and introduce a few essential design patterns and how they work conceptually. From about Chapter 6, Activating Patterns, onward, we will start to apply these and other patterns to real-world examples, and to one application in particular. The final chapters concentrate on the final stages of development, such as adapting applications for differing devices, a task almost purpose-built for design patterns, reaching the widest possible market and how to monetize our apps.

Note

In case you are new to Android development, the instructions laid out in the first two or three chapters are given in detail. If you are already familiar with Android development, you will be able to skip these sections and concentrate on the patterns themselves.

Before we get stuck into our first patterns, it makes sense to take a closer look at the app we will be building during the course of the book, as well as the challenges and opportunities it presents.

You have been reading a chapter from
Android Design Patterns and Best Practice
Published in: Dec 2016
Publisher: Packt
ISBN-13: 9781786467218
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image