Active Topics

 


Reply
Thread Tools
mrojas's Avatar
Posts: 733 | Thanked: 991 times | Joined on Dec 2008
#1
So, I was reading a bit more about Android, and I don't understand why a VM like Dalvik was considered necessary (i.e. make all aps run there instead of directly over the Linux kernel). Anyone can give some input?
__________________
Hola! Soy un Guía de Maemo!.

Vínculos interesantes si nos visitas por primera vez (en inglés): New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)

Si te puedo ayudar con cualquier otra cosa, sólo dilo!
 
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#2
Originally Posted by mrojas View Post
So, I was reading a bit more about Android, and I don't understand why a VM like Dalvik was considered necessary (i.e. make all aps run there instead of directly over the Linux kernel). Anyone can give some input?
In a nutshell because the regular JRE is just to bloated for what they wanted. So they created their own stripped down version with a bunch of tweaks for a mobile platform environment. Was necessary essentially to get the speed they needed in the platform they had chosen
__________________
Class .. : Power Poster, Potential Coder
Humor .. : [*********] Alignment: Chaotic Evil
Patience : [***-------] Weapon(s): +2 Logic Mace
Agro ... : |*****-----] Relic(s) : G1, N900

 
mrojas's Avatar
Posts: 733 | Thanked: 991 times | Joined on Dec 2008
#3
Originally Posted by Bratag View Post
In a nutshell because the regular JRE is just to bloated for what they wanted. So they created their own stripped down version with a bunch of tweaks for a mobile platform environment. Was necessary essentially to get the speed they needed in the platform they had chosen
All right, I understand that, but why (in the meaning of the philosophical decision) they wanted a JRE in the first place? It restricts access to the system, introduces a bottleneck... hence wasting some of the hardware potential.
__________________
Hola! Soy un Guía de Maemo!.

Vínculos interesantes si nos visitas por primera vez (en inglés): New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)

Si te puedo ayudar con cualquier otra cosa, sólo dilo!
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#4
Originally Posted by mrojas View Post
All right, I understand that, but why (in the meaning of the philosophical decision) they wanted a JRE in the first place? It restricts access to the system, introduces a bottleneck... hence wasting some of the hardware potential.
It provides an isolation layer between the hardware and software - making it easier to port to new platforms, and providing a stable API for applications.
 
Posts: 1,213 | Thanked: 356 times | Joined on Jan 2008 @ California and Virginia
#5
If you have ever programed in Java, you would know that the same code theoretically works on EVERY platform with a JVM. So Android could run on ARMv5, ARM11, x86, etc... and the exact same app would work on them all. Native code would need to be recompiled for every platform.

Also, it adds an abstraction layer that means better security, sandboxing, no breaking the filesystem, etc...

There is a native development kit also, but it won't work on all hardware for the reasons above.
__________________
----------------------------------------------------

www.ezschool.com - The best online educational experience.
 
mrojas's Avatar
Posts: 733 | Thanked: 991 times | Joined on Dec 2008
#6
Originally Posted by Thesandlord View Post
If you have ever programed in Java, you would know that the same code theoretically works on EVERY platform with a JVM. So Android could run on ARMv5, ARM11, x86, etc... and the exact same app would work on them all. Native code would need to be recompiled for every platform.

Also, it adds an abstraction layer that means better security, sandboxing, no breaking the filesystem, etc...

There is a native development kit also, but it won't work on all hardware for the reasons above.
Aha! That's the answer I was looking for. I understand that is the same that Nokia wants to achieve with Qt, but in this case, the re-compilation would be needed (although, hopefully not rewriting).

Thanks for your answers!
__________________
Hola! Soy un Guía de Maemo!.

Vínculos interesantes si nos visitas por primera vez (en inglés): New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)

Si te puedo ayudar con cualquier otra cosa, sólo dilo!
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#7
Originally Posted by mrojas View Post
Aha! That's the answer I was looking for. I understand that is the same that Nokia wants to achieve with Qt, but in this case, the re-compilation would be needed (although, hopefully not rewriting).

Thanks for your answers!
Exactly.

I always think of it like coding in Python. A PyQt4 would be portable from one to the other without a recompile.. it would "just work" as long as the device has Python and QT on it.

Same idea with Android.. it will move from android to android and "just work".. no matter what hardware.

But then of course the drawbacks of increased overhead and slower speeds arguments come into play..
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#8
Originally Posted by Thesandlord View Post
If you have ever programed in Java, you would know that the same code theoretically works on EVERY platform with a JVM. So Android could run on ARMv5, ARM11, x86, etc... and the exact same app would work on them all.
Not exactly - most of Java code requires some middle layer libraries to do something useful and that libraries are NOT automatically exist on target platform. And some libraries are not open source, BTW.
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#9
Originally Posted by mrojas View Post
It restricts access to the system
Yep, the carriers love this.

Another reason is portability across phones.
__________________
Tidings - RSS and Podcast aggregator for Jolla - https://github.com/pycage/tidings
Cargo Dock - file/cloud manager for Jolla - https://github.com/pycage/cargodock
 
mrojas's Avatar
Posts: 733 | Thanked: 991 times | Joined on Dec 2008
#10
This was very enlightening:

http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html
__________________
Hola! Soy un Guía de Maemo!.

Vínculos interesantes si nos visitas por primera vez (en inglés): New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)

Si te puedo ayudar con cualquier otra cosa, sólo dilo!
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:16.