PhilBoy 1 Posted January 16 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
DelphiUdIT 200 Posted January 16 (edited) 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 January 16 by DelphiUdIT Share this post Link to post
Patrick PREMARTIN 90 Posted January 17 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
Patrick PREMARTIN 90 Posted January 17 You can also read the "Delphi Language Guide" from https://docwiki.embarcadero.com/RADStudio/en/Delphi_Language_Guide_Index Share this post Link to post
Paul Dardeau 4 Posted January 17 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
DelphiUdIT 200 Posted January 17 (edited) 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 January 17 by DelphiUdIT 2 Share this post Link to post
Pat Foley 52 Posted January 17 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
PhilBoy 1 Posted Saturday at 02:58 AM 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
Patrick PREMARTIN 90 Posted Saturday at 10:03 AM 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) 1 Share this post Link to post
Patrick PREMARTIN 90 Posted Saturday at 10:06 AM This "Delphi Programming for Beginners" could also help you how Delphi and Pascal language work : https://www.dropbox.com/scl/fi/kh9qih54jgfbohejfmmww/Delphi-Programming-for-beginners-Yuriy-Kalmykov.pdf?rlkey=nv258b6gu7eufb674itnl4h39&dl=1 1 Share this post Link to post
DelphiUdIT 200 Posted Saturday at 01:37 PM (edited) 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 Saturday at 01:44 PM by DelphiUdIT 1 Share this post Link to post
PhilBoy 1 Posted Saturday at 09:25 PM (edited) @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 Saturday at 09:28 PM by PhilBoy Share this post Link to post
PhilBoy 1 Posted Saturday at 09:29 PM @Patrick PREMARTIN I will explore these resources you provided, thank you very much Share this post Link to post
David Schwartz 439 Posted 17 hours ago (edited) On 1/17/2025 at 7:58 PM, PhilBoy said: 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. I don't mean to sound mean or burst your bublle, but I think you're being set up for failure. You're also talking about a year or two of learning. What you're asking about isn't going to be found in a book. You'll learn it by working on a bunch of different systems and applications over time. If you want to learn OOP/OOD, then take a class -- learn Java or Typescript or C#. This is not the right project to learn it on. Find a project that's already up and running, with the latest (or very recent) version of Delphi, that's on Win 10 or 11, and where there are some others there who can mentor you and answer your questions. The fact that they hired someone who knows nothing about Turbo Pascal or Delphi or anything related to the application, rather than an expert with many years of experience with it, tells me they do not expect a good result in a timely manner. I've been working with Delphi since it was released and can practically write it in my sleep. But the last several jobs I've had all began by being told, "DO NOT TOUCH THE CODE! Just READ it and become familiar with the overall design." They typically expected it to take 3-6 months before they'd let somebody new touch anything, and that's in a situation where there were several experienced Delphi people on the project. Then they'd have me write up something where I had to show them exactly what lines of code I was proposing to change, in what order, and how to test that the changes worked and there were no side-effects. I was every bit as much of a "Delphi expert" as they were, and in some cases, even moreso. Still, it takes a LONG TIME to learn how a non-trivial piece of software is designed, even if you're an expert in the language. If you don't know either the language or the design environment, you're a goner. At my last job, after a month they gave me something that their IT Mgr had "analyzed" and concluded it would take a week AT MOST, to simply "migrate" this one Delphi app from WinXP to Win10. It turns out that the details the IT Mgr had given me were completely BOGUS -- he just looked at some activity going on in the file system for 30 minutes and made up some crap about what he thought was going on. He thought he was watching files being processed and inadvertently deleted. What he was actually watching was a bunch of temp files being created and deleted by a DLL. When he tried it in Win10 and watched it run, it did not behave the same way. Well, DUH! The problem was the DLL was V1.0, released initialy when WinXP was released, it did not run correctly on Win10. To add insult to injury, their license prohibited us from using it the way we were -- which the IT MANAGER should have figured out already, but didn't. That's all I managed to learn in the first week. And some VP had the gall to ask "Did you get it migrated yet? Yes or no?" I wanted to say, "What part of 'the DLL won't run on Windows 10' don't you understand?" Basically, the findings I reported made a bunch of people look like fools, and they weren't happy. But all of this "analysis" was done before I was even hired, and nobody bothered to explain any of it to me first. My point is, you're very likely on a fool's errand here. Your employer could hire experts like me or many of us here and we'd come in, and after studying that app for a week or two basically say, "it's impossible to do what you're asking". YOU don't even know what you don't know -- and THEY KNOW THAT! It might be 6 months of struggling to learn Delphi and all that stuff before you finally come to the same conclusion. You're being set up. My experience migrating old apps like this into the current version of Delphi and Windows is ... it might work ... but more than likely it's going to take some signficant rework and testing to find any parts that depend on obsolete Windows APIs, DLLs, and other libs that may be obsolete and cannot be replaced easily. Meaning that while your desire to learn Delphi and OOP and all that stuff might seem applicable, that's not what's going to keep that app from being easily migrated. Yes, it might compile. Most likely, it won't. And if you don't understand how components and libraries work, or if there are any DLLs or Windows APIs that won't work, you've got a LOT more work ahead of you that's got little if anything to do with Delphi programming. That DLL I mentioned that we couldn't use ... the company refused to sell us the latest version, claiming (rightly so) that their license did not support our use-case. They wanted to sell us access to their own online REST service that they estimated would cost $10k-$15k PER MONTH!! Management looked like someone just stuck a pipe up their butts when they heard that! "Oh, it's just a simple migration" they were told. "It's just a few days of work" they were told. "It won't take much effort at all" they were told. I had to find a replacement for that DLL and ended up finding a library written in Delphi, and it cost under $100. Then my boss had to deal with HIS boss arguing about "spending so much on such a basic library" for a week... I hope you can see that NOTHING I've mentioned here has ANYTHING to do with DELPHI, OOP, or any of the stuff you're asking about. It's just that you don't know that, and your bosses think that's the problem that needs to be solved, just like my managers did before they hired me to work there and assigned ME to do that simple little "migration" from WinXP to Win10. Honestly, I wouldn't touch that project with a 10-foot pole. Been there, done that, and there's no nice outcome. Everybody is going to be looking to shift the blame, and it's all going to land in YOUR LAP. If you're a contractor, I'd bail out of there fast. Somebody well above your pay grade f*cked up and they're looking for someone to blame it on. Edited 10 hours ago by David Schwartz 3 Share this post Link to post
David Schwartz 439 Posted 9 hours ago On 1/18/2025 at 2:25 PM, PhilBoy said: 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. Please don't take this personally, but who in the hell hired you for this role? And WHY??? Like the other guy said, this is a task even highly experienced Delphi experts would be nervous taking on. I mean this in the best way possible: turn around and run away as fast as you can from this project!!! You're extremely likely to get fired long before it's finished, and they'll likely come up with some totally off-the-wall reason -- they can't exactly say it's because you're unqualified, because THEY KNEW THAT ALREADY! You may have learned something from it, but you won't be able to use them as a reference, and all you'll be able to say about it was you made some money and hopefully have all of your limbs still intact. I've got a few jobs like this in my past that I don't talk about ... hired for something I knew nothing about, thrown into the fray, didn't know what I was doing, then confronted by an upper-level manager who I'd never met who yelled at me and threatened to fire me, then did. The whole time I was wondering, "What in the heck am I doing here?" I once talked to a guy who left engineering to be a recruiter. He said he did really well at it, in a very simple way: He'd invite a bunch of mid-level managers to a free lunch and ask them if they had any projects that were behind. They'd all raise their hands and he'd ask how many of them had at least ONE they ran that they didn't think would actually finish on-time or on-budget, and they all raised their hands. Then he asked, "who's going to take the fall for that?" They all got really silent and he didn't say anything for a good minute or so. Then he said, "the CONTRACTOR!" He said he had one of the highest closing rates of anybody at the company using that approach. And I had a few jobs come to mind that seemed to fit that perfectly. And a few more over the following years, only at that point I had learned to recognize it. I don't mind being hired as a "fall guy". The annoying part is, nobody wants to tell you, even though it becomes pretty obvious before long. It's not fun. The worst part is, they usually make up some cock-and-bull story that they tell the recruiting firm that makes you persona non grata with them after that. Maybe I'm naive, but I couldn't imagine that the recruiters weren't in on the gig as well. Ask some questions about the history of the project and see if you can figure out why it has taken them so long to do this. There's definitely some politics involved; maybe the person who kept blocking it finally left, or a new manager came aboard and he wants to get this thing killed ... there's something going on there with this project. You're the wrong person for the job, so why did they hire you? (Maybe I'm totally wrong, and it turns out to be the best job of your life and everything works out great! Time will tell.) 1 Share this post Link to post
PhilBoy 1 Posted 5 hours ago @David Schwartz I appreciate your frank response to the situation I described in my posts. From my discussions with the Project Lead, I don't think there's any malicious intent behind hiring me for this project. His co-lead for the project pushed hard for this project to be funded and commence, and was really interested in reviving this Delphi simulator. My Project Lead is actually looking for more people to come on board the project. I guess it's a situation where I've mischaracterized my skill sets. My Project Lead is aware that I have no Delphi experience and has asked me to take time to become familiar with the environment. I think I'll just have a discussion with him on what his expectations are and to clarify what my skill sets are and be looking for something else to do. If you would be interested in this role, please let me know and we can privately discuss connecting with my Project lead. 1 Share this post Link to post