DEV Community

Cover image for Cross platform object oriented design πŸ’£πŸ’₯πŸ’₯
liskov for Sanga

Posted on

Cross platform object oriented design πŸ’£πŸ’₯πŸ’₯

Confused about too many names for the same property?

Tired of remembering all names other teams gave to the same feature?

Lisko, please give an example:

A good example from the industry is "String template":

  • iOS developers call it "String interpolation"
  • Kotlin developers call it "String template"
  • Javascript developers call it "Template literals".

But it is the same thing, like this giraffe. The only thing that changes is your point of view.

Alt Text

Shared architecture - same name on every stack

We at Sanga first encounter this issue with our IOS <-> backend
architectures and communications between them. When we saw it work
perfectly and without any misunderstanding we applied it to other sides
of our dev stack such as our frontend sphere, and it fitted like a glove.

The universal design language we created:

  • Contracts - The objects that pass between our stack parts
  • View Layer - Controllers, the topmost layer that creates an interface to be consumed (can be UI in an iOS app or REST API in a Β΅service)
  • Service - Business logic layer
  • Repository - Responsible for CRUD operations on our model.
  • Factory - Responsible for Converting Contracts to Models and vice versa.

Alt Text

Alt Text

Shared code

Shared architecture makes it possible to have a shared code.

We are currently on our journey to find the right way to share code between the different stack layers - but I wouldn't conclude it yet - as we didn't solve this question yet. when we do it will be one hell of a byte!

Thank you for reading, look for our next Byte

Made with ❀️ by Sanga

Top comments (0)