Recent

Author Topic: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?  (Read 15674 times)

jufau

  • New Member
  • *
  • Posts: 42
HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« on: November 25, 2015, 12:54:20 pm »
Hey guys,
I am wondering how good Lazarus is in the web and mobile fields.
I know that delphi has Intraweb, which seems to be pretty close to the most pupular ones (PHP and Java) and also compile its application for iOS, Android, MacOS, etc.
I've been working on a Windows Desktop Application in Lazarus and I can consider myself very happy with the results.
So should I expect the same results if I choose Lazarus to build my web and mobile apps?
I just don't want to waste my time learning something that is not going give me what I need.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #1 on: November 25, 2015, 01:10:06 pm »
For web, so far so good. fcl-web shall provides most web needs, combined with fcl-json, you can create JSON based webservices consumer in minutes. For server needs, fpWeb is good enough, Brook framework is decent, Habari Web Components are great, too. mORMot... just try it yourself, it's simply complete.

For mobile, it still struggles to be user friendly. I don't think it will be soon, but surely the path goes that way.

jufau

  • New Member
  • *
  • Posts: 42
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #2 on: November 25, 2015, 02:09:48 pm »
Hi Leledumbo
Thank you for your information. It really seems to worth learning fpweb.
I am going to start learning some tutorials about it.

thanks again

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #3 on: November 25, 2015, 08:56:06 pm »
For web, so far so good. fcl-web shall provides most web needs, combined with fcl-json, you can create JSON based webservices consumer in minutes. For server needs, fpWeb is good enough, Brook framework is decent, Habari Web Components are great, too. mORMot... just try it yourself, it's simply complete.
I am using Powtils, and am very fond of it - the webservers I make are really fast and reliable.

And it seems like Lars have restarted further development:

http://z505.com/powtils/news.shtml

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #4 on: December 05, 2015, 03:59:20 am »
@SymbolicFrank The question is perfectly fine, this is not StackOverflow. And please don't be rude to people.
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

Deepaak

  • Sr. Member
  • ****
  • Posts: 454
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #5 on: December 05, 2015, 09:37:39 am »
@Kapibara, I Agree with you
Holiday season is online now. :-)

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #6 on: December 05, 2015, 11:18:51 am »
Ok, I'm sorry.

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #7 on: December 05, 2015, 10:01:02 pm »
Ok, I'm sorry.
For removing your rude comments?
I start to understand why your post from SO was removed
« Last Edit: December 05, 2015, 10:02:42 pm by eny »
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #8 on: December 07, 2015, 10:50:46 am »
About mobile:

As far as I know, FPC is one of the few compilers that can generate native code for both iOS and Android. Delphi, Java and Xamarin C# are the only others I know of. Unity is another option.

The main problem with mobiles is the user interface. If you want native GUI elements, you cannot simply recompile your application. A Lazarus LCL application won't run as such on iOS and Android, AFAIK.

There are basically two options: use controls that are custom drawn, like FireMonkey for Delphi, or Unity (as it is a 3D game engine), which look like the platform ones, or code the GUI separately for each platform.

The only platform that has a set of components comparable to Lazarus which runs on mobiles is Delphi. But I have doubts about the long-term stability of that. And they're not native GUI elements, they just look like them.

Lazarus does have a custom drawn interface, but it's pretty basic.

Alternatively, FPC 3.0 allows you to use the native GUI of both Android and iOS. A native GUI is possible with FPC, but then you have to separate the business logic from the GUI and write that for each platform. With Java and Xamarin C# you would have to do that as well.


There is another point: even if you use a custom drawn GUI that is the same for every platform, they are still different platforms. You still have to take care of platform-specific details in your code.


All in all, the only real "write once, compile to multiple platforms" development kit is Unity. But if you don't mind making multiple GUIs, Lazarus is a great choice. Because it has one of the best libraries of components you will want and need when making business apps.

jack616

  • Sr. Member
  • ****
  • Posts: 268
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #9 on: December 07, 2015, 12:26:06 pm »
Quote
As far as I know, FPC is one of the few compilers that can generate native code for both iOS and Android

https://en.wikipedia.org/wiki/Native_code
See section:
Relationship to bytecode

You may wish to check other terminology also.



SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #10 on: December 07, 2015, 04:16:19 pm »
Yes, I know. I skipped over a lot of other things as well.

Edit: You can build the code for the iOS GUI in Apple's XCode. You can also click and drag the GUI elements and forms there. That seems to work well, if you can get the right versions of all components installed and configured.

For Android there is (as an example) Pascal4Android, but that is closed source and partly Chinese. But it seems to work well.

Windows Mobile is a moving target, with many one-off versions from Microsoft. I expect that the FPC guys will become interested to target it when it stabilizes.

With the new version of Lazarus that uses FPC 3.0, a lot can and probably will improve even more.
« Last Edit: December 07, 2015, 04:32:43 pm by SymbolicFrank »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #11 on: December 08, 2015, 10:55:27 am »
About Android:

Android is a special case in a lot of things.

Behind the screens, iOS runs on BSD in Linux compatibility mode, just because that has a commercial license. You don't have to publish your changes and you can ask money for them.

Android uses Linux as well, so it seems that it is very comparable. But that's not the case. Because Android runs in the Dalvik JVM. It is completely written in Java.

For example, if you want to play a video on Android, you need a Java application, that creates a Java Framework Media Player.

(https://quandarypeak.com/wp-content/uploads/android-media-player-architecture.png)

If you would want to use real native code (ARM instructions), you would have to supply an IPC and JNI interface, and still need a Java application on top.

So, for all intents and purposes, Java bytecode is the native code on the Android platform.

And, FPC 3.0 has that as a compilation target.  :D


But there is more. While you would think, that writing native applications on Android gives you more control, Google has created their own platform: Google Play Services. That is what you need to interface to use the specific Android services. And you do that through Java as well.

To recap, as a stack:

Your application
Android Framework
Dalvik JVM
JNI
Google Play Services
IPC Framework
Linux

And if you want to create IPC extensions, you can do that with FPC as well. It's a different target platform, but that doesn't matter.

jack616

  • Sr. Member
  • ****
  • Posts: 268
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #12 on: December 08, 2015, 11:31:18 am »
Quote
So, for all intents and purposes, Java bytecode is the native code on the Android platform.

I refer you to the post I made previously.

If you are going to discuss a technical subject make the effort to understand the terminology you are using first.
You apparent inability to do so is the reason I still dont have a clue what it is you are trying to say.





SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #13 on: December 08, 2015, 03:52:35 pm »
Android itself is a Java application. The machine on which it runs is a JVM. The JVM 'processor' runs Java bytecode.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: HOW POWERFUL IS LAZARUS FOR WEB AND MOBILE?
« Reply #14 on: December 08, 2015, 03:53:02 pm »
About Android:

Android is a special case in a lot of things.

Behind the screens, iOS runs on BSD in Linux compatibility mode, just because that has a commercial license.

Afaik iOS, like OS X is mostly FreeBSD userland layered over an own kernel, and there is no "linux compatibility" mode enabled.

 

TinyPortal © 2005-2018