Hi! I'm thinking about architecture of multiplatfo...
# multiplatform
b
Hi! I'm thinking about architecture of multiplatform library. For example we have expect class
Client
. This class should have a lot of code for all platform, but difference is in method to make (for example) HTTP request. Currently I have
AbstractClient
class with common code and
expect class Client : AbstractClient
(actual classes implements platform dependent stuff). Is this good architecture? Or maybe should I make delegate all platform depended stuff to separate classes and use "plain"
Client
class? Another problem (related to previous): I have
Request
class. Responses are handled asynchronously, but in JVM (and only in JVM) implementation I want to have method
getResult()
, what works synchronously (waits for result). How architecture, design patterns should I use for that?