« first day (4436 days earlier)      last day (503 days later) » 

Tim
7:50 AM
true
 
 
2 hours later…
10:02 AM
@Tim a man of culture
 
 
1 hour later…
11:17 AM
o/
 
 
3 hours later…
2:33 PM
@MwBakker did you use vue with TS?
 
 
1 hour later…
3:39 PM
@grrigore TS? Typescript? No
 
Tim
4:12 PM
@MwBakker there is something strangely comforting about clicking trees in a 20 year old game without having to think about anything. Modern games do not interest me at all, don't know why
 
 
2 hours later…
5:46 PM
Guys please share your experiences of getting chased by dogs
 
@asim i'm chased by bitches all the time
 
o/
I have never been chased by dogs. But then I'm 6'4" so I'm probably more intimidating to them.
 
6:33 PM
Anyone using Use Cases in their MVVM Clean Architecture?
I have a Repository class that owns both local and remote classes, depending on the caching rules, and so far I've been having the ModelViews query the Repository directly, and I'm trying to figure out when and why you would add another layer of UseCases in-between.
 
7:00 PM
@JBis feed them boneless meat
 
7:31 PM
Especially when the situation is just "getItem(id)" from the server or local cache, it doesn't seem to make sense to add another UseCase in between the ViewModel and Repo
 
8:26 PM
Greetings folks. Hope you are doing well. I have a situation where on clicking push notification when app is closed, pending intent data passed is always null in the receiving activity. Any leads?
None of the solution on internet is working so far
 
9:14 PM
@NightFury can't recall properly but had that issue in the past and solution was extremely obvious
I will dig that part from archives next time i am on my pc
 
Tim
9:26 PM
@CarlAnderson this is what you often see and imo it is a complete waste of time and only adds effort and complexity. Usecases are justified when the repositories are only fetching and perhaps caching data. The repository data is often not yet in the desired form for the presentation layer to consume. That is what I do in Usecases, grab 'raw' data from repositories and process it so the viewmodel gets exactly what it needs, not less and not more
You often see that processing or mapping, filtering, etc, of data done in repositories. I don't agree with that
 
@asim Thanks Asim. Meanwhile, I am looking into solutions too. If I find one, will let you know :D
 
so always do the NetworkObject -> DomainObject mapping in a UseCase?
Our Repository class has a LocalSource and RemoteSource, and handles storing the data returned from a RemoteSource into a LocalSource. the RemoteSource does the network to domain mapping internally because ideally those network objects don't propagate everywhere
 
9:46 PM
I find different people have different opinion here. I have seen some people converting network object to domain object in repository layer, then viewmodel to map domain to screen specific ui object.
Some uses usecase to map network object to ui object states too.
 
I have never worked anywhere that used MVVM before this position, and I'm trying to convert a huge MVP app to use more modern architecture.
Fortunately they already had repositories, but having never seen MVVM in action anywhere else it's hard to figure out where the responsiblities lay for each component
 
@Tim and I agree with Tim here, processing data is what the ViewModel is for. Mapping however is a gray area for me, might as well be in the Repository for my sake
 
10:12 PM
Another element I'm struggling with is how many ViewModels to have
Suppose I have a Fragment that needs data from endpoint A, and then using the results, also needs data from Endpoint B and C
these 3 separate endpoints are in 3 different repositories
Should there be 3 ViewModels, so that a given VM can be shared with another Fragment?
or should it be 1 VM that knows how to chain the calls appropriately and load the data?
but is then not reusable
 
Tim
11:06 PM
@CarlAnderson no sorry I mean mapping data as in having a list of all users in the repository, and in the usecase filtering that if you need a subset of users for example. As opposed to having multiple methods in the repository that do all of that. That is how you get massive repositories with lots of responsibilities
Network data should be converted to domain data asap
It can not leak out of the repository because then the rest of the app has knowledge of where the data came from
@CarlAnderson it's a choice, personally I enjoy the idea of having reusable UI components that each have their own viewmodel. But so far I've not worked on a codebase that does this. Most people will say that fragment:viewmodel is a 1:1 relation
Separating them gives flexibility at the cost of boilerplate. Combining them means less code but more code in the same viewmodel. Neither is perfect
 
Intent data was received in launcher activity and has to be handled. This is I have done and working! This answer really helped.
https://stackoverflow.com/a/69835528
 
I miss the days when things were simple and I just used AsyncTask
@Tim are you on Mastodon?
 
Tim
11:23 PM
I'm not on any socials, they are all equally cancerous
 
@Tim yes this seems to be the best argument for UseCases
Also glad I misunderstood your explanation of network data
 
Tim
Damn I wanted to edit that message because I don't like to use that word, but I was too slow
 
which word? leak?
 
Tim
Cancerous
 
ah
there are worse words
 
Tim
11:28 PM
Anyway yeah there is still a mess where you can do everything in 25 different ways, and nobody ever agrees on what the best approach is. Every team in every company has their own style
 
it was actually refreshing ~8 years ago when I worked in Ruby, and was told "You have to use MVC, and you have to put your controllers in this directory, your views in this one, and your models here"
google has been so late on getting this architecture figured out
 
11:50 PM
anywhey, heading out
 

« first day (4436 days earlier)      last day (503 days later) »