Recent

Author Topic: Hello Lazarus World! (Delphi Veteran ISO Android) Where do I go from here?  (Read 13308 times)

GeeksOnHugs

  • Newbie
  • Posts: 4
  • Delphi Developer In Transition to Android
Hello community!  I've been vaguely familiar with the existance of Lazarus and the  free pascal  movement for several years but never really checked things out untill recently.   I've been blessed and cursed to have been a Delphi developer for all of my career (1995 to present).

Over the years I experimented with other tools here and there with special ferver when .NET was becoming the thing and people were suggesting that to not get on board with .NET was equivalent to DOS programmers not getting on board with Windows way back when.  So I explored Visual Studio (hated it).  I then tried Oxygene/Prism since, hey at least it's Pascal.  But Visual Studio...hated it.  I am well aware of our natural tendancy to be biased towards what we know but I truly believe this is not the case with Delphi.  It is rediculously productive compared to anything else I have experimented with.

Now it is 2012 and I am a beleiver in mobile based tablets as the future of general computing devices.  I am partial to Android as it is the most open of the top platforms (RIM, iOS, WP7...I guess LiMo sort of died on the vine?).  So OK, I have to learn Java.  I have learned a bit and have finished some test apps beyond your basic "hello world" type apps. 

First off, is it just me or is nearly 20 year old  Delphi fundamentally more productive than any of these "cutting edge" tools (i.e. Visual Studio/Ecllipse)?  Seriously I am not trying to be biased.  On the contrary I am working hard to be aware of my bias in my experiments...but just objectively looking at the steps necessary to put together the most simplest of apps I find there to be a lot more overhead in the most simple of tasks (like building a simple UI and having it respond to the most simplest of events).

Well it is what it is...I don't mind learning new stuff and it's actually pretty exciting to have so much to learn.  So now I've learned something about Java that I didn't know: a Java program can in fact be written in other languages as long as there is a compiler that compilles to java virtual machine code.  I discovered an Android tool (Basic4Android) that appears to be a true RAD tool for Android.  It uses Basic which is meh...I mean if it was Pascal4Android I would have been sold already.  Well Basic aside, problem number two with it is it is a Windows only tool and I am really wanting to leave Windows behind.  That also makes Oxygene uninteresting to  me. 

In fact I actually want to develop ON my Android tablet (and there are a few tools out there I use that are themselves native android apps: AIDE and TIDE) but at a minimum I would be OK with developing on a light weight linux netbook (can you install IDEs on a chromebook?...Oh there are also cloud based IDEs that are coming of age as well...  But seeing Basic 4 Android got me wondering if I can have Delphi productivity in developing for Android by using Lazarus?

So I check out a bit around the site here.  It looks like you guys are working on Lazarus targetting Android and I think that's great.  My question is should I start going down this path?

How long will it take to be fully developed as an Android development platform?  How relevant are my Delphi skills?  Will there be a FPC that runs ON Android?  What about an IDE?  (I would love to work on an IDE open source project if a compiler were available...)

Even if all of the above is good, should I take this opportunity to become fluent in another language (Java)?  (to be a stronger programmer)  I don't know...sorry for rambling...I just really don't know where to go.  As of right now I am going to continue on down the Java path since that's where everyone else is traveling...but if there is another way where I would have all the power and be on my own as productive as a whole team, I want to know about it.  That's what Delphi did for me on Windows...

What now?  What comes next?
« Last Edit: April 27, 2012, 05:36:02 pm by GeeksOnHugs »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Geeks, welcome!

Not a rambling post, quite coherent in fact.
I don't have any experience with Android, but because the main language is Java, ehm, Dalvik ehm whatever, I think learning Java would definitely be a plus, if only to better understand documentation, interoperability etc.
But note that's really an off the cuff remark - was thinking about the situation with the Windows API where it helps if you know some C - which I don't... ;)... and which might be comparable to Android/Java now.

Well, I'll bow out now and leave the stage to the Android experts over here. However, regardless of which way you go, hope you'll try FPC/Lazarus anyway (perhaps on Windows, perhaps on Linux, perhaps on OSX) and have some fun with it ;)


Hugs ;),
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

GeeksOnHugs

  • Newbie
  • Posts: 4
  • Delphi Developer In Transition to Android
Thanks chimp

I definately will check it out in any case as I am curious....also I should have mentioned I want to make cloud based apps so ultimately will need to do server side progr@mming and will have to choose tech 4;that also

I am going to prolly use a platform service like google appengine...thank u 4 ur warm welcome!:-D

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Quote
My question is should I start going down this path?
First, read our wiki and decide which path will you choose:
I suggest trying both and decide later which one is the most comfortable for you.
Quote
How long will it take to be fully developed as an Android development platform? How relevant are my Delphi skills?
Depends on your adaptivity to this platform. Basically if you don't want to learn too much new things, take the native path. This way, you could reuse all your Pascal knowledge. Using FPC_JVM is like coding Android with Java, only with different language. The libraries you can use are Android/Java libraries, not standard Pascal units.
Quote
Will there be a FPC that runs ON Android?  What about an IDE?
Believe it or not, it's already there.

GeeksOnHugs

  • Newbie
  • Posts: 4
  • Delphi Developer In Transition to Android

Quote
My question is should I start going down this path?
First, read our wiki and decide which path will you choose:

Ahh ok,  ty I understand.   I am very happy to learn what is necessary so long as at the end of the day I am the most productive of a developer as is possible.   So I assume wih the ARM native method there is some sort of VCLish object model available? Where does this leave you for GoogleTV apps (basically android running on i386/architecture) ?

I think I prefer the direct jvm/dalvic method or perhaps I would most prefer a third way?  Where the final product is "Android native" dalvic code but with a lot more abstraction (via an IDE and more sophisticated/automated object mode wrapping the android widgetsl )so you could build RAD style forms`with objects all ready to just drop on and write event code for.  I am amazed at how many steps are  required to simply add a button and make it respond to a click: 1)add a section to XML for the button 2) add caption to another xml file.  3) declare a button object in code  4) capture the XML button into the button object 5) declare an event procedure 6) link the event procedure to the object 7) then write your code...In Delphi you just drop a button and double click it...I don't understand why we are using more primitive tools in 2012.  It's the fricking future already!

Quote

I suggest trying both and decide later which one is the most comfortable for you.
Quote
How long will it take to be fully developed as an Android development platform? How relevant are my Delphi skills?
Depends on your adaptivity to this platform. Basically if you don't want to learn too much new things, take the native path. This way, you could reuse all your Pascal knowledge. Using FPC_JVM is like coding Android with Java, only with different language. The libraries you can use are Android/Java libraries, not standard Pascal units.
Quote
Will there be a FPC that runs ON Android?  What about an IDE?
Believe it or not, it's already there.

I do see there is a compiler there and simple code editor though that might be generous to call it an IDE :-p...

So I'm left pondering these two questions: is it conceivable that the lazarus IDE would be made available to run ON android as an app?  Or would it be rediculously ambitious for me to attempt to do so myself?  Basically take the FPC->JVM(Dalvik) compiler and make an IDE with a visual form designer and VCL style object model?  The IDE + object wrappers would take care of all the tedious steps I'm encountering with java and give a true RAD development experience?  I even came up with a few potential names: Pythia (The proper name for the Oracle at Delphi) or Peranasus (A mountain overlooking Delphi)  or Suda (An ancient mediteranian atlas covering areas including Delphi)...there were plenty other greek sounding links on Wikipedia if those all suck lol.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Quote
So I assume wih the ARM native method there is some sort of VCLish object model available?
It's the same as if you use LCL for desktop apps, only it's compiled as a library, not a program. Note that currently it's using Custom Drawn Interface for the drawing backend, which is not yet complete, so some controls might not be available.
Quote
I think I prefer the direct jvm/dalvic method or perhaps I would most prefer a third way? Where the final product is "Android native" dalvic code but with a lot more abstraction (via an IDE and more sophisticated/automated object mode wrapping the android widgetsl )so you could build RAD style forms`with objects all ready to just drop on and write event code for.

...In Delphi you just drop a button and double click it...I don't understand why we are using more primitive tools in 2012
Actually, the way Android does it is more or less the same as Delphi/Lazarus approach with dfm/lfm files, only differ in format (xml). AFAIK currently only Eclipse ADT implements this. For now, I use Lazarus for coding and for the UI part I use DroidDraw and a self-built tool to convert generated R.java to corresponding Pascal unit, and the building process is managed by a Makefile. It's absolutely possible to have Lazarus supports Android in a RAD fashion with Android bytecode output via FPC_JVM, problem is: who's gonna do it? At least one would have to:
  • Create LCL backend for Android libraries
  • Extend form designer backend for Android XML files
  • Integrate application signing and packaging
and these are big tasks.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
First off, is it just me or is nearly 20 year old  Delphi fundamentally more productive than any of these "cutting edge" tools (i.e. Visual Studio/Ecllipse)?

I surely agree =)

Quote
Well it is what it is...I don't mind learning new stuff and it's actually pretty exciting to have so much to learn.  So now I've learned something about Java that I didn't know: a Java program can in fact be written in other languages as long as there is a compiler that compilles to java virtual machine code.  I discovered an Android tool (Basic4Android) that appears to be a true RAD tool for Android.  It uses Basic which is meh...I mean if it was Pascal4Android I would have been sold already.  Well Basic aside, problem number two with it is it is a Windows only tool and I am really wanting to leave Windows behind.  That also makes Oxygene uninteresting to  me. 

Android is not only Java, you write write native applications and that's how Lazarus works in Android. The Java APIs can be accessed via JNI, but using LCL-CustomDrawn-Android you don't need to worry about that because the LCL wraps them. Check our example app in lazarus/examples/androidlcl it can send SMSs, read the accelerometer, rotate and read the GPS position

People have already provided the link, but just to reinforce, the wiki page of LCL-CustomDrawn-Android is http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android

It is free, nothing is charged. But if you face a missing feature while using it you can always post a bounty and those help me in my development (http://wiki.lazarus.freepascal.org/Bounties)

Quote
In fact I actually want to develop ON my Android table

I would give up on that. I don't know any company which uses a on android solution to write software simply because it is not practical and not productive (I actually doubt it is possible at all, since there is no SDK, no NDK, etc). Write on the desktop (Windows, Linux or Mac OS X) and cross-compile, build the APK and install the APK via ADB. That's what everyone is doing.

Quote
So I check out a bit around the site here.  It looks like you guys are working on Lazarus targetting Android and I think that's great.

The development on LCL-CustomDrawn-Android is advancing strongly. The number of users is growing steadly and companies are investing on it. See also here for screenshots of LCL-CustomDrawn: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface#Screenshots

GeeksOnHugs

  • Newbie
  • Posts: 4
  • Delphi Developer In Transition to Android
Thank you both for the replies.  I haven't got around to trying out FPC yet but I will.  At some point I'm going to have to get a job so I've decided to just stay conventional while I learn android so that means,  of course java and eclipse.   motorola puts out their own version with some special tools I think called motodev.

however so far I have been able to work on my tablet.   Check out the following two apps I use: AIDE (Android IDE)  and Terminal IDE.   AIDE is closest to eclipse while TIDE is essentially a complete command line environment with vim and other customizations for development on the device (including via telnet with tide).   you are probably correct about it being less productive but that's only a limitation of the software at this point....especially with the new form factors like the asus transformer and motorolas lapdock (u could seriously write code on your phone).   now I'm only doing simple demo apps and really the only limitation I banged against was in trying to manipulate icon graphics.   oh there is another app tool to check out...its buggy but good idea gui2go...wysiwig android xml form designer.

I like the mobile lifestyle....work in a park,  coffee shop,  bar wherever :-) also I have a theory that if I actually use mobile for my work ill have better insight for creating mobile guis for my apps.   also when I do bang on a platform limitation (like with graphics)  I rdp into my windows workstation.  I think if I can't make it work in the long run ill develop on a linux setup.

 

TinyPortal © 2005-2018