4 ms·
How's the experience of using a new component (integrating it in the IDE component palette) on Lazarus vs Delphi?
by unnouinceput 5y ago
How's the experience of using a new component (integrating it in the IDE component palette) on Lazarus vs Delphi?
- badsectoracula 5y agoThe biggest issue is that because Free Pascal didn't support the functionality needed for dynamic packages until the latest version (or trunk, not sure as i haven't checked exactly) you need to recompile the IDE whenever you install/uninstall a component since they are linked statically. In practice this isn't a big concern since a full recompile of the IDE takes less than a minute and subsequent compiles are done in a few seconds. However one thing that is impossible now and i hope that will become possible in the future is project-specific components (ie. having some components that are exported and installed by a project instead of being available for everything) as it'd allow even more visual design. Right now you can sort-of do this using frames but that is only for compound visual components and frames cannot expose custom properties, which is half of the reason to use the visual designer (and the entire reason for non-visual components). Dynamic packages could make that possible. (note that this is just a feature i wanted in Lazarus, i have no idea if that even exists in Delphi as the only Delphi i used for a length of time is Delphi 2 and the most "recent" i used was Delphi 7 Personal that i got from a magazine cover disk back in early 2000s - i have also checked the demo/free versions of later delphis but never in detail)
- unnouinceput 5y agoYeah, about that recompile. About 2 years ago I started to learn Raspberry Pi. All good and nice, Lazarus runs directly on Pi, until I needed some network functionality. Found some components and tried to recompile the IDE, to install those. Errors over errors, wasted 2 days and couldn't make it work. I had to use a previous version of those components that were already compiled/packaged - no idea how to name this - where I took them from some repository and then magically appeared inside Lazarus' component palette - no recompile was needed. I gave up on Free Pascal/Lazarus and went back to Delphi - nowadays, with FMXLinux, you can target Debian without a hiccup. I liked Lazarus idea of gazillion targets, until I actually wanted to compile for those targets - started reading forums, manuals, wasted a week. You wanna know why I prefer Delphi? Because all I have to do is select the target in a selector and that's it. So until Lazarus will not require recompile and switching targets will be just as easy as in Delphi, it will remain a toy.
- badsectoracula 5y agoI'm not sure what you downloaded but components need to become part of the IDE to work, you can't just copy something - unless that something also includes a precompiled version of Lazarus. In any case it sounds like an issue with the components you downloaded, not Lazarus itself - it is very possible the components you found were not compatible with the version of Lazarus you got or with Raspberry Pi / ARM. Also FPC contains already several packages that provide networking functionality so you may not even needed those components. But using Raspberry Pi to judge Lazarus isn't IMO a good idea, desktop development on Raspberry Pi is a bit of a niche case and the device is underpowered, so you'll end up with issues. Not that it is impossible, i just installed FPC 3.2.2 and compiled Lazarus 2.0.8 (i prefer to compile Lazarus from sources instead of using any binaries as it avoids the broken packages that distros often provide) on my RPi2, though it took half an hour for the build to finish (i did use "make bigide" though, which builds a few extra components and the sdcard is some painfully slow C4). But after that it worked fine.
- unnouinceput 5y agoIf I remember correctly I used some integrated repository in Lazarus to use a previous version of those network components, then Lazarus did do something, but it took only like 2 minutes and then those components appeared on palette. And I disagree with you, I think RPi is perfect for Lazarus. In my case I used an RPi zero (WH) which currently runs a server I made in Lazarus, a Frankenstein's monster of a server if you want. It controls an electromagnetic lock on my main door, to allow kids to open the door using their phones (Android, I made the app in there in Delphi's FireMonkey). It will also water our plants when we go to vacation, by controlling a pump (Same Android app has another section that will allow to start the pump). Also I connected a webcam and view its output through the same server, to see the plants in question. Probably in the future I'll create my own smart lights and connect those to same server. And same RPi zero has Pi-Hole installed. All in all Lazarus, after initial hurdle, proved quite good on Raspberry Pi. But it's too much hassle compared with Delphi.
- badsectoracula 5y ago