Комментарии:
Thanks for tutorial. But where is the internets? (You claimed MVI architecture) 😞
ОтветитьIs it okay that we are using drawable dependency in domain layer WeatherType mode???
ОтветитьCan I published app on playstore using free weather api ? but it's mention non commercial use
Ответитьhey @@PhilippLackner could you please show newer version of this video because new version of android comes with lots of dagger hilt issue
ОтветитьThe Hilt compiler is not able to find a way to provide an instance of the DefaultLocationTracker class. This class is a concrete class, so it does not have an @Inject constructor.
revised code snippet:
class DefaultLocationTracker @Inject constructor(
private val locationClient: FusedLocationProviderClient,
private val application: Application
) : LocationTracker {..}
Hey Philipp, I thought I will see something new with MVC architecture but there is nothing difference compared to MVVM.. am i missing something or you accidentally mentioned MVC instead of MVVM
Ответить"REFRESH" button is needed in this app.
Ответитьexcellent exercise
ОтветитьThank you very much!
ОтветитьWhy we are using try, catch in weatherRepositoryImpl get WeatherData method? Because if the problem occurs because of toWeatherInfo() the error will be catches we will not aware of this issue. Is it possible to avoid using try, catch maximum?
ОтветитьHi, In case I wanted to fix the position of the app in my town for wwxample, how I can do?
ОтветитьThanks so much for tutorial ❤
To simplify mapping toWeatherDataMap() and to avoid IndexedWeatherData class, we can use function:
private fun daysBetweenDateAndNow(dateTime: LocalDateTime): Int {
val dateStartOfDay = dateTime.toLocalDate().atStartOfDay()
val nowStartOfDay = LocalDate.now().atStartOfDay()
return Duration.between(nowStartOfDay, dateStartOfDay).toDays().toInt()
}
And then use it when grouping WeatherData objects
fun WeatherDataDto.toWeatherDataMap(): Map<Int, List<WeatherData>> {
return time.mapIndexed { index, time ->
val temperature = temperatures[index]
val weatherCode = weatherCodes[index]
val windSpeed = windSpeeds[index]
val pressure = pressures[index]
val humidity = humidities[index]
WeatherData(
time = LocalDateTime.parse(time, DateTimeFormatter.ISO_DATE_TIME),
temperatureCelsius = temperature,
pressure = pressure,
windSpeed = windSpeed,
humidity = humidity,
weatherType = WeatherType.fromWMO(weatherCode)
)
}.groupBy {
daysBetweenDateAndNow(it.time)
}
}
I really appreciate your work, You have helped me tremendously in becoming a better developer but you have a problem, you tend to make thing unnecessarily complex. Things which could have been done / written in simpler more readable manner, you tend to make them complex
ОтветитьThanks for the great tutorial!!!!
ОтветитьFirst of all, I really like your tutorials. They have an awesome quality, a very concise approach and they are very good to follow along.
One wish though: I am a big fan of TDD. And it would be much easier to understand if you would create some simple unit tests along the way so we can actually see what all the helper functions, like "WeatherDataDto.toWeatherDataMap()", are doing. Just a suggestion :)
great tutorial, what theme and font are you using? I can follow without having any knowledge of kotlin but slowly, what course from your portfolio do you recommend me to buy? I'm coming from swift and I have kids so I have limited time to learn, I want to learn fast
Ответитьhey, Philipp!
I'd like to have the same skills to make such a good architecture, but it's difficult to me to figure out why creating so many classes, interfaces is needed
could you advice me some materials, books to get comprehensive understanding of developing clean architecture apps?
thank you in advance
Hey, thanks for intro. I keep wanting to start using compose but keep staying with xml. Now thinking to start again, however now is a question, what are the recommendations now about all basic dependencies such as navigation.
ОтветитьHi Philipp,
This tutorial is well made, as a general feedback it would be great if at the end of any video you would add some hints into how you would expand this app.
Andoird development is real over-complicated. I would expect an API call takes one line of code, but it doesn't looks like that.
ОтветитьI liked the idea of the app and your simple explanation for the concepts, thanks Philipp
Ответитьlmao code in video is super easy to understand, it better than many project in github
ОтветитьMVI - Model View Intent
Could anyone explain to me what would be the Intent part here?
Hi Philpp! Why do you build a Resource class instead of using Kotlin's Result class? Thank you for the video
ОтветитьSo, MVI is just replacing xml with compose with States?
ОтветитьWeatherType violates clean architecture. It is spanning data, domain, and presentation. It knows about the codes from this particular API (data layer) and it contains references to icons (presentation). If you switched to a different service that did not use the same codes that would mean changing domain layer. If you changed the icons used to present the weather type that would also mean changing the domain layer. The weather type in domain should just be an enum or sealed class hierarchy. It should know nothing about codes or icons. The mapping from code should be a function in the data layer that takes a code and returns a weather type. Similarly mapping type to an icon would be a function in presentation.
ОтветитьBro you are beast raaaaar
Ответитьmy app does load but upon giving location perms it moves to the next screen then crashes ... what could be the problem
ОтветитьCould you quote a source for the pressure, humidity etc icons?
ОтветитьThis really helped thanks a lot!
ОтветитьThank u so much. I've been so confused, but tNice tutorials video helped a lot.
ОтветитьNo big deal alert, but the domain layer should also be free of Android dependencies. So the LocationTracker method shouldn't return an Android Location.
ОтветитьIf I am using a graphql backend can I use retrofit or should I use Apollo. I don't really get Apollo. just struggling my way through learning Kotlin and Jetpack Compose and clean architecture. lol
Ответитьfinally after two weeks finished this video.
Ответить3 times did not start, but then it worked
ОтветитьDo you have any Mac version?
ОтветитьThanks for the good idea to use copy for the state ! This is what i was looking for.
ОтветитьThat mapper logic was legendary 😅
ОтветитьNice tutorial, I'll test it right now!
ОтветитьHey @Philipp Lackner, I watched this video to see how does MVI architecture look like and how does it differ from 'classic' MVVM, but i don't see any differences from other tutorial apps done with MVVM (besides the difference of not using UseCases here)
Could You please clarify or explain what the actual difference is? (since I always assumed that MVI does not use ViewModels but some other classes to resolve UI state control)
thank you! you rule!!!
ОтветитьCan you make a followup video on this one adding testing?
Ответитьwhy in weather repository you return weatherinfo not weatherdto?, only later in use case we should mapping it to weatherinfo
Ответить