Java Class Inheritance in NativeScript for Android

One of the more advanced scenarios in NativeScript for Android is the inheritance of Java classes. Let’s take a look at the following example. // app.js var MyButton = android.widget.Button.extend({ setEnabled: function(enabled) { // do something } }); var btn = new MyButton(context); (Please note that at the time of writing NativeScript is in private …

First Impressions using Windows 10 Technical Preview for phones

Windows 10 Technical Preview for phones was released two days ago and today I decided to give it a try. The installation process on my Nokia 630 was very smooth and completed for about 30 minutes including the migration of the old data. Finally, I ended up with WP10 OS version 9941.12498. After I used …

Embedding Chakra JavaScript Engine on Windows Phone

Today I am going to show you how to embed Chakra JavaScript engine in Windows Phone 8.1 app. Please note that at the time of writing this app won’t pass Microsoft Windows Store certification requirements. I won’t be surprised though if Microsoft reconsider their requirements in future. Last year Microsoft released JsRT which exposes C-style …

Running JavaScriptCore on Windows Phone 8.1

After the first release of NativeScript I decided to spend some time playing with JavaScriptCore engine. We use it in NativeScript bridge for iOS and so far I heard good words about it from my colleagues. So I decided to play with JavaScriptCore and compare it to V8 engine. At present NativeScript supports Android and …

NativeScript is Live

I am happy to announce that yesterday our team released the first early preview of NativeScript. The last few months I worked on the JavaScript-to-Java bridge for Android platform. Check out the introductory blog post and the documentation pages.

Java and V8 Interoperability

The project I currently work on involves a lot of Java/JavaScript (V8 JavaScript engine) interoperability. Fortunately, Java provides JNI and V8 has a nice C++ API which make the integration process very smooth. Most of the Java-JNI-V8 type marshaling is quite straightforward but there is one exception. The JNI uses modified UTF-8 strings to represent …

ECMAScript 262 And Browser Compatibility

I was curious to check how well the current browsers implement ECMAScript 262 specification. At the time of writing I have the following browsers installed on my machine: Google Chrome (34.0.1847.116 m) Microsoft IE (11.0.9600.17031 / 11.0.7) Mozilla Firefox (28.0) I guess Chrome, IE and Firefox present at least 90% of all desktop browsers. I …

Native code profiling with JustTrace

The latest JustTrace version (Q1 2014) has some neat features. It is now possible to profile unmanaged applications with JustTrace. In this post I am going to show you how easy it is to profile native applications with JustTrace. For the sake of simplicity I am going to profile notepad.exe editor as it is available …