---
title: "#viewmodel articles | Hashnode"
description: "Explore 35 articles tagged #viewmodel on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/viewmodel"
---

Tag

# #viewmodel

35 posts · 2 followers

[Alexandre Alcuvilla](https://hashnode.com/@screwdriver) · [May 8](https://hashnode.com/posts/single-responsibility-breaking-up-fat-viewmodels-in-swiftui/69fda2666fb09594bd21d80b)

### [Single Responsibility: Breaking Up Fat ViewModels in SwiftUI](https://swiftuicentral.com/single-responsibility-breaking-up-fat-viewmodels-in-swiftui?utm_source=hashnode&utm_medium=feed)

The Single Responsibility Principle (SRP) states that a class should have one reason to change. It's the first letter of SOLID, and arguably the one most frequently violated in SwiftUI projects. The c

8 min read · [swiftuicentral.com](https://swiftuicentral.com/single-responsibility-breaking-up-fat-viewmodels-in-swiftui?utm_source=hashnode&utm_medium=feed)

[kigya](https://hashnode.com/@kigya) · [May 2](https://hashnode.com/posts/dont-bury-your-backing-properties/69f5d44b0ab374db99e15bc8)

### [Don't Bury Your Backing Properties](https://kigya.hashnode.dev/dont-bury-your-backing-properties?utm_source=hashnode&utm_medium=feed)

Learn why explicit backing fields do not fully replace backing properties and asStateFlow for safer ViewModel state in Kotlin Android apps.

12 min read · [kigya.hashnode.dev](https://kigya.hashnode.dev/dont-bury-your-backing-properties?utm_source=hashnode&utm_medium=feed)

[Ganesh Rama Hegde](https://hashnode.com/@hegde10122) · [Nov 8, 2025](https://hashnode.com/posts/chapter-19-testing-the-domaindata-and-presentation-layers-for-searchimageusecase/690f75c1517b539cb817e1c6)

### [Chapter 19 - Testing the Domain,Data and Presentation layers for SearchImageUseCase](https://androidavatar.hashnode.dev/chapter-19-testing-the-domaindata-and-presentation-layers-for-searchimageusecase?utm_source=hashnode&utm_medium=feed)

The following objectives need to be satisfied by the use case: Emits Loading, Success, and Error states in sequence. Interacts properly with the repository’s searchImage() flow. Handles both success and failure paths gracefully. Testing SearchIm...

9 min read · [androidavatar.hashnode.dev](https://androidavatar.hashnode.dev/chapter-19-testing-the-domaindata-and-presentation-layers-for-searchimageusecase?utm_source=hashnode&utm_medium=feed)

[Ganesh Rama Hegde](https://hashnode.com/@hegde10122) · [Nov 2, 2025](https://hashnode.com/posts/chapter-17-coding-the-viewmodel-for-the-searchimageusecase/690793da24a0fbc02b2bfc6d)

### [Chapter 17 - Coding the ViewModel for the SearchImageUseCase](https://androidavatar.hashnode.dev/chapter-17-coding-the-viewmodel-for-the-searchimageusecase?utm_source=hashnode&utm_medium=feed)

data class SearchImageUiState( val isLoading: Boolean = false, val errorMessage: String? = null, val searchResults: List<String> = emptyList() ) /\*\* \* ## ArtViewModel (Simplified Version) \* \* This ViewModel is responsible for fetching...

4 min read · [androidavatar.hashnode.dev](https://androidavatar.hashnode.dev/chapter-17-coding-the-viewmodel-for-the-searchimageusecase?utm_source=hashnode&utm_medium=feed)

[Ganesh Rama Hegde](https://hashnode.com/@hegde10122) · [Nov 1, 2025](https://hashnode.com/posts/chapter-11-testing-the-artviewmodel/6905f8dacaed4c6cbcbfe450)

### [Chapter 11 - Testing the ArtViewModel](https://androidavatar.hashnode.dev/chapter-11-testing-the-artviewmodel?utm_source=hashnode&utm_medium=feed)

Now we will code the class ArtViewModelTest, which validates that the ArtViewModel in chapter 10 correctly collects and exposes data from the domain layer (via the GetArtUseCase). package com.learning.artsnapapp.presentation.viewmodel import app.cas...

3 min read · [androidavatar.hashnode.dev](https://androidavatar.hashnode.dev/chapter-11-testing-the-artviewmodel?utm_source=hashnode&utm_medium=feed)

[Ganesh Rama Hegde](https://hashnode.com/@hegde10122) · [Nov 1, 2025](https://hashnode.com/posts/chapter-10-creating-the-viewmodel-for-getartusecase/6905df898d8d41158977ccae)

### [Chapter 10 - Creating the ViewModel for GetArtUseCase](https://androidavatar.hashnode.dev/chapter-10-creating-the-viewmodel-for-getartusecase?utm_source=hashnode&utm_medium=feed)

The ViewModel is the bridge between Domain and the UI. The objective of the viewmodel is to allow the flow of data upwards to the UI. package com.learning.artsnapapp.presentation.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycl...

4 min read · [androidavatar.hashnode.dev](https://androidavatar.hashnode.dev/chapter-10-creating-the-viewmodel-for-getartusecase?utm_source=hashnode&utm_medium=feed)

[Ganesh Rama Hegde](https://hashnode.com/@hegde10122) · [Oct 27, 2025](https://hashnode.com/posts/chapter-3-lld-low-level-design-artsnap-app/68ff80c1043729ac4bd1854c)

### [Chapter 3 - LLD (Low-Level Design) – ArtSnap App](https://androidavatar.hashnode.dev/chapter-3-lld-low-level-design-artsnap-app?utm_source=hashnode&utm_medium=feed)

The ArtSnap App We are building an ArtSnap App, a lightweight and modular art collection platform where a user can: View a list of artworks stored locally in the database. Add new artwork details, including name, artist, year, and image. Search im...

4 min read · [androidavatar.hashnode.dev](https://androidavatar.hashnode.dev/chapter-3-lld-low-level-design-artsnap-app?utm_source=hashnode&utm_medium=feed)

[Tabassum Akter Nusrat](https://hashnode.com/@nusrat631) · [Jul 2, 2025](https://hashnode.com/posts/the-swiftui-guide-to-clean-state-management-and-dependency-injection/686508203af4fb4d35fd87d7)

### [The SwiftUI Guide to Clean State Management and Dependency Injection](https://dependency-injection-di-in-swift.hashnode.dev/the-swiftui-guide-to-clean-state-management-and-dependency-injection?utm_source=hashnode&utm_medium=feed)

How @StateObject, @EnvironmentObject make your app clean and scalable.

2 min read · [dependency-injection-di-in-swift.hashnode.dev](https://dependency-injection-di-in-swift.hashnode.dev/the-swiftui-guide-to-clean-state-management-and-dependency-injection?utm_source=hashnode&utm_medium=feed)

[Tito Adeoye](https://hashnode.com/@TitoAdeoye) · [Jun 12, 2025](https://hashnode.com/posts/django-backend-foundations-building-blocks-apps-models-and-views/684b5ecef73d18c5efd4e888)

### [Django Backend Foundations: Building Blocks - Apps, Models, and Views](https://titoadeoye.hashnode.dev/django-backend-foundations-building-blocks-apps-models-and-views?utm_source=hashnode&utm_medium=feed)

Django's essential building blocks—Apps, Models, and Views—structure projects and handle data and requests interaction

19 min read · [titoadeoye.hashnode.dev](https://titoadeoye.hashnode.dev/django-backend-foundations-building-blocks-apps-models-and-views?utm_source=hashnode&utm_medium=feed)

[mohan patel](https://hashnode.com/@mohanpatel) · [May 16, 2025](https://hashnode.com/posts/chai-chill-and-cheqin-my-darjeeling-escape/6826e2a2594b38dc36c50c2f)

### [Chai, Chill & CheQin: My Darjeeling Escape](https://wander-stories.hashnode.dev/chai-chill-and-cheqin-my-darjeeling-escape?utm_source=hashnode&utm_medium=feed)

I had witnessed Darjeeling from old movies and postcards, but nothing could prepare me for the real feeling of being at a hillside, observing clouds drift like curtains over tea gardens of green. Darjeeling is more than a destination — it is a big hu...

3 min read · [wander-stories.hashnode.dev](https://wander-stories.hashnode.dev/chai-chill-and-cheqin-my-darjeeling-escape?utm_source=hashnode&utm_medium=feed)
