Non-game Android apps are normally written in Java, but a group inside Google is experimenting with a whole new way of writing Android apps using Dart, Google’s in-house Web development language. It’s Android apps with no Java, a focus on speed, and deep integration with the Web.

Dart was created by members of Chrome’s V8 Javascript engine team, after being frustrated with some aspects of the 20-year-old language they dealt with on a day-to-day basis. The group recently held a Dart Developer Summit where it showed off the Dart on Android project. Dart on Android isn’t called something obvious like “Dart on Android,”—it’s going by the name of “Sky.” For now Sky (Dart on Android) is just an open source experiment, but the project offers a lot of promise compared to traditional app development.

Being fast and responsive is one of the biggest goals for Sky. While 60FPS (or Hz) is the smoothness standard most devices and app developers aim for, the Dart team wants to crank that up to 120FPS, which isn’t even possible to display on the standard 60Hz smartphone screens we have today. That sounds rather improbable on Android, where many apps don’t stay at 60FPS, let alone 120. Rendering an app at 60FPS requires a frame to be drawn every 16ms, and apps “jank” or display an animation stutter, when they can’t keep up with the 16ms deadline.

The Dart team brought along a demo app, and it was rendering entire frames in 1.2ms. While it was a simple example, it appears Sky has plenty of headroom for silky-smooth animation on more complicated apps and makes that 120FPS goal (8ms rendering time) seem like a possibility. The Dart team says Sky is “Jank-free by design” with APIs that don’t block the main UI thread, meaning that even if the app slows down, the UI will still be fast and responsive.

Sky’s Web background carries over to the mobile space. It’s platform agnostic—the code can run on Android, iOS, or anything with a Dart VM. Apps work a little like websites, too. While there is a bare-bones Android APK, the majority of the app is served over HTTP, allowing for continuous deployment where everyone always runs the newest version. URLs are a base layer of DART, so everything is internet aware. The downside to this is that the demo app doesn’t work when you’re offline, and starting the app takes a second or two because it needs to download data. Both of these could be solved with caching, though.

Serving over HTTP makes development a lot easier. Instead of editing code, compiling, and installing the new app, code is edited on the HTTP server, and the app just needs to be closed and opened again to “refresh” it with the new code. It’s just like a Web browser. For Android development there’s the Sky Framework, which provides a whole bucket of Material Design widgets, allowing developers to easily add action bars, touch effects, navigation panels, and all the bits you would expect in an Android app.

Sky apps have full access to Android privileges and APIs, just like a normal app, but when combined with the automatic updates from a Web server somewhere, this makes for a big security question. Again though, Sky is just an experiment at this point, and questions like this need to be answered before Sky becomes a serious Android app solution. The group’s GitHub page says “We’re still iterating on Sky heavily, which means the framework and underlying engine are both likely to change in incompatible ways several times” but Sky’s focus on speed and different way of doing Android development makes it  seem like something to watch in the future.

[ Source :- Arstechnica ]