Hacker News new | ask | show | jobs
by nemothekid 3326 days ago
>And Android has some pretty big red-light APIs. Fragments, for example, are a well-known Flagship Bad API in Android.

Ugh. I left Android development right around Honeycomb - where Fragments were supposed to be the cool way to manage your app and you'd get screen orientation and device screen configuration all for almost free. In practice I found Fragments far more confusing to use than the already complex Activity lifecycle. To hear that 3 years later that everyone may think Fragments were a bad idea doesn't leave me feeling good.

2 comments

It's not so much that fragments is a bad idea as a concept. It's that its implementation is a textbook example of bad API design.

I dovt know about other people but I certainly end up cargo culting every time I want to use the fragments API.

Interesting - I thought it was just me. I couldn't comprehend the way they are supposed to work until I spent lots of time figuring it out. And then I had a year off Adndroid and when I came back I couldn't make sense of my own code... awful interface. I have no idea why they didn't replace it with some better concept.