Saturday, August 31, 2019

Simplifying Architecture with Coroutines

It's been a while since we last spoke, and I've been hard at work.

Building further on my fun little reactive MVI architecture library - I've made some changes that I think you're going to be happy with. But first, some updates about apps.


My work in progress is almost done - I hope. At some point it will reach a clear enough level of function for a first release. The new app will be a utility that should help you manage the things in your fridge. I call it FridgeFriend - imaginative I know.

FridgeFriend is an open source application which serves as a psuedo shopping list manager, a sort-of fridge inventory management tool, and a kind-of reminder tool all in one. Before going shopping, you can tell FridgeFriend which items you plan to buy, including how many of each item - 3 boxes of strawberries, 2 bushels of kale, 5 apples - and it will remember your shopping list. Then, as you shop around at the store you can check each of these items off your list and it will leave your "needed items" shopping list and enter your "owned items" refrigerator list. When you attempt to add an item to your shopping list that you already have in the fridge, FridgeFriend will let you know. If you choose to tell FridgeFriend when your item will expire it will keep note of that too - and smartly remind you when your items are getting close to, or have expired. And don't worry about getting the date exact. Each time you get the same item, FridgeFriend will keep track of the previous expiration dates and will be able to suggest for you the correct expiration period based on all of your previous purchases. It may even be able to tell you cases where you consistently consume an item before its expiration date and remind you to purchase some extra.

FridgeFriend can also notify you when you have items on your shopping list and are within close distance to one of your local grocery stores or super markets. Since FridgeFriend respects your privacy, it will only inform you of the stores that you ask it to keep track of. Once you get close to a store, FridgeFriend can inform you about the items still on your shopping list - and may be able to suggest to you the stores which you most frequently purchase each item from.

All of this brainpower is local on your device, so there is no Internet and no tracking or analytics of any kind. FridgeFriend is entirely as smart as you let it be. Soon I hope it will be able to scan barcodes to enter shopping items for you, as well as consult an online food database about common shelf life for various items.

Of course, FridgeFriend is not yet done. Suggesting shopping items based on your history still needs to be built. Averaging the previous expiration dates still needs to be built. Frequent shopping location suggestion still needs to be built. As you can see, its still a little while away. But work is happening every day on improving FridgeFriend and making this dream a reality.

Unfortunately, life can get in the way. This is, after all, a passion project for me and therefore I can only allocate to it the time that I believe is not better served doing something else - and many times there is something more important that needs doing. So please, be patient with me and eventually I'll have a nice sharp new tool for you all to use.


You may also notice, that a Privacy Policy and Terms and Conditions have been added to all applications. This is strictly to stay in compliance with the Google Play policy guidelines and does not mean that my applications are taking any kind of radical shift in direction. They will always be open source, and will never track you or collect or sell your information. There will never be advertisements or incentives for donation, and all pyamsoft applications will be built for the users, and with the users in mind.


FridgeFriend, and all of the pyamsoft Android applications, will make use of my new MVI library. There have been some fundamental changes to how the library works - mainly that it has dropped the requirement of using RxJava to handle view and controller events in the UiViewModel classes. All events are now handled via built-in Kotlin coroutines, which are lighter on memory, faster on the device, and easier to read and write. The entire PYDroid library has moved to coroutines, which drops the requirement for RxJava across all pyamsoft applications. Take a look at the improvements to the ViewModel and state handling here!

I will most likely release updates to all applications once FridgeFriend goes live on the store - please be patient while I sort everything out. I hope you are as excited as I am to have a new tool to use soon!

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================