is there any documentation about your rendering engine available on web - smartface.io

I am wondering How you are converting from java script code to Android native components, are you doing this using c++ to java calls and do that on the fly.
so the engine will be installed before on the device ?

First there are three layers. JavaScript, Core and Native (iOS or Android).
JavaScript Engine is based on WebKit's engine named JavaScript Core (JSC), it is directly bound to Core which is written in C++. Native Android part is developed with Java, iOS part is with Objective-C. Between Core & Native layer there is a Bridge Architecture. This bridge establishes communication between Native object and the corresponding object within the Core.
When you do something within JavaScript side, first it updates the Core then Core updates the UI.

Related

How to make shared logic usable for cross-platform native apps?

So I am currently using Xamarin for multi-platform mobile applications. I really like the way this works, and I want to improve my flow. My developers have said that they would be much faster when programming natively (i.e. Swift for iOS in XCode).
I have looked for a solution, where I can create a shared project and use it in native apps, but I have only found ways that involve programming in one language for all platforms.
Is there a way to create a shared project, which can be imported into a native application (or better, can be run together, like a shared project in Xamarin)?
The language for the shared code is not important, as long as it isn't slow.
My developers have said that they would be much faster when programming natively (i.e. Swift for iOS in XCode)
Swift can be used natively for iOS apps. RemObjects' Silver is supposed to make Swift ready for Android and .NET. I've never tested it. Try it out, it's free.
RoboVM can be used to write iOS apps in Java. I didn't try it out either.
Language mixing with Xamarin
In case you want to mix Swift code with C# code using Xamarin then you can bind Objective-C compatible Swift code and use it in iOS projects only. You are not able to execute Swift code on Android or Windows Phone! It's not possible to write platform independent business logic in Swift and and use it in a shared library or PCL with Xamarin.
You face the same restrictions for Java code on Android: You can bind JARs and use them in a Xamarin.Android project but you cannot use them on iOS or Windows Phone.
You are also unable to execute C# code in a Swift based app on iOS or in a Java based app on Android.
You can use native code in Xamarin apps via Binding Libraries. You cannot use Xamarin libraries in native apps.
If the goal is to use truly native tooling, in their standard languages (meaning not Xamarin) and still share code between iOS and Android, this can be achieved by writing your non-UI code in C++.
Here's a very interesting article about how Dropbox does exactly this.
C++ is natively supported on iOS and it is very easy to interface
between Objective-C and C++ using Objective-C++.
On Android, calling into C++ can be done through the NDK, which
reportedly is not a pleasure to use. Dropbox found Google’s meta-build
system gyp to work reasonably well. In addition, the Java Native
Interface is a pain you have to accept. But none of these issues is a
roadblock, and Steven expressed hope that Google or the community will
build better tooling support over time.
And here's a simple example of how to do this from another StackOverflow post

Is it possible to develop an Entity Layer with ANSI C/C++ or Embedded C to be used both in Android & iPhone platforms?

I need to create a common entity layer for my mobile phone application developments.(especially iPhone and Android platforms).Later on I want to develop some parts of business logic and interfaces with specific tools /languages used to develop for those two platforms.
(I've been searching about cross mobile frameworks and I know about most of the popular ones.
Rhodes,PhoneGap,Appcelerator,Corona,MoSync,Sencha Touch,jQuery etc.
People made various combinations with those frameworks to create native,native-like,mobile web based applications.
To create a cross platform application is not my main goal.)
This blogpost suggests ANSI C/C++ for porting applications across iOS and Android platforms.
http://community.developer.motorola.com/t5/MOTODEV-Blog/Porting-apps-from-iOS-to-Android-devices/ba-p/11144
Due to this blogpost I think it is possible to create an entity layer to be mapped and used on two platforms.
Had anybody ever tried to achieve this? Or know any other way to implement an entity layer to be used in both iPhone and Android?
By using ANSI C/C++, i.e. standard C/C++ without extensions, it will make an easier porting, but it also depends on the libraries (libc version an so on). With Android you can either use the JNI or code a native activity, but obviously that isn't portable and the idea of using native code is performance, not portability.

Cross Platform Apps

I am not much clear with the "Cross Platform Apps." Can we really built up some apps which can run on iPhone/iPad , Android Phones/Tabs , Blackberry , Nokia (Any platform or more than one platform at least) ?
I have heard something like WAC , Titanium but really not clear with all these. Please help me out.
There are some good frameworks out there to build cross-platform mobile applications:
Titanium: It is a framework to build Android, IPhone (and BlackBerry, still in beta it seems) using javascript, that will compile to native applications for the platforms specified.
Rhodes: A ruby framework, that supports almost all the mobile platforms out there (recently they added support to WP7). It has an MVC structure, and can use RhoSync to synchronize the data to a server side application.
PhoneGap: Another javascript framework, but it supports more platforms than Titanium, because it doesn't compile to native applications, but it embeds a web application inside a native application (web apps/web views are supported in each platform, so it's easier to handle the portability this way).
The apps will have access to the hardware, like the camera/gps, through some generic apis.
In some case you can build specific native module to integrate them in just one application platform if you need to.
These frameworks are useful to build cross-platform application writing just one application, without having to write each single application with the platforms sdks.
They have some (or many) limitations. If your application are simple enough you can consider using one of those framework. But for more complex ones, sometimes, if you target only a couple of plaforms, it could take less time to build each one with native sdks individually than using one of this cross-platform framework, because of their limitations (I highly prefer using the Android SDK than using Titanium).

How do cross-platform mobile app development frameworks work?

How are Rhodes, Phonegap, and Appcelerator able to take Javascript or Ruby, and compile them into binaries for app SDKs that normally require apps to be written in Obj-C, Java, and others?
Jeff Haynie, Appcelerator co-founder, explains how Titanium Mobile works here.
Phonegap uses the default browser rendering engine, and uses that to display your application.
The javascript is then handled by the native (compiled) part of the framework.
Appcelerator uses something simular, but compiles the whole application if i remember correctly.
MoSync uses a somewhat simular setup as javaME.
Rhodes uses local server. It uses this to communicate with the device.
A Javascript interpreter is built into the webkit browser engine, and the iPhone/iOS SDK gives enough access to this interpreter to run nearly an entire app written in Javascript, with just a tiny Objective C wrapper to start things up.
Android supports native ARM machine code though the NDK, so nearly any language with a compiler that can create a stand-alone ARM binary (but requiring little to no OS access) can be used as a library and accessed via the NDK interface from a Java app stub.
I've created an open source project http://propertycross.com that helps select a cross-platform mobile framework by showing the same application implemented with Sencha, Titanium, Xamarin and more. The project also includes details of how each framework works. It should help you compare end-user experience, code, developer experience and code shared between the various options.

Maintaining product for Android + iPhone

This is a question to all of you out there who develop for both Android and iPhone. How do you maintain support for the two platforms? Specifically, do you
maintain the two products totally separate from each other?
create "native" GUIs in Java/ObjC and a "core" library in C/C++?
write both versions in the same language (e.g. Java) and a third-party tool to generate code for each platform?
write everything in the same code base and use an even more fancy tool to generate native bindings for each platform?
I do create "native" UIs in Java/ObjC and core library is usually in C/C++. That's when the application I am maintaining requires a complex core library.
When the application is simple enough, I just maintain two code bases: Java/ObjC-CocoaTouch.
As far as I know, there are no fancy tools to generate binding for each platform. Maybe Monotouch will officially support Android at some point and you will be able to do everything in C#: Android, iPhone and Windows Phone 7!