Skip to content

Architecture #57

Closed
Closed

Description

@Larpoux

Architecture

Sounds has clearly two layers :

  • The high level layer, in Dart
  • The low level in Objective-C and Java

It seems that the Sounds team wants to give a priority to the high level layer.
This has at the same time benefits and inconveniences. As usual, we cannot have a cake and eat it (as say Britannic people).

Pro

It is probably possible to do everything in Dart (even what is done actually in the law layer) and just limit the calls to Objective-C and Java for System calls.

This would have fantastic benefits. Just one language, one debugger, one set of utilities, etc...

The code can be beautiful and I like very much this idea.
Of course it means that we must have a very efficient interface between Dart and the OS layer. FFi is probably the correct way to do things, because if we do everything in Dart, the Asynchronous messaging system between Dart and Objective-C/Java is not useful.

Most of the code developed in the high level can be shared at the same time by :

  • iOS
  • Android
  • Web App

If one day we support Linux, this code will be shared too.

Con

There is a problem with the portability. Dart does not exist out of Flutter. Everything developed in Dart cannot be shared by other platforms :

  • React Native uses Javascript
  • Solar2D uses LUA
  • NativeScript uses Javascript
  • Cordova uses Javascript
  • Xamarin uses C#
  • ...

If we want to support other platforms than Flutter, it is clearly better to develop in the low layer.

My opinion is that both choices are good. Flutter Sound is actually on the second way. See this.

But it is possible that the first way will be better in the long run.
For the first time I see a very good reason to have two projects. And if Sounds succeeds (I wish it does), then it will be time to kill Flutter Sound, and I will have more time to spend on other projects.
But the death of Flutter Sound is not for now...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions