Skip to content

Any recommendations on the best way to use Fragments with Paparazzi? #416

Answered by JakeWharton
erawhctim asked this question in Q&A
Discussion options

You must be logged in to vote

I know you guys at Square typically shy away from Fragment usage and use Views directly

This is a frequent mischaracterization of what we do.

We don't use fragments simply because they're poorly designed abstractions that do more harm than good. We have strong layering and encapsulation of our data layer, our presenter layer, and our rendering layer (where Views live). The rendering layer is regular views (not necessarily "custom") or Compose UI. The presentation layer speaks to the rendering layer through well-defined interfaces which means it's easy to drive the rendering layer with fake data.

Some people don't have the flexibility to abandon fragments. That's unfortunate, because the…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jrodbx
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants