<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag" -->

---
title: Anvil: the story of automatic rendering | daily.dev
description: An exploration of why tightly-coupled Android Activity code (mixing View and Controller) becomes fragile as UI requirements grow, using a click-counter example...
canonical: https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Anvil: the story of automatic rendering | daily.dev
og:description: An exploration of why tightly-coupled Android Activity code (mixing View and Controller) becomes fragile as UI requirements grow, using a click-counter example...
og:url: https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag
og:image: https://api.daily.dev/og/posts/Q7Dviq2ag.png
og:image:alt: Anvil: the story of automatic rendering
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Anvil: the story of automatic rendering

**[zserge's blog](https://daily.dev/sources/zserge)** · 5 min read · 0 upvotes · 0 comments

## Summary

An exploration of why tightly-coupled Android Activity code (mixing View and Controller) becomes fragile as UI requirements grow, using a click-counter example that evolves from a simple button to buttons plus a slider. The piece introduces Anvil, a Java library for Android that lets developers describe UI declaratively and re-render automatically after each event, comparing it against plain XML+Java, and the Knork view injector approach. Anvil only re-renders the parts of the layout that actually changed, offering automatic sync between model and UI while keeping view and controller code decoupled and easier to maintain.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://zserge.com/posts/anvil-1>

## Similar posts on daily.dev

- [One Tap, Three Machines: How Android Views, Flutter, and Compose Actually Render Your UI](https://daily.dev/posts/one-tap-three-machines-how-android-views-flutter-and-compose-actually-render-your-ui-2qgm1oxlz) · Medium · 0 upvotes · 0 comments
- [Android Architecture Is Moving from Event-Driven UI to State-Driven UI](https://daily.dev/posts/android-architecture-is-moving-from-event-driven-ui-to-state-driven-ui-dbg3ivujp) · ProAndroidDev · 15 upvotes · 2 comments
- [From Dagger to Metro](https://daily.dev/posts/from-dagger-to-metro-iwqblxioz) · Vinted · 0 upvotes · 0 comments
- [The Evolution of Android Architecture: From MVC to MVP, MVVM, and MVI](https://daily.dev/posts/the-evolution-of-android-architecture-from-mvc-to-mvp-mvvm-and-mvi-dy8ubydhc) · Medium · 1 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#android](https://daily.dev/tags/android)

[View this post on daily.dev](https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Anvil: the story of automatic rendering","url":"https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag"},"datePublished":"2026-08-23T10:20:15.735Z","dateModified":"2026-08-23T10:21:49.588Z","description":"An exploration of why tightly-coupled Android Activity code (mixing View and Controller) becomes fragile as UI requirements grow, using a click-counter example...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"zserge's blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"zserge's blog","logo":"https://media.daily.dev/image/upload/s--KQnFBOIT--/f_auto,q_auto/v1787480407/logos/zserge","url":"https://daily.dev/sources/zserge"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/anvil-the-story-of-automatic-rendering-q7dviq2ag","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,android","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"zserge's blog","item":"https://daily.dev/sources/zserge"},{"@type":"ListItem","position":3,"name":"Anvil: the story of automatic rendering"}]}
```

