Book Review: Android User Interface Development
RickJWagner writes "So you want to be an Android developer? If you're like me, you've probably been wanting to learn how to program a mobile device, but just haven't found the time to master Objective-C. So now that Android is here, all of us garden-variety Java coders can jump on the bandwagon and start slinging apps out, right? Well, it turns out there's a little more to it than that. This book can make the trail from everyday Java code slinger to best-selling Android app writer a little more plausible." Read below for the rest of Rick's review.
Android User Interface Development
author
Jason Morris
pages
Packt Publishing
publisher
304
rating
RickJWagner
reviewer
1849514488
ISBN
A good resource for Android developers who aren't already UI experts.
summary
7/10
The book does not teach Android development. For that, there are other books and the Android SDK documentation, which I found adequate for my uses so far. This book emphasizes teaching Android User Interface development, which is something I would not have had much of a clue about without the book. (The Java and XML-based configuration of Android is easy enough for a back-end Java coder like myself, but I've never been a web-design and layout guy. Or fat-client layout and design guy for that matter, either.) That's the sweet spot for this book.
Android newbies do get an introductory chapter that guides the reader through setting up the SDK and writing a quick first app. After that, the book starts to take a serious UI bent, and that's o.k. because that's where the book's intended to go. The earliest chapters cover UI-centric matters like asking the user a question and processing the answer that is returned. List selections are explained (i.e. single-select button choices versus multi-select). Functional features like adding a header or a footer are explained.
The middle chapters cover pragmatic issues like producing an image gallery, handling date/time inputs, and validating user inputs. Layouts in Android are explained, which will be somewhat familiar to Java Swing developers. I had an interest in learning how animation works (don't we all dream of writing the next viral-selling game?), this is explained as well.
The final chapters deal with styling (i.e. how to change the way a button looks) and themes. It's very important that your application 'feels' like it should, and this is given adequate coverage in the book. I'm sure a back-end coder like myself would botch this part horribly without guidance, so I can appreciate the reason the book emphasizes these things.
The book is written in Packt's 'Cookbook' style. If you haven't seen one of these before, the book is largely cut up into sections covering some general idea. Within the section you'll find headings for the topics "Time for Action", "What Just Happened" and "Have a Go, Hero". "Time for Action" is a series of instructions that spell out exactly what to do for a sample scenario. "What Just Happened" follows up with an explanation of why the reader was asked to execute the instructions. "Have a Go, Hero" is a section challenging the reader to extend the spoon-fed instructions by implementing a next-step challenge. This style of writing emphasizes hands-on knowledge transfer without a lot of verbose theory, so it'll be good for readers who like to learn as they code. Contrast this to books that have a lengthy section of text explaining all the details of some topic, followed by a monolithic code blob towards the end of the chapter-- this book is not written that way.
The sample code that's available on Packt's site is clean and easy to understand. It follows the same structure as the sample code you'd find in the SDK, so if you're brand new to Android development you might start with the SDK teachings and then extend it with the book as soon as you're ready. I thought the examples the book presented were almost all reasonably relevant. The author did a good job of keeping the exercises presented throughout the book well contained, so you're never asked to code too much stuff at one time. I like that, as it lets you read the book without having to set aside a huge block of time at once to see the results of your coding efforts.
So who is this book good for? I'd say it's a good resource for Android developers who aren't already UI experts. I'm not saying it's good for Android newbies who need to learn the basics of Android programming, because there's just too little introductory material for that. But if you can already hack something together, and want it to be appealing to someone besides yourself, this book can help.
You can purchase Android User Interface Development from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Android newbies do get an introductory chapter that guides the reader through setting up the SDK and writing a quick first app. After that, the book starts to take a serious UI bent, and that's o.k. because that's where the book's intended to go. The earliest chapters cover UI-centric matters like asking the user a question and processing the answer that is returned. List selections are explained (i.e. single-select button choices versus multi-select). Functional features like adding a header or a footer are explained.
The middle chapters cover pragmatic issues like producing an image gallery, handling date/time inputs, and validating user inputs. Layouts in Android are explained, which will be somewhat familiar to Java Swing developers. I had an interest in learning how animation works (don't we all dream of writing the next viral-selling game?), this is explained as well.
The final chapters deal with styling (i.e. how to change the way a button looks) and themes. It's very important that your application 'feels' like it should, and this is given adequate coverage in the book. I'm sure a back-end coder like myself would botch this part horribly without guidance, so I can appreciate the reason the book emphasizes these things.
The book is written in Packt's 'Cookbook' style. If you haven't seen one of these before, the book is largely cut up into sections covering some general idea. Within the section you'll find headings for the topics "Time for Action", "What Just Happened" and "Have a Go, Hero". "Time for Action" is a series of instructions that spell out exactly what to do for a sample scenario. "What Just Happened" follows up with an explanation of why the reader was asked to execute the instructions. "Have a Go, Hero" is a section challenging the reader to extend the spoon-fed instructions by implementing a next-step challenge. This style of writing emphasizes hands-on knowledge transfer without a lot of verbose theory, so it'll be good for readers who like to learn as they code. Contrast this to books that have a lengthy section of text explaining all the details of some topic, followed by a monolithic code blob towards the end of the chapter-- this book is not written that way.
The sample code that's available on Packt's site is clean and easy to understand. It follows the same structure as the sample code you'd find in the SDK, so if you're brand new to Android development you might start with the SDK teachings and then extend it with the book as soon as you're ready. I thought the examples the book presented were almost all reasonably relevant. The author did a good job of keeping the exercises presented throughout the book well contained, so you're never asked to code too much stuff at one time. I like that, as it lets you read the book without having to set aside a huge block of time at once to see the results of your coding efforts.
So who is this book good for? I'd say it's a good resource for Android developers who aren't already UI experts. I'm not saying it's good for Android newbies who need to learn the basics of Android programming, because there's just too little introductory material for that. But if you can already hack something together, and want it to be appealing to someone besides yourself, this book can help.
You can purchase Android User Interface Development from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Just reading this story when finishing some Android programming work... and it sounds very interesting to me. Especially as UI design is not my strongest point.
Unfortunately USD 45 is quite steep, will have to add international shipping costs to it even, for a book that I can't check out first.
Now if they were selling this for a few bucks as e-book, I'd be digging up my credit card instead of writing this comment. Besides, it's a bit strange these days that a book about computers and programming does not come in e-book format.
Saying you don't have time to learn Objective-C is ridiculous. If you know Java, It takes half a day to learn Objective-C. The time consuming part of learning any new technology/platform is learning the frameworks. Cocoa and Cocoa Touch are huge and use design patterns that many coders do not already know. Fortunately, the design patterns are used everywhere, and they are used consistently. Once you understand and recognize the patterns, there is no more productive and flexible framework on the planet.
Frankly, learning the design patterns will make you a better programmer no matter what platform you choose. It's worth it just to advance your computer science knowledge.
If you don't think you'll need this book for over 2 months, you may want to get a subscription to access *all* books Packt has published. As a side benefit, there's a couple hundred other books you get access to too.
It's the ADT Plugin for Eclipse, jackass. If you'd taken a glance at the Dev Guide you wouldn't have had to type out that dumb comment.
http://www.amazon.com/Cocoa-Design-Patterns-Erik-Buck/dp/0321535022/
To answer your question, there are a few GUI Builders like this one, but they aren't great [yet].
Carrier/handset device fragmentation does mean the developer needs to account for different sizes/resolutions of screens. Using flow-based layouts, this allows the developer to create one UI and apply it to many devices (phones, tablets, laptops, TVs, etc.)
Do you have to create two exact UIs, one for iphone/ipod and the other for the ipad using the XCode Interface Builder (assuming you don't just "scale" the smaller UI to the larger screen)? And what if you were able to run your app on AppleTV someday.. would you then need to create a third exact layout?
So my only choices for smartphone development are Objective C or Java? Seems like a lose-lose situation to me. Why can't I use native C or C++ on either of them?
Morphing Software
Do you have to create two exact UIs, one for iphone/ipod and the other for the ipad using the XCode Interface Builder (assuming you don't just "scale" the smaller UI to the larger screen)?
You don't have to but in practice you do. Where the fingers are positioned when holding, the way the keyboard comes up, even the styles of navigation that make the most sense all differ from large to small devices.
Interface Builder in XCode provides very nice tools to build scalable interfaces, and they work well to support rotation. But if all you are doing to support a tablet is allowing a small screen to scale up... the in the immortal words of technical users the world over, you are Doing It Wrong.
The correct way to think about the move from a smartphone sized to display to a tablet sized display is the concept of Responsive Design.
That's a lot of text, but what is it really? It's realizing that with more space you can present more information, very well illustrated by this site that collects examples of responsive design:
http://mediaqueri.es
Now those are talking about the context of web design, but the idea applies equally well to application UI design.
What you should be doing in a design tool is building a scalable component that can be placed as a node into a responsive design.
But it does mean the container may be different depending on the device, where you select the best container at runtime - especially in terms of arranging navigation.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
On Android you can use the NDK.
On the iPhone you are perfectly free to use Objective-C++, or C, and mix in calls to the Objective-C framework.
Between the two life is probably easier for the C/C++ programmer on the ObjC side.
Oh and there's also mono for the iPhone if you prefer C#.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Well, *coding* the user interface is one of those things that seem daunting when you set out, but turns out to be no big deal after you've learned your way around a platform. The real challenge is *designing* a mobile user interface, which is especially hard for developers coming from a desktop app background. It's important not to transfer your keyboard/mouse/big ole display ways of doing things to a palmtop device. There aren't just disadvantages your app has to work around (e.g. the screen is really tiny) but there are advantages you need to exploit (less modality than a keyboard and mouse interface).
That's not to say that having a great interface builder isn't a convenience, or that the developers of such a thing don't deserve a hearty pat on the back. It's just that I would never choose a development platform, much less a *target* platform, based on how much I liked an interface builder. I'll do without a GUI for building the interface, so long as it's possible to get good looking results and the platform has other features that make my overall job easier.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
objective-c is not the same as java
Objective C is the result of small-talk and C having unprotected sex . But small-talk expressive power is much greater than the expressive power of java and in C you can code anything that is possible on your system as you have a raw acces to that system. So I must concede that objective-c must be a really powerful language. But it syntax is so awful that I always get sick before I really take the time to get use to it.
Jehovah be praised, Oracle was not selected
I've written some basic software on Apple iOS and also the fragmented Android. Apple's XCode has a wonderful Interface Builder GUI component that lets you lay out your interface's widgets exactly (and in XCode 4, the Interface Builder is now part of the XCode IDE rather than a separate program). Now, I know that Android (and the Java GUI system from which Android illegally stole most of its functionality) is based on layout flows, so having an Interface Builder to place elements exactly on the screen isn't the correct approach for Android's fragmented system. Nonetheless, the XCode Interface Builder lets me set widget properties and connect source code to the widgets. Similarly, in Microsoft's Visual Studio, there is a nice interface construction GUI-based builder system as well. Is there an equivalent Interface Builder for Android, particularly one that isn't affected by Android's pervasive fragmentation?
I don't think you used the word "fragmented" enough.
To have a right to do a thing is not at all the same as to be right in doing it
You'll find the radically different syntax a blessing rather than a curse if you plan on flitting between languages on a regular basis. If you work with two almost identical but subtly different languages, the small differences with catch you out more often than you'd like. When you work with Objective-C and Java at the same time, the differences are substantial, so you end up putting more effort into learning them.
That's my experience, anyway.