Dart for Android apps with 120fps
github.com
github.com
Android could be much more performant, but one would have to replace almost everything regarding UI and layout. Apps built with Dart cannot be much faster unless they do that.
I thought about rewriting/extending the base-class "View.java" to get more performance and less bugs (the default layouting algorithm seems to have exponential runtime! [0]), but the problem is
a) it would break compatibility with many other UI-components and
b) the behaviour and structure of the code is almost impossible to understand and imitate.
Just look at this beast: 8866 LOC without comments in one class [1].
[0] https://stackoverflow.com/questions/17493819/is-android-layo...
[1] http://grepcode.com/file/repository.grepcode.com/java/ext/co...
I'm hoping with Rubin out this changes and Android is held to similar standards as the rest of the company.
Related talk & demo: https://www.youtube.com/watch?v=PnIWl33YMwA
The exciting thing here is that from a developer's point of view sky is just a Dart package and you can immediately start to write an Android application but still keep a fast feedback loop similar to web development (like you've seen in React-Native demos).
...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.
So this is effectively a permanent 'wget |sh' kind of system? Sign me up!
Web browsers have the ability to use your location information, microphone, camera, and local storage. Plus the web browser is almost always running.
You may not realize it, but you already trust your web browser to protect you and safely dole out permissions. Why would a next-gen application environment be any different?
You don't permit browser access to all that when you visit a internet page. You do on Android if you want to install an app.
"Both of these could be solved with caching, though."
Sounds like it is up to you if the app you deploy to the app store will have this ability or not or on which side of the spectrum you want to be.
When you look at the Facebook app (or other popular apps) they've found ways to 'update' parts of the application (or behave differently eg for a/b testing of new functionality) without the user having to download a new version.
Do you use any web apps? Those are updated and re-downloaded regularly, depending on how the app is built.
If you use an Android or iOS-based device, the software on it often becomes out-of-date and requires an upgrade in order to restore and improve functionality.
The app writers should have such control. The 'poor shmucks' have as much power as always in this ecosystem, because they can choose what apps they want to trust and use.
Dart team; stop screwing around and pay attention to this! Dart has failed as a browser script language, but its a good language in itself.
A cross platform language for building high performance apps, with a good package management solution and tooling... Thats a compelling use case. Something like a cross platform Swift...
Add some compiles to native binaries (or some kind of runtime bundling like xamarin do) and you'd have a pretty interesting piece of tech there.
('lets focus on our to javascript compiler for the dart compiled from typescript because the dart runtime is never going into Chrome or any other browser' is not. Stop running down that ridiculous road already)
http://www.blurbusters.com/mobile-120hz-ips-displays-for-sma...
I'd be quite interested to see one for myself and get an idea whether it makes for a noticeably smoother experience. I expect there will be a lot of trouble getting software to reliably hit that number, though, especially Android...
I would think the added power draw from rendering at 120 Hz would come from all the applications needing double the number of graphics-calculations they need at 60 fps.
By making it twice as efficient. Partially by using fewer cycles to compute but probably largely avoiding tiny waits that waste power without computing.
The codebase is a forked version of chromium, but with a lot of legacy web cruft removed. The DOM api is replaced with a new more modern api. CSS has some important performance bottlenecks removed.
It also allows linking to off main thread code written in C++, Java, Go, JS, Python and Dart. Main thread code must be written in Dart.
They are aiming for the performance of native, but with a development toolset similar to the web.
IMHO a very worthwhile experiment.
Edit: The specs here give an idea of what the system is/does.
Same thing for the square spinning at 60 fps. Call me back when there are 1000 of these.
Don't get me wrong, it is a very interesting experiment but it is hard to get excited for something so limited.
Sky opens the door to use Dart on the server side, on the web as well as for highly performant native apps for Android (and eventually for other platforms like iOS).
What's wrong with using GWT and J2ObjC other than the fact that there are people who don't enjoy building stuff in Java?
For example the Inbox team did a fantastic job re bringing a great user experience to multiple platforms and I guess they were glad that they could use one language throughout instead of having to jump between various tools and idioms (see http://gmailblog.blogspot.com/2014/11/going-under-hood-of-in...).
It's just that like you mentioned people do have different preferences when it comes to languages/tools/ecosystems. That's all.
There are people building web services using PHP, Ruby, Python, Java, Haskell, Elixir, Erlang, Go, C++, JavaScript, Dart. Why not also have this choice on mobile?
Sure, let me add another layer of abstraction because some people only know Java...
They are building a competing VM, DartVM.
Because of the way Dart (and its VM, built for its needs) was designed, they believe they can eventually outperform Java on the JVM, all the while providing a fully dynamic programming language, because of smart runtime optimizations.
If they win this bet, they'll have made an acceptable replacement for the way Android apps are built. Then, things would get inversed, and developers wishing to keep using Java would use a Java-to-Dart compiler (instead of a Java-to-JVM bytecode one).
There certainly are people who are happy with Java and Objective-C but there are many who'd like to use different languages/runtimes/ecosystems.
The popularity of projects like Cordova and CrossWalk show how much demand there is to build applications using web technology even if you have to pay for it in performance.
Sky is a way to use Dart without having to compromise on application performance nor on development feedback speed and debugging tools.
Also think of the people (whether large or small companies) who have to support multiple platforms (Web, Android, iOS, Server, …) simultaneously and right now are forced to use multiple languages and tools for building/debugging. This is incredibly costly, especially if you want to deliver high quality products.
They are building Java apps like Inbox that work on many platforms, using tools like Google web toolkit and J2ObjC.
Plus there is the App Runtime for Chrome, which basically allows Android apps to run in Chrome on any desktop OS.
And now there is this Dart approach. Hopefully these different teams are collaborating and will eventually converge when one of these tools eventually takes off.
In the near future, I would be less surprised to see them adopt Kotlin : it fixes many of java weaknesses, accepts java classes and produces compatible bytecode.
Such is life.