Delphi XE5 un ide per sviluppare su Android e iOS

Delphi XE5 un ide per sviluppare su Android e iOS è l’ultima release uscita pochi giorni fa di delphi. Embarcadero si era prefissata il difficile compito di rendere lo sviluppo delle applicazioni mobile più produttivo e di permettere ai programmatori di scrivere una volta sola lo stesso codice sia per realizzare app iOS sia app Android. Sembra che siano riusciti a fare tutto questo nei tempi previsti, Delphi XE5 infatti possiede un compilatore nativo. Questo significa che compilerà direttamente le istruzioni in liguaggio macchina per il processore ARM, il target non sarà quindi la java virtual machine di android (Dalvik) ma direttamente il processore. Se da un lato questo sistema renderà molto veloci le applicazioni potrebbe creare problemi di compatibilità nei dispositvi, ci sono infatti i seguenti requisiti:

embarcadero-delphi-xe5-android-iOS

Compatibilità Hardware

Il dispositivo deve avere una GPU
La CPU deve essere ARMv7 con il supporto per le istruzioni NEON

Compatibilità OS dispositivo:

GingerBread: Android 2.3.3+ (MR1 or later), which is API level 10
Ice Cream Sandwich: Android 4.0.3+ (MR1 or later), which is API level 15
Jelly Bean: Android 4.1+ (release, MR1, MR2 or later), which are API levels 16, 17 and 18

Compatibilità emulatore Android:

L’emulatore deve saper emulare la GPU
L’emulatore deve avere com OS Ice Cream Sandwich o Jelly Bean
L’emulatore non potrà essere dentro a una Virtual Machine (cpu sbagliata :))

Il fatto di non avere codice standard java android non è una cosa molto bella, secondo me potrebbe portare ad avere dei problemi a comunicare con altre librerie o API esterne di altre applicazioni e si è poi totalmente dipendenti dall’ecosistema embarcadero. Delphi con la versione XE5 è l’unica azienda al mondo che ha creato un ide in grado di sviluppare con lo stesso codice grazie a Framework Firemonkey per le seguenti piattaforme:

32-bit Windows
64-bit Windows
32-bit OS X
iOS Simulator (Intel)
iOS (ARM)
Android (ARM)

Molto probabilmente avrò a che fare con questo sistema (spero di no) e in futuro forse scriverò se effettivamente questo Delphi XE5 sarà valido o solo fumo e niente arrosto, certo la seguente frase riportata da computer world non è molto rassicurante dire che java per android è un linguaggio limitato perchè tipizzato mi pare una gran cavolata, certo è vero che il codice tende a incasinarsi ma questo avviene per tutti i linguaggi delphi compreso! 🙂

We have found that the Java world of Android is very difficult to create the apps we want because of language limitations such as strongly typed variables that make it next to impossible to define protocol structures. In Delphi, none of these problems exist.

Vi lascio con un video che mostra la creazione di un app di prova con Delphi XE5

Un ultimo articolo molto interessante (in inglese) da leggere su Delphi e Firemonkey è questo che critica l’ambiente che favorisce la scrittura del codice tutta nell’interfaccia senza la dovuta separazione come avviene nei framework MVC: Why FireMonkey is so fundamentally wrong in every aspect of it’s being questo tuttavia è da prendere con le pinze perchè con qualsiasi linguaggio si può produrre spaghetti code, anche se è decisamente vero anche che ci sono dei framework che aiutano a scrivere meglio il codice.

Fonti
RAD Studio XE5 supports development for Android, multiple form factors
http://blog.blong.com/2013/09/delphi-for-android-aka-delphi-xe5-aka.html
http://blog.marcocantu.com/blog/delphi_xe5_released.html

L'articolo ti è stato utile?

Condividilo sulla tua rete di contatti Twitter, sulla tua bacheca su Facebook. Diffondere contenuti che trovi rilevanti aiuta questo blog a crescere. Grazie!

3 thoughts on “Delphi XE5 un ide per sviluppare su Android e iOS

  1. Sebastian P.R. Gingter

    Hi,

    thank you for the pingback and mentioning my blog post. I must admit that I (sadly) don’t speak italian and I needed to use google translator to read your post. So I apologize upfront if I misunderstood something.

    As for the quote from computer world you mentioned on the “Java is bad because its strong typed”: Yes, this is bullshit 😉 Delphi, too, is a strongly typed language. The difference is, that Java is a fully managed runtime, while Delphi yet tries to go that direction by introducing ARC reference counting in its new memory manager, as the next step from switching to FastMM a few years ago.

    Java, Delphi and also C# are in the same ways strong typed, and their code is compiled. In the case of delphi to binary code that can directly be executed on a CPU. In the case of Java and C# it’s first compiled into an intermediate format (Java bytecode / IL code). Only on the executing computer it’s then compiled just before runtime into CPU-executable code. At this stage the advantage of managed code comes into play, as the compiler can optimize the resulting binary code a bit better to the actual machine it will run on. I just mention that because I’m a fan of managed environments. Probably mainly, because I don’t write desktop applications but backend-services and web applications where these features shine better than on the desktop.

    Well, back to topic: Most dynamic languages are interpreted and not compiled, and this mainly applies to languages such as JavaScript, PHP, Python or Ruby, just to name the probably most known of them. Not being strongly typed, as you are – by definition – in dynamic languages, indeed gives you a lot more flexibility, but this flexibility comes at a cost.

    The father of Delphi, Anders Hejlsberg, is a great language designer. He took the best things of Delphi (component orientation) and looked a bit at Java (managed), added some more C-style syntax and then came up with C#.
    He also noted the flexibility you have with dynamic languages like JavaScript, and he also accounted for the drawbacks you have with the dynamic part. So he invented an extension to JavaScript that allows you, to strongly type Javascript at “design-time” (actually: coding time). This is called TypeScript and allows the developer to define types and methods in Javascript, using a syntax that strongly reminds me of Delphi: functionname(parametername: type), instead just functionname(param). The great thing is that this is optional, and just helps you with tooling, Intellisense and inspections. And the TypeScript ‘compiler’ just strips away all type information / annotations and you end up with pure JavaScript.

    I love what Anders did because he actually got to the point of the problem.

    The point of the problem with mobile development, and cross-platform development is, that you need to leverage the full potential of the platform you’re working against to succeed. Delphi might be right tool for that if you can access the platform native APIs. Firemonkey isn’t, because it abstracts you away from that and won’t let you shine as you could.

    1. evilripper Post author

      thanks you for your super comment!
      I’m totally agree with you, but the project manager not with me. I didn’t know that Anders has worked on development of TypeScript, thanks for the information!
      The native APIs are essential to create app with great user experience, the only way IMHO is use the tool of google for android or xcode for iOS. I’m so sorry for my bad english!
      have a great day 🙂

  2. Pingback: Delphi XE5 un ide per sviluppare su Android e i...

Comments are closed.