Jump to content

Recommended Posts

I heard that Delphi is Pascal language based.

 

I am planning to develop cross-platform apps.  I come down to 2 options:

  1. RAD Studio 10 or 11 (depends on how poor I will be)
  2. Visual Studio 2022 (C++ based)

 

My primary interest is to monitor huge amount (may be several hundred to thousand) of sensors over internet.

 

  1. Can you help me to choose between 1 and 2?
  2. Can we program or interact with hardware directly through Pascal language?
  3. Is it easier to interact hardware with Pascal than with C/C++, for example, handling MCU register, address content, etc?

 

 

I am new to Pascal.  Hope to hear your opinions.  :classic_biggrin:

Share this post


Link to post
21 minutes ago, TimCruise said:

I heard that Delphi is Pascal language based.

Yes.

21 minutes ago, TimCruise said:

I am planning to develop cross-platform apps.  I come down to 2 options:

  1. RAD Studio 10 or 11 (depends on how poor I will be)
  2. Visual Studio 2022 (C++ based)

There are MANY solutions available for cross-platform development.  There is FreePascal, for instance.  Or Java.  Or many other choices.

21 minutes ago, TimCruise said:

Can you help me to choose between 1 and 2?

Not really.  It is up to you to decide.  You know what you need.  Use what suits your needs.  Every language and IDE has advantages and disadvantages.  Do some research on each one then decide for yourself.

21 minutes ago, TimCruise said:

Can we program or interact with hardware directly through Pascal language?

It depends on the platform, and what degree the OS allows you to directly access hardware.  Most direct hardware access on modern systems is restricted to just the OS, so you would have to use higher level APIs provided by the OS or the hardware vendor.

21 minutes ago, TimCruise said:

Is it easier to interact hardware with Pascal than with C/C++, for example, handling MCU register, address content, etc?

No.  Pascal can get just as low level as C/C++ can get.

  • Thanks 1

Share this post


Link to post
16 hours ago, Remy Lebeau said:

Pascal can get just as low level as C/C++ can get.

Not quite: You can write Windows device drivers with C. I doubt very much that this is possible with any Pascal based development tool.

 

Also, while basically all APIs and SDKs provide bindings for C / C++, many don't provide them for Pascal / Delphi. I had to translate lots of C header files to Pascal for e.g. accessing API for cameras or laser sensors.

  • Thanks 1

Share this post


Link to post
5 hours ago, dummzeuch said:

Not quite: You can write Windows device drivers with C. I doubt very much that this is possible with any Pascal based development tool.

 

Also, while basically all APIs and SDKs provide bindings for C / C++, many don't provide them for Pascal / Delphi. I had to translate lots of C header files to Pascal for e.g. accessing API for cameras or laser sensors.

That's a tool chain limitation rather than language though. 

  • Like 2
  • Haha 1

Share this post


Link to post
5 hours ago, dummzeuch said:

You can write Windows device drivers with C. I doubt very much that this is possible with any Pascal based development tool.

IIRC, there used to be a Delphi Driver Development Kit at least up to Delphi 2007, but I never had the need to make use of it.

  • Sad 1

Share this post


Link to post
16 hours ago, Uwe Raabe said:

IIRC, there used to be a Delphi Driver Development Kit at least up to Delphi 2007, but I never had the need to make use of it.

There's never been any point in using anything other than C to write device drivers on Windows or Linux. It's not like you can take advantage of OOP in the context of a device driver. 

  • Like 1

Share this post


Link to post

Difficult question. Revise your project requirements.
Don't forget CI, maintenance, community support, open source ...
C or Pascal, front-end or back-end, firmware or UI, storage?

Can you give more info about project?

Share this post


Link to post
On 12/17/2021 at 7:56 PM, TimCruise said:

I am new to Pascal.

If it is for learning - try Pascal.

Share this post


Link to post

 

 

7 hours ago, julkas said:

Difficult question. Revise your project requirements.
Don't forget CI, maintenance, community support, open source ...
C or Pascal, front-end or back-end, firmware or UI, storage?

Can you give more info about project?

  1. I know BASIC, a little ANSI C but I hate C because it cannot handle float numbers and strings out of box.
  2. I personally prefer Pascal's language terminology which is more natural to understand.
  3. Mostly for applications of industrial users or sectors who mostly run Windows or Linux PC.  Apple is too expensive and too many restriction for them.  I do not like doing consumer software which change too fast each year.
  4. Mostly for desktop large screen GUI to monitor a huge number of sensors over internet.
  5. Very stable code base and easy to maintain.
  6. I tend to sell my hardware design + their services!  I do not do games or consumer apps on smart phones.
  7. Must have BLE and MQTT addon (commercial or open-source).

 

One of this project can make me very rich!!!  :classic_biggrin:  Support me Friends!  Then, I will also support you with more $$$ jobs!  :classic_biggrin:

Edited by TimCruise

Share this post


Link to post
3 hours ago, TimCruise said:

I hate C because it cannot handle float numbers and strings out of box.

Er, C handles floats fine, better than Delphi as it happens.

 

3 hours ago, TimCruise said:

One of this project can make me very rich!!!  :classic_biggrin:  Support me Friends!  Then, I will also support you with more $$$ jobs!  :classic_biggrin:

Ha ha

Share this post


Link to post

By the way, if RAD Studio v10.4.2 Community also includes C++ language compiler, does it mean that I can also take advantage of all those C/C++ sources out there for controlling hardware?


Do I have to buy extra license for RAD Studio C++?  :classic_rolleyes:

Share this post


Link to post
45 minutes ago, TimCruise said:

Do I have to buy extra license for RAD Studio C++?

RAD Studio includes Delphi and C++ Builder, but you can purchase each separately.

Share this post


Link to post
5 hours ago, TimCruise said:

By the way, if RAD Studio v10.4.2 Community also includes C++ language compiler, does it mean that I can also take advantage of all those C/C++ sources out there for controlling hardware?

There is no RAD Studio Community edition.  There is a Delphi Community edition, and a C++Builder Community edition.  They are separate products, and cannot be installed together.  RAD Studio is the commercial bundle that includes both Delphi and C++Builder as a single product.

  • Thanks 1

Share this post


Link to post

Limitation is:

Delphi Community edition and C++Builder Community edition can only be registered and run on 2 different PC.

 

While commercial Delphi edition and C++Builder edition can be run on the same PC.

Share this post


Link to post

Up to now, I am quite happy with Delphi v10.4.2 about its cross-platform GUI development ability. :classic_cheerleader:

 

About its price.  Professional version should be acceptable.  Try to compare it with QT Creator and Visual Studio 2022.  You may find that RAD Studio Pro version is even cheaper.

QT Creator costs you US$1,000.00 per month to be paid yearly.  It sums up to more than RAD Studio Architect! :classic_blink:  If you are a C++ fans, I would suggest Code Blocks + wxwidget + wxsmith which cost you nothing.

Edited by TimCruise

Share this post


Link to post

Tools are tools. Say a little bit more about the target environment and what you need to work with.

 

You cannot use Delphi to program, say, Raspberry Pi's and small embedded controllers. 

 

TMS has a way to control RPi's that may or may not fit for your needs (they support MQTT as well).

 

BLE support is built into Delphi.

 

If you have a headless embedded system that runs Windows, you can use Delphi to build stuff that can be controlled remotely, much like REST-based services.

 

If you have 1000+ remote "smart sensors" that are sending data back to a data collection server, then Delphi can be good for managing the collected data and as a "Dashboard" of sorts to control everything.

 

But maybe MatLab or R would be best for your needs. So far you haven't really said what your requirements are.

Share this post


Link to post
4 hours ago, David Schwartz said:

You cannot use Delphi to program, say, Raspberry Pi's and small embedded controllers. 

As for embedded controllers - yes, plain C is the best choice. The new generations of coders may prefer Rust or C++ for this, current microcontrollers are way more powerful than a two decades old desktop PCs. But one can use a custom edition of Lazarus for bare metal programming of Raspberry Pi: https://ultibo.org/

  • Like 1

Share this post


Link to post
8 hours ago, David Schwartz said:

BLE support is built into Delphi.

 

If you have 1000+ remote "smart sensors" that are sending data back to a data collection server, then Delphi can be good for managing the collected data and as a "Dashboard" of sorts to control everything.

 

COOL!

These stuffs are good enough!  :classic_cheerleader:

 

LabVIEW is also a good choice but no BLE support built-in.  Its native instrument interface is good!

Edited by TimCruise

Share this post


Link to post
5 hours ago, Lajos Juhász said:

You mean something like this? https://blogs.embarcadero.com/start-building-apps-for-single-board-computers-with-delphi-or-c-builder-now/ I didn't watched it as it is not my thing.

I wasn't aware of that, but every time I've asked I've been told it's extremely difficult. I'll watch it and see what I've missed.

 

I used to do embedded stuff in C / C++ (Borland C++ to be exact) but never anything with Pascal. Delphi is designed to make programming Windows very easy. Embedded systems require a lot of scaffolding that Dephi doesn't really offer, mainly because you don't need it for Windows.

If you stick to non-GUI apps, then it might work fine.

I didn't abandon C/C++ embedded programming to get into Delphi so I can double the amount of work I needed to do. 🙂 

 

However, as remote services become increasingly popular, they start to resemble distributed embedded systems. So I envision a time in the not too distant future where it will be fairly simple to create a REST-based service in Delphi that can be stuffed into a RPi and similar hardware with very little effort. It's easy to deply stuff to Windows boxes, not so much with Linux yet. And you still need a lot of RAM and storage.

 

The problem with Dephi and Linux is all of the various platforms that need to be targeted. Maybe it would be easier to treat these the way I did way back in the day and build an image that included the entire OS along with the app code. You burned that into ROM or EEPROM and then turned the machine on and tested it.

 

Why not do that with Delphi instead of having to worry about targeting an EXE to some pre-existing Linux distro that may or may not have all of the required libraries and support stuff needed? Just build an entire image, upload it, then reboot the target machine.

Edited by David Schwartz

Share this post


Link to post
1 hour ago, TimCruise said:

COOL!

These stuffs are good enough!  :classic_cheerleader:

 

LabVIEW is also a good choice but no BLE support built-in.  Its native instrument interface is good!

Take a look at what TMS Software offers in their FNC library. That may give you some ideas as well. 🙂 

Share this post


Link to post
19 minutes ago, David Schwartz said:

The problem with Dephi and Linux is all of the various platforms that need to be targeted. Maybe it would be easier to treat these the way I did way back in the day and build an image that included the entire OS along with the app code. You burned that into ROM or EEPROM and then turned the machine on and tested it.

 

Why not do that with Delphi instead of having to worry about targeting an EXE to some pre-existing Linux distro that may or may not have all of the required libraries and support stuff needed? Just build an entire image, upload it, then reboot the target machine.

Thats why we have things like Docker.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×