Sunday, November 15, 2015

Flutter – Cross Platform App Development Framework from Google

Flutter is a new cross-platform app development framework from Google that allows apps to be created for both Android (KitKat or later) and iOS (iOS 5 or later). It's all open source and still being developed by engineers at Google and you can follow two engineer's profile at Chinmay Garde & Devon Carew. The main focus of Flutter is to provide low-latency input and high frame rates (60fps) for high performance on Android & iOS.

Flutter Architecture

Flutter is built with C, C++, Dart, Skia (a 2D rendering engine), Mojo IPC, and Blink’s text rendering system. To have better understanding of the main components, please check the below architecture diagram:-

High-Level Overview of Flutter Architecture
Flutter has three main components:-
  1. A heavily optimized, mobile-first 2D rendering engine (with excellent support for text)
  2. A functional-reactive framework
  3. A set of Material Design widgets, libraries, tools, and a plugin for Atom

How do Flutter apps work on Android & iOS?

For Android, the engine’s C/C++ code is compiled with the Android NDK (Native Development Kit); the majority of the framework and application code runs on the Dart VM, which generates JIT-compiled optimized native code on the device. For iOS, the C/C++ code is compiled with LLVM; Dart code is AOT (Ahead-of-time) compiled into native code. Apps use a native instruction set & on both platforms you can call native services via Mojo’s IPC system.

Why is Flutter better than other cross-platform frameworks?

Flutter is different than most other options for building cross-platform mobile apps because Flutter uses neither WebView nor the OEM widgets that shipped with the device. Instead, Flutter uses its own high-performance rendering engine to draw widgets. Flutter also offers developers a highly productive and fast development experience, fast runtime and engine performance, and beautifully designed widgets that make for beautiful apps.

Platform & IDE support for Flutter

The programming language used is Dart which is also open source & which became available about a year ago. Dart is a mix between c++ and Java and supports classes with single inheritance. It supports interfaces, abstract classes, reified generics and optional typing.

Flutter uses Atom as its IDE with the dartlang plugin which currently contains functionality related to creating the app from the template, syntax highlight, code complete, refactor, launch apps, show type hierarchies, jump to definition and running Flutter projects.

Flutter currently supports developers on Mac and Linux. Windows support is in the works.

Are apps production ready?

At present, Flutter isn’t suitable for production apps and you can’t yet produce installable apps that easily (work is still in progress).