---
title: "Discussion on \"Keep these things in mind when using ViewModel in your application\" | Hashnode"
description: "Discussion on \"Keep these things in mind when using ViewModel in your application\". Don't let ViewModels know about Android framework classes. (A general rule of thumb is to make sure there are not(android.) imports in your ViewModels(with an exception like android.arch.)\n\nKeep the logic in activities and Fragments to a minimum.\n\nAv..."
url: "https://hashnode.com/posts/keep-these-things-in-mind-when-using-viewmodel-in-your-application/61b0560f079fa33c086106c8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Keep these things in mind when using ViewModel in your application](https://surajbahadur.hashnode.dev/keep-these-things-in-mind-when-using-viewmodel-in-your-application?utm_source=hashnode&utm_medium=feed)

Don't let ViewModels know about Android framework classes. (A general rule of thumb is to make sure there are not(android.) imports in your ViewModels(with an exception like android.arch.) Keep the logic in activities and Fragments to a minimum. Av...

Dec 8, 2021 · 1 min read · surajbahadur.hashnode.dev  
Read the article

-   [#android](https://hashnode.com/tag/android)
-   [#java](https://hashnode.com/tag/java)

## Written by

[Suraj Bahadur](https://hashnode.com/@SurajBahadur)

@SurajBahadur · Chandigarh

  
[View profile](https://hashnode.com/@SurajBahadur)

Android Developer

A self-taught/solo programmer and building apps since 2016 in android using java/kotlin.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
