Conversation
app/build.gradle.kts
Outdated
| kapt(DaggerLibs.daggerCompiler) | ||
|
|
||
| implementation (Utils.exoplayer) | ||
| implementation(GsonLibs.gson) |
There was a problem hiding this comment.
gson abzare khobi nist
lotfan az moshi estefade konid
| interface AppComponent { | ||
|
|
||
|
|
||
| fun provideWebService(): WebService |
There was a problem hiding this comment.
chera bayad service to scope application provide beshe?
|
|
||
| @JvmStatic | ||
| @Provides | ||
| fun provideWebService(retrofit: Retrofit): WebService { |
There was a problem hiding this comment.
har feature i mitone/behtare service e khodesho dashte bashe
pas niazi be inja dashtanesh nist
| return Retrofit.Builder() | ||
| //TODO insert Base URL here. | ||
| .baseUrl("") | ||
| .addConverterFactory(GsonConverterFactory.create(gson)) |
| ): OkHttpClient { | ||
| return OkHttpClient.Builder() | ||
| .addInterceptor(httpLoggingInterceptor) | ||
| .cache(cache) |
There was a problem hiding this comment.
toye debug va test cache nadashte bashim fek konam rahat tarim ke
kamtar ro mokh bere
|
|
||
| @Scope | ||
| @Retention(AnnotationRetention.RUNTIME) | ||
| annotation class MainActivityScope No newline at end of file |
There was a problem hiding this comment.
mitonim scope ro generic konim va ye scope baraye hameye Screen ha dashte bashim masalan:
ScreenScope
There was a problem hiding this comment.
با توجه به صحبت هایی که شد سر استفاده نکردن از اون اسکوپ جنریک،من منظورتو اینجا متوجه نمیشم،این جنریک ی که اینجا میگی و تو ذهنته چیه؟!
مورد بعدی اینکه اگر یه اسکرین وابستگی های متفاوتی از بقیه اسکرین ها داشته باشه اونوقت اسکوپ جدا میخواد و این اسکوپ کاربردی نداره،پس...؟
| } | ||
|
|
||
| object DaggerLibs{ | ||
| object GsonLibs { |
There was a problem hiding this comment.
benazaram Gson niazi nist
| } | ||
| } | ||
|
|
||
| // @JvmStatic |
There was a problem hiding this comment.
comment nadashte bashim fek konam code base tamiz tar khahad bod
There was a problem hiding this comment.
این به این منظور کامنت شده که بچه ها بعدا بتونن بر اساس نیاز ازش استفاده کنن یا اصلا بخوننش و هرجور میخوان تغییرش بدن.
There was a problem hiding this comment.
clean code mige code comment shode yejash milange!
There was a problem hiding this comment.
یعنی CleanCode تمام حالات و اتفاقات رو ازش باخبر بوده و در نظر گرفته؟
مسلما نه، مورد بعدی اینکه: من میفهمم ذات کد کامنت مشکل داره و استدلال CleanCode دراین رابطه رو هم میدونم اما ما با یه پروژه آموزشی سر و کار داریم نه پروداکشن حداقل تا این لحظه.
|
|
||
| @Scope | ||
| @Retention(AnnotationRetention.RUNTIME) | ||
| annotation class ScopeIn(val value: KClass<*>) No newline at end of file |
There was a problem hiding this comment.
in aslan tosie nemishe va piade sazie khobi nist
dar zemn besorate default @Named("") ro darim ke onam hamin ghad bade
va say mishe azash dori beshe
There was a problem hiding this comment.
لطفا دلایل بد بودنش رو بگید که همگی با منطق و دلیل بدونیم چرا نباید ازش استفاده کرد،اینجوری هم سوادمون بیشتر میشه هم خیلی بهتر تو ذهنمون میمونه که ازش دوری کنیم.
There was a problem hiding this comment.
oh kheili sakhte bazi chiza dalil avordan!
kholasash:
shoma bayad baraye scope haye mokhtale Scope jadid besazi va ono modiriat koni
in scope jadid sakhtane khanayi ro bala mibare va kheili vazeh hamechiz ro bayan mikone
vali hich kodom az ina ba pass dadane yek parameter ghabele hal nist!
baadesham in scope ye class e dige be onvane vorodi migire ke khob onvaght on class mishe scope khob che karie? chera ye scope jadid nasazim be jaye ye scope parameter e jadid??
dar zemn ye mozo i has be name in ke :
chizi ke mishe ye type bashe ro dakhele esm gharar nadim
No description provided.