32 ms·
Yeah, is sad that React Native/ Flutter/NativeScript can't be used directly without the JS/Dart non-sense. It kill the "its native" with a poorly interface.
by mamcx 9y ago
Yeah, is sad that React Native/ Flutter/NativeScript can't be used directly without the JS/Dart non-sense. It kill the "its native" with a poorly interface.
- hajile 9y agoDart offers the static types and traditional classes of Java with the closures, first class functions, rapid iteration, and other nice parts of JS. Dart is a very nice middle ground in my opinion. Dart now supports AOT compilation too. Flutter is a lightweight declarative UI on top of Skia with hooks into the relevant native events. That means it should generally be easier to get good performance than with React Native (not to mention replacing Android's horrible UI architecture that seems designed to prevent 60fps from happening). Once you start talking about going cross-platform, you have to start talking about compromises. Flutter seems like a very nice compromise when compared to the alternatives (only thing it's missing is the ability to compile to either HTML or Canvas).
- mamcx 9y agoSo, how "easy" is to interface flutter with swift/java/xamarin or similar? I could live with a "small" dls if is constrained to UI rendering and let me do the logic on a more native lang...
- hajile 9y agoThere's been a C dart FFI for years. Communicating with whichever other system shouldn't be any harder than the next language. None of those would be my first choice though. The less platform specific code you write, the fewer platform specific issues you'll be dealing with. Plus xamarin isn't native anywhere. With Flutter apps using the AOT, performance should already be good. Here's an interesting real world comparison between libsass (a C library) and dartsass. https://github.com/sass/dart-sass/blob/master/perf.md https://github.com/sass/dart-sass/blob/master/perf.md From the Flutter FAQ https://flutter.io/faq/# https://flutter.io/faq/# > How does Flutter run my code on Android? > The engine’s C/C++ code is compiled with Android’s NDK, and any Dart code is AOT-compiled into native code. The app runs using the native instruction set (no interpreter is involved). > How does Flutter run my code on iOS? > The engine’s C/C++ code is compiled with LLVM, and any Dart code is AOT-compiled into native code. The app runs using the native instruction set (no interpreter is involved). > Can I access platform services and APIs like sensors and local storage? > Yes. Flutter gives developers out-of-the-box access to some platform-specific services and APIs from the operating system. However, we want to avoid the “lowest common denominator” problem with most cross-platform APIs, so we do not intend to build cross-platform APIs for all native services and APIs. > A number of platform services and APIs have ready-made packages available in the Pub repository. Using an existing package is easy. > Finally, we encourage developers to use Flutter’s asynchronous message passing system to create your own integrations with platform and third-party APIs. Developers can expose as much or as little of the platform APIs as they need, and build layers of abstractions that are a best fit for their project.