Iztok has been at it again, making comments that prompt another post. 🙂 He expresses his view that there are only two viable options for mobile development. The first is essentially the web-based technology approach (HTML/JS/PhoneGap etc) and the other is the platform native tool chains, Eclipse/AndroidStudio/Xcode etc.
He may be correct about the latter, and at some point in the future I may have to switch from Oxygene to those platform tool chains.
The Future Perhaps Lies in the Past
Before Oxygene I already tried those platform tools. I just couldn’t get on with Eclipse at all and have always hated Java. I also started learning Xcode and Objective-C and whilst this was vastly more enjoyable than Java/Eclipse and I could appreciate the idiosyncrasies of Objective-C at a technical level, it was still not what I’d call fun. And when the learning is for it’s own sake, fun is a key ingredient.
The problem I think is/was this: I have 20 years of Pascal behind me (plus numerous other languages, but Pascal has been my principle language skill). With so much ingrained knowledge, It’s asking a lot to learn a new IDE, a new framework (two in fact) and a new language all in one go. A far different proposition than when it’s the first and only thing you have learned, with no habits and preferences having had time to bed in.
But lest you get the wrong impression, I am by no means a monoglot. Over the years I have used many languages in a commercial setting, sometimes even at the same time (i.e. within a single project/product development). These have included, in no particular order:
- COBOL
- various BASIC dialects (GW, SuperBase, DATA/BASIC, VB)
- FORTRAN
- Modula-II
- TurboPascal For Windows
- C/C++
- SQL/Windows
- PowerBuilder
- Java
and, of course
- Delphi
Something I have found over the past 20 years is that I – personally – find it easier to learn by relating new knowledge to the fundamentals of familiar ones before grappling with the entirely new aspects.
I find that it helps to have familiar points of reference off of which to hang your learning.
Whether this was a habit I formed from my first experience of acquiring a new (i.e. more than one) language or whether that first experience was simply the first time I was exposed to this method of learning, I don’t know. Cause or Effect ? I’m not qualified to decide. 🙂
But that first experience provides a useful – and simple – illustration.
From BASIC to ‘C’ – via Pascal
I found my way into this industry through an informal path – entirely self-taught.
The first language I tried to learn after BASIC on various home computers (ZX81, TI-99, Amiga) was ‘C‘ (SAS/Lattice on the Amiga), and I found it near impossible to start with. I just could not get my head around pointers and you couldn’t avoid them since strings were built on them! The syntax and notation perhaps made it harder (for me, for some reason). Then I found the HiSpeed Pascal compiler for the Amiga – based on TurboPascal 5. This was much easier, coming from a BASIC “background” (remember we’re talking teenage bedroom years here, not practical working experience or classroom learning).
Pascal enabled me to learn some more advanced concepts in relatively familiar territory. Strings in particular were something I could just “work with” just as I had been able to in BASIC. I simply had to learn new ways of doing LEFT$ and RIGHT$ etc (learning BASIC on the Amiga meant I had already progressed beyond WHILE INKEY$ WEND as an “event loop” :))
But pointers did also exist in Pascal and in that setting I could make sense of them and the concepts. Thus armed with what I learned in Pascal I could tackle ‘C’ again and this time it was (relatively) easy.
What Does All This Have To Do With Delphi ?
Learning for learning’s sake is all well and good, but when your livelihood depends on skills that you must learn it is also important to choose to learn skills that will continue to support that livelihood.
What is unavoidable is that mobile development is going to become only more important, though I do not believe it will ever entirely supplant the desktop. At least not any time soon.
So I understand the attraction of FireMonkey. It reduces the learning challenge to just one: a new framework – with the promise of easy access to these new mobile platforms. But that framework is a niche within a niche and the knowledge gained isn’t remotely portable outside of that niche. Furthermore, it is my view that the FireMonkey platform is fundamentally flawed both in concept and execution.
Whether you agree or disagree isn’t the point for this discussion. It’s my personal view, and it has informed my learning choice. That is all.
That choice is of course Oxygene.
Perhaps in time I might have to switch to Xcode and Android Studio, but in the meantime I can focus on learning the SDK’s in the comfort of a familiar language (actually a better version of the one I am used to) and a (more) familiar IDE. And if Windows 8/Windows Phone becomes more important than it currently is, I am also gaining familiarity with the environment in which I will have to work to support those “natively” as well.
I can honestly say that I am learning Android and I am learning Cocoa and iOS, in a way that could and should prove useful in the future, whether in the context of Oxygene or not.
But perhaps the real point is that using Oxygene to learn these frameworks reduces the scale of the challenge to a point where it becomes FUN in much the same way that Delphi 1.0 made learning the Windows API fun.
I can only speak in term android development. In personal experience, I find using native development is a must. One major reason is speed of changes to the UI. Non-native third party tool will inevitably struggle to follow.
I have used Eclipse, find it kind of messy, and upgrade would quite often break existing fully functioning setup.
I am now using Android Studio, it is a lovely development environment. Have not experience any major problem so far. I still do not enjoy using Java, but AS allows me to enjoy all the latest UI and facilities.
So does Oxygene. 😉
I think there is still a mis-understanding of how Oxygene fits into Android. It is a Pascal compiler but it works directly with Java both in terms of using the SDK and what the compiler emits.
To add the Android SDK to an Oxygene project I add “android.jar” directly from my Android SDK installation. No wrappers, no bridges, no imports. And the compiler takes my Pascal source code and emits Java byte code directly – no code conversion, no wrappers. An Oxygene class is a Java class.
In essence I get to write “Java” but using Pascal. Win-Win. 🙂
If you do not want to stick to Delphi/Pascal language then I have found that WinDev Mobile is a much better choice for bot iOS as well as Android.
Of course there is RunRev’s Revolution (now LiveCode – http://livecode.com/) that will allow you to target multiple OSs and Mobile platforms.
So if you adopt either one of the above you will be spared from learning multiple new platforms, frameworks, etc.
Just my two cents. 😉
Hop only when the hop will benefit self and others
What I can confirm is that beside a work that was far far away from software development it was possible for me to stay in touch with the .net world via Oxygene (Chrome these days) a lot easier than having to use both Delphi as well as Visual Studio C# in parallel.
Today I must say over a period of about 12 years RO have never really been a disappointment.
A modern programmer should be able to use multiple tools.
Using Delphi/Pascal to create mobile apps makes just no sense. You’ll be fighting all kinds of weird stuff, because you are not using a first class citizen’s language.
Just go with the free Android Studio. While Eclipse (which is what you had to use until recently for Android development) kind of sucked, the new Android Studio IDE is fabulous.
I can’t help to think that the only reason people use Delphi for IOS or Android is because they are scared to learn a new language. Don’t be. A good programmer is a good programmer in any language. Google has (this may sound quite strange to Delphi developers) excellent documentation with plenty of examples to get you started.
Stop using kludges and go native. Using Delphi for Android is like using Java for Windows. Bad idea.
Indeed. Oxygene on the other hand is a first class citizen in both the Java and Cocoa worlds (and .NET of course).
Yes and no. Yes: Oxygene is much better than Delphi in that it does not draw it’s own interface.
No: The main problem is documentation. All Google documentation and 99% of all answers on stackoverflow and all code you find are in Java. You will have to translate those to Pascal before you can use them. That is a waste of time. Especially since the Java syntax is not that hard to learn if you are a good programmer.
I can’t help to think that Delphi/Oxygene for IOS/Android is mainly used by old Delphi programmers who are afraid of other languages. A factor is this is that Android Studio is free and IMHO better than the Delphi IDE. Plus it has better documentation. New programmers and students will hardly ever select an expensive alternative in a, for them, obscure language.
It really isn’t that hard to translate the Java to ObjectPascal, but the difference is worthwhile. Even (some) Java programmers don’t like Java and only use it because they have to.
Well, we don’t have to any more. 🙂
The documentation isn’t perfect. It took me a fair while to find any decent information on implementing support for an Intent Filter, as opposed to invoking an action via one, but when I did find it I could apply it directly. Certainly there is far more in the way of such resources than is to be found w.r.t FireMonkey. For example. 😉
As for Android Studio, I had a look at that yesterday, out of interest. It runs like treacle down a frosty pavement on a cold winters day. Even simply creating a new project took an absolute age (measured in minutes)! And whilst my system may not be a powerhouse, it’s certainly no slouch: a mid-2011 iMac (3.1 GHz quad core i5) with 32GB RAM
Sound good.
Hmm. I understand the need for native libraries/controls, but why for “the only true language”?
And I can name a few reasons why one would like to stay with the language, such as: I have a project written in pascal, I’m thinking about making an Android version of it. Instead of supporting two codebases it’s easier to make core units cross compile and only add UI.