Live data from Hacker News

Android platform engineer on application architecture

plus.google.com

101–110 of 124 posts

Re: Android platform engineer on application architecture

#101
post #70

Earlier quoted context omitted.

Regarding GC, Windows Phone apps are garbage-collected, yet Windows Phones has a great reputation for smoothness and responsiveness on anemic hardware like the Nokia 520.

WP only runs one application at a time. When you switch away from an app, it's "tombstoned" so that the app in focus has all available resources. It is possible to run tasks in the background, but IIRC the OS reserves the right to tell your background task "GFY".

Which is exactly what Android and iOS do as well.

Re: Android platform engineer on application architecture

#102

Earlier quoted context omitted.

What's wrong with intents now?

Intents don't work because they were designed to be too flexible. Say I want to be able to share something on social media from my app, seems like the exact use-case Intents were made for. So I create an intent of type ACTION_SEND because that's the only one that sorta does what I need and now my user gets a HUGE list of options, half of which are irrelevant and/or don't work at all. I cannot limit the Intent to 'sha…

From a user's perspective, I consider Intents the strongest feature of Android as it let the system make no assumptions about my preferred apps. If it is important to closely control the user's flow, as in your second example, then you're probably better off hardcoding a list of other apps that your app can interact with using explicit intents like how sharing works on iOS. General intents like ACTION_SEND are designed to be intercepted by any app that declares itself capable of servicing the request, regardless of how well the app can actually do so.

Re: Android platform engineer on application architecture

#103

This makes my head spin. Plenty of examples on developer.android.com use Activities, Services, BroadcastReceivers for things that go beyond what Dianne Hackborn is recommending here. It's like the Android SDK team want to have their cake and eat it too: "We've built a tremendously powerful and useful SDK. It really helps you build great apps quickly and easily." vs. "Oh, and, by the way, be careful not to misuse our…

Well, d.android.com exists to showcase the core apis. They can't possibly show you how to create an app with 3rd party components on top of a single activity. Just take the bear necessities from there add your own stuff on top.

I guess I've been reading that documentation from the wrong perspective. I thought they were trying to show me the right way, or at least, a good way, to create apps and add features to them.

Re: Android platform engineer on application architecture

#104
post #10

I worked with Dianne fifteen years ago, and she was good. However, hearing from others who were involved in early Android, and then left in disgust, the designers who set out the initial form did boot have extensive application framework/developer experience, and we're still hiring to this day because of it. Let's say it all together: Implementation inheritance is a mistake, and interface based design is a clearer op…

It's not just that. Hackborn spent many years denying that Android was janky as fuck, or making excuses for it (e.g. https://plus.sandbox.google.com/105051985738280261832/posts/...).

Re: Android platform engineer on application architecture

#105

Earlier quoted context omitted.

What's wrong with intents now?

Intents don't work because they were designed to be too flexible. Say I want to be able to share something on social media from my app, seems like the exact use-case Intents were made for. So I create an intent of type ACTION_SEND because that's the only one that sorta does what I need and now my user gets a HUGE list of options, half of which are irrelevant and/or don't work at all. I cannot limit the Intent to 'sha…

Just wanted to chime in as a former six year Android user that I miss intents the most.

I'm using my phone much less for certain activities. For instance, I share to instagram less because it's not in thr iOS share drawer for some reason.

I think the arguments leveled against Android elsewhere in this thread are solid...maybe even the UX one against intents. I certainly don't suggest an Android to anyone in my parents' generation, except my former-programmer uncle.

Re: Android platform engineer on application architecture

#106
One of the biggest challenges for building on Android is its complexity, and the team must successfully integrate with a lot of surface area conceptually (the fundamental building blocks Dianne explains is just the start). This unusually negative comment thread (for HN, I think) is probably illustrative of how frustrating Android development can be.

On the other hand, it's been clear to me that Google is investing heavily in making Android an easier platform to develop for.

First, the tooling: Moving to Gradle for the build system was a huge improvement. Making a repeatable, extensible build is the vital with teams moving towards the DevOps world with CI/CD. Android Studio has also been a welcome change; all of the separate components of the build being integrated together makes for a much better development experience. The best example of this is Instant Run, which is a great accomplishment for the tooling team.

The Support Libraries are also a solid investment for implementing good patterns - particularly patterns that can be tricky to implement yourself like the separately sliding appbars. Getting more developers to adopt the support libraries also allows more compatibility, since Google can release the fixes independently from platforms.

YouTube has also been a great resource for Android developers as Google has been constantly releasing content about how to build better apps. Jo and Ian are really great.

Anyway, I would watch this space. It might be a coincidence that Dianne made this post, or the most recent videos ("concurrent tasks with multiple documents" and "tasks and back stack", respectively) were also about basic Android features. Maybe Googlers are reflecting on what Android is due to the current news of Oracle v Google. Or maybe it's because IO is this week. I'll be watching!

Re: Android platform engineer on application architecture

#107
post #10

I worked with Dianne fifteen years ago, and she was good. However, hearing from others who were involved in early Android, and then left in disgust, the designers who set out the initial form did boot have extensive application framework/developer experience, and we're still hiring to this day because of it. Let's say it all together: Implementation inheritance is a mistake, and interface based design is a clearer op…

It's not just that. Hackborn spent many years denying that Android was janky as fuck, or making excuses for it (e.g. https://plus.sandbox.google.com/105051985738280261832/posts/... ).

You must be mistaking me with someone else.

Re: Android platform engineer on application architecture

#108

Earlier quoted context omitted.

It's not just that. Hackborn spent many years denying that Android was janky as fuck, or making excuses for it (e.g. https://plus.sandbox.google.com/105051985738280261832/posts/... ).

You must be mistaking me with someone else.

Deleted, then. Perhaps I have conflated the memory of being at javaone and being told all about the wonders of javafx, and the contemporaneous wonders of "filthy rich clients".

Re: Android platform engineer on application architecture

#109

Earlier quoted context omitted.

Intents don't work because they were designed to be too flexible. Say I want to be able to share something on social media from my app, seems like the exact use-case Intents were made for. So I create an intent of type ACTION_SEND because that's the only one that sorta does what I need and now my user gets a HUGE list of options, half of which are irrelevant and/or don't work at all. I cannot limit the Intent to 'sha…

Just wanted to chime in as a former six year Android user that I miss intents the most. I'm using my phone much less for certain activities. For instance, I share to instagram less because it's not in thr iOS share drawer for some reason. I think the arguments leveled against Android elsewhere in this thread are solid...maybe even the UX one against intents. I certainly don't suggest an Android to anyone in my parent…

Instagram seems to have decided to implement their own sharing system that ignores everything but the most popular apps and websites.

Re: Android platform engineer on application architecture

#110
post #3
post #2

Eschewing the traditional application architecture has made for both a terrible development experience and poor quality applications in general. The application lifecycle is convoluted with even the Android developers joking about how confusing it is. Everything about the model has made it far more difficult to port existing software to, and native development for me personally has been an absolute nightmare. No clea…

I agree. Android architecture is a mess. Activity life cycling is actually impossible. There are certain actions the OS takes that will cause crashes no matter how well architected the app is. My main quibble with Android is that since everything is tied to the activities it is impossible to build an MVC style app. You are better off using the NDK or an engine. Then you can build your software correctly.

Why do activities make it hard to do MVC? They seem similar to UIViewControllers on iOS.
Post reply on HN