Jump to content
PhilBoy

Desktop App Development with Object Pascal

Recommended Posts

Hello, I'm working on a desktop application development project(specifically a desktop simulator tool) and this simulator was developed with Object Pascal. I'm trying to understand the architecture of the simulator and improve the features of the simulator. I have very basic knowledge of OOP but I don't know what I need to learn to be able to do the task I described above. Can anyone offer a learning roadmap to be proficient enough to do the task above?

Share this post


Link to post
1 hour ago, PhilBoy said:

Hello, I'm working on a desktop application development project(specifically a desktop simulator tool) and this simulator was developed with Object Pascal. I'm trying to understand the architecture of the simulator and improve the features of the simulator. I have very basic knowledge of OOP but I don't know what I need to learn to be able to do the task I described above. Can anyone offer a learning roadmap to be proficient enough to do the task above?

You can start from here: https://lp.embarcadero.com/ObjectPascalHandbookD11?utm_source=blog

 

It is a free book from Marco Cantu. Other members of this forum may suggest you others books or resources.

 

EDIT: and of course install the community edition of Rad Studio from here (if you are eligible for it): https://www.embarcadero.com/products/delphi/starter

 

N.B: Take care about license, limitations and legal issue

Edited by DelphiUdIT

Share this post


Link to post

Just a question to @PhilBoy : you say Object Pascal, but do you know if it is in Delphi, Lazarus or an other environment ? Let's suppose it's Delphi, do you know what was the development version ?

 

The language don't differ a lot between releases, but used libraries does.

Share this post


Link to post
5 hours ago, Patrick PREMARTIN said:

Just a question to @PhilBoy : you say Object Pascal, but do you know if it is in Delphi, Lazarus or an other environment ? Let's suppose it's Delphi, do you know what was the development version ?

 

The language don't differ a lot between releases, but used libraries does.

 

Is it common to have shared code between Delphi and Lazarus? If so, what are the equivalents to c preprocessor macros like "#ifdef Delphi"?

Share this post


Link to post
58 minutes ago, Paul Dardeau said:

 

Is it common to have shared code between Delphi and Lazarus? If so, what are the equivalents to c preprocessor macros like "#ifdef Delphi"?

Normally it works the other way around... you write:

{$IFDEF FPC}
.... for FPC
{$ENDIF}
{$IFNDEF FPC}
.... for DELPHI
{$ENDIF}

or 

{$IFDEF FPC}
.... for FPC
{$ELSE}
.... for DELPHI
{$ENDIF}

 

Edited by DelphiUdIT
  • Like 2

Share this post


Link to post
17 hours ago, PhilBoy said:

Can anyone offer a learning roadmap to be proficient enough to do the task above?

Much of the roadmap should include reticulation of the system you are modeling.   Bond graphs allow cause effect, modular construction, and the relationship between the domains to be surfaced with causal strokes the bonds (effort vs flow) are drawn  .  To avoid paying 20 K to Twente sim,  I draw the system out in bound book. these drawings help in connecting sources to sinks. A book on bond graphs mentioned that eigenvalue  would be easier to understand written as characteristic wert. 🙂   

 

 

 

Delphi to Laz.    

// in lpr  was dpr
{$IFDEF FPC}
  {$MODE Delphi}// saves using specialize in generic constructs
{$ENDIF}

uses
{$IFnDEF FPC}
{$ELSE}
  Interfaces, // lets the laz work
{$ENDIF}

 

Share this post


Link to post

To All,

Thank you for your suggestions. I have already read the book by Marco Cantu but it wasn't satisfactory. The book by Marco Cantu does not offer a beginner a helpful way to understand how applications are developed from scratch in Delphi RAD Studio. Because I have very basic knowledge,  I was wondering if anyone could recommend a roadmap of topics in Software Architecture and Object Oriented Programming/Design that will help me understand a methodical approach to understanding how to characterize and modify the simulation application I'm working on. I am looking for material that will help me learn app development using Delphi RAD Studio. I'm essentially trying to learn software architecture and OOP/OOD using Delphi RAD Studio. 

Share this post


Link to post

Ok, let's check this two guides redacted for new Delphi&Pascal developers :

 

- Programming with Delphi : https://docwiki.embarcadero.com/RADStudio/en/Programming_with_Delphi_Index

 

- Developing Database Applications : https://docwiki.embarcadero.com/RADStudio/en/Developing_Database_Applications_Index

 

They are old, but still up to date except for the database part where you are invited to use FireDAC, but if your project is old, you should have this deprecated knowledge in mind.

 

(if you look on the Internet you should find the PDF release of them from Delphi 7 of after)

  • Like 1

Share this post


Link to post

Hi,
if your goal is to be able to "take control" of the project, modify it and implement it with new features, I must warn you that it is an operation that even a senior programmer generates some anxiety.
Pascal, and DELPHI in particular, helps you in this and therefore your work will certainly be "lighter".

To be able to do this, in the absence of any information about you, there is a series of activities to be carried out preliminarily (what you call a roadmap):

 

1) Know the basics of Pascal, and by basics I mean the structure of a Pascal program, in particular how it is implemented in Delphi, and its composition;
2) Definitions, variables, constants;
3) Operators (logical, mathematical);
4) Assignments and comparisons;
5) Numbers, characters, variants;
6) Vectors and matrices;
7) Structured data, sets;
8 ) Procedures and functions;
9) Pointers;

 

To then move on to OOP:

 

10) Basic OOP concepts (encapsulation, abstraction, inheritance, polymorphism);
11) Classes, constructors and destructors;
12) Exceptions;
13) Properties and events;
14) Multithreading;
15) Life and purpose of "variables" or object instances;
16) Memory management;
17) Files, streams;
18) RTL and RTTI;

 xx) Generics and collections;

 

and lastly (so to speak) to the VCL, if you want to stay in the classic Windows application or in FMX if you want to go towards the environment more dedicated to the Mac, Linux and mobile worlds (Android and IOS), also functional for Windows:

 

19) Basic VCL classes (TObject, TPersistent, TComponent, TControl);
20) Ownership and parentship;
21) Graphics: TCanvas and handles;
22) Generics and collections;

 

Another topic, really expanded and I would say almost a world in itself are databases ... Delphi has a good library (FireDac) that allows very easy access to most modern and not modern databases.

 

Within all this there should also be a smattering of how the IDE works, already as a "ZERO" chapter as it will be needed to be able to carry out all these points.

 

In conclusion I do not know if there is a specific publication that allows you to do all this, if not it will be necessary to read various publications to allow you to operate safely in the project.

 

This is as far as I think it is necessary, maybe someone else certainly has some additional information or a different path in mind.

If the forum members want to provide you with some links on this ...

 

Bye

Edited by DelphiUdIT
  • Like 1

Share this post


Link to post

@DelphiUdIT Thanks a lot for this detailed list of topics. This will be very helpful for me. So, as far as my programming background is concerned, I know enough programming to write functions and helper files in C++ and I also have experience writing CUDA kernels in CUDA C++. To be fair, the Marco Cantu book was helpful in understanding the fundamentals of variables, conditional statements and classes in Object Pascal, since I'm already familiar with those topics in C++.

I have never built an application before, so I wanted to understand what goes into making one and how dependencies are formed between classes used to construct the applications, because I have a task to characterize the architecture of a Delphi simulator and modify its features. I appreciate the caution about the complexity of this task and the validation of what I've come to find out these past few days of the difficulty of finding a single source of Delphi material that is complete with topics in Software Architecture and OOP/OOD.

I will definitely be paying attention to these topics you laid out, thank you very much.

Edited by PhilBoy

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

×