13

Do you prefer to use UI frameworks which make a distinction between UI files and application code (e.g. Qt, GTK, Angular) or do you prefer to define the UI in the application code (e.g. Flutter, Jetpack Compose, React)?

all 5 comments
sorted by: hot top new old
[-] Lmaydev@programming.dev 5 points 3 years ago

Always separate where possible. In my experience things can end up a tangled mess really easily.

I'm a big fan of mvvm. Keeps everything separate and simple.

[-] nachtigall@feddit.de 2 points 3 years ago

I prefer to define the UI in application code, because separation introduces a lot of overhead for bindings.

Nevertheless, I think it is important separate UI code from business logic.

[-] glibg10b@lemmy.ml 1 points 3 years ago

Separating them allows you to add additional interfaces, such as command-line interfaces, APIs and web pages

[-] fusio@lemmy.world 1 points 3 years ago

depends what you mean by application code.. I'd say if your business logic is exclusively used by a ui feature the best is to keep them together. but you probably want to abstract away things like data access. I found working with a nx monorepo helps reasoning about how to structure your code.

this post was submitted on 21 Aug 2023
13 points (100.0% liked)

General Programming Discussion

10014 readers
1 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 7 years ago
MODERATORS