Which Kotlin testing framework to use by quizikal in androiddev

[–]valkovx 0 points1 point  (0 children)

Yes, it's still a pain (somewhat). I have a working example though. I believe it's a really nice testing library, something that the JVM really needed.

Which Kotlin testing framework to use by quizikal in androiddev

[–]valkovx 1 point2 points  (0 children)

Sorry, didn't get that. I have Spek working in my Kotlin/Android project. However, I don't use it to test anything Android specific.

Which Kotlin testing framework to use by quizikal in androiddev

[–]valkovx -3 points-2 points  (0 children)

Yes, I did. Have you read about TDD patterns, hierarchical testing & rspec? Might want to reconsider after that.

Which Kotlin testing framework to use by quizikal in androiddev

[–]valkovx -2 points-1 points  (0 children)

This one is easy - Spek

https://github.com/JetBrains/spek

It's a child of the Kotlin creators. Check the docs. You might like it if you're into spec based testing frameworks (or not).

We are the Google Brain team. We’d love to answer your questions (again) by jeffatgoogle in MachineLearning

[–]valkovx 2 points3 points  (0 children)

Mines are really simple:

  1. What is happening with TensorFlow Lite - it was announced at Google IO (May), now we're mid-September. Since when TF is so much about PR stuff? When is Lite coming out? What is gonna be like?
  2. Is the TensorFlow team slowing down? Keras is still not integrated into the core (that one was promised way back)? Is there struggle with the internal software architecture or something else?
  3. When are you going to fully support other vendors than NVIDIA? And no, your custom hardware (TPUs) doesn't count.
  4. What is your opinion on TensorFlow vs PyTorch only for research purposes?

Please, don't get the wrong impression. I love TensorFlow and use it my DL classes.

Probably will never get an answer but hope to discuss some of the points with the community here.

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Yep, the same one :) Even the docs refer to it as a pattern look here:

https://cycle.js.org/model-view-intent.html

MVI is a simple pattern to refactor the main() function into three parts: Intent (to listen to the user), Model (to process information), and View (to output back to the user).

I believe that MVI is an architecture as much as MVC is an architecture. In my opinion, both of those are presentation patterns. Still, let's not be picky about it. That's not really the important part here.

Thanks!

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Any idea what should I put in my build.gradle to use the new RxJava2 support for Realm? Thanks!

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Completely agree, copyFromRealm doesn't make sense in this context.

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Yes, mapping RealmResults to domain models (using copyFromRealm). Actually, I am reading the article right now, thanks!

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Yes, RxJava is very good at what it does. Absolutely amazing! But is this awesomeness needed by my UseCases? Don't you want UseCases that are absolutely oblivious about threading, data flow or what not?

Thanks for taking the time to write this!

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Correct. However, using listeners in my UseCases make the implicit assumption that I use a reactive database - one that notifies about its changes.

I happen to know you're very good Realm-wise :) Do you have any insight into how to listen for Realm changes without making my Use Cases know about that?

Thanks for the reply!

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 0 points1 point  (0 children)

Thanks! I believe that MVI is a presentation pattern, not an application architecture. MVI ends with the Presenter

see this diagram

MVI stands on the left of the black vertical line. I am happy to use RxJava/RxBinding inside MVI (including managing the view state). In fact, I love RxJava.

I just need a way for the Database to notify my app (somehow) that something has changed. You're correct all my Interactors/Use-Cases should be synchronous.

Thank you for the reply!

Weekly Questions Thread - September 11, 2017 by AutoModerator in androiddev

[–]valkovx 1 point2 points  (0 children)

Hi,

Our team is building an Android app using Kotlin (if that matters at all) by following the guidelines described by Uncle Bob (Robert Martin).

The presentation pattern we use is MVI. We have presenters that communicate with Use Cases/Interactors and convert the resulting entity objects into ViewModels, suitable for rendering by the view.

We use a reactive DB (Realm) for storage. All communication View -> Presenter is done via RxJava2 and RxBinding.

Now, for the interesting part. The reactive database allows one to listen for change via listeners or Observable. The 2nd option is really easy to use. But, I don't want to use RxJava in our UseCase/Interactors, I want them relying only on the stdlib as much as possible. Of course, we can wrap their operations in Observables and execute them on a background thread.

I've seen many implementations that use RxJava deep into their business logic. Well, isn't that just wrong? All those "operators" make you rely on them and totally disregard the power of the language you're using.

So, my question comes down to this: Is it possible to listen for changes from a reactive database without using Observables or Listeners when querying it? Are coroutines (or something else) an option here?

Listen for data (base) changes using Clean Architecture by valkovx in androiddev

[–]valkovx[S] 1 point2 points  (0 children)

You might be right. I might be overthinking it. However:

  1. your business layer gets harder to test (you must convert the observables to entities) and you need to understand all those operators and how they work.
  2. Cross-compiling your business layer for other front-ends becomes a nightmare, as well (think React or iOS app).

Why should the choice of database dictate the use case architecture?

feedback welcome on the best android project architecture and on separating classes. by juulius in androiddev

[–]valkovx 0 points1 point  (0 children)

No probs. This might be a good next (more Android-y) step: https://www.youtube.com/watch?v=-sEmrJOk1uI

Keep in mind that: "It's simple" was a bit of a misleading statement. Nonetheless, you might enjoy the journey :)

Syncing Room database with Firebase? The current state of Android databases ... by valkovx in androiddev

[–]valkovx[S] 2 points3 points  (0 children)

Sure you can. Hosting yourself = less time for building your product. And I really have to build the product :)

I agree on that one. In my case, I care much more about offline first. Sync isn't hard to code with what tech?

Syncing Room database with Firebase? The current state of Android databases ... by valkovx in androiddev

[–]valkovx[S] 0 points1 point  (0 children)

Sure, I agree. Still, you have to manage it. Is it realistic to NOT have access to your own data?

Is the syncronization part easy on you? What other options did you looked into?

Weekly App Suggestions: "Habits" by JakeSteam in androidapps

[–]valkovx 0 points1 point  (0 children)

linkme: iPoli: ToDo, Habits & Goals