357mag 2 Posted December 11 I'm considering working in Delphi for awhile, and I was looking through my books (I have four of them), and every book starts off right away with Windows programming. None of the books teaches you console programming. Personally, I like console programming. I was wondering if there is a reason all of my books starts you off that way. Perhaps because Delphi is a clean, fairly easy to grasp language? Share this post Link to post
Remy Lebeau 1421 Posted December 12 2 hours ago, 357mag said: I was wondering if there is a reason all of my books starts you off that way. Maybe because the majority of end users are not console users, and the books want you to reach a larger userbase more quickly? Just speculating... Share this post Link to post
FPiette 385 Posted December 12 Yes, you should! Console programming (Like Unix utilities) are mostly included in GUI programs... without GUI. Share this post Link to post
PeterBelow 239 Posted December 12 13 hours ago, 357mag said: I'm considering working in Delphi for awhile, and I was looking through my books (I have four of them), and every book starts off right away with Windows programming. None of the books teaches you console programming. Personally, I like console programming. I was wondering if there is a reason all of my books starts you off that way. Perhaps because Delphi is a clean, fairly easy to grasp language? GUIs are just the majority of the applications build with Delphi. But you can easily build console programs with it, too. The File -> New dialog also offers a template for that. Share this post Link to post
Die Holländer 49 Posted December 12 Console programming is easy with Delphi. The books will learn you the Delphi (Pascal) syntax and that is one of the most easy to learn of all the programming languages. 14 hours ago, 357mag said: None of the books teaches you console programming. That was dummzeuch's conclusion already 10 years ago: twm's blog Important : Console with parameters (With a Gui example..) Share this post Link to post
David Schwartz 428 Posted Wednesday at 11:24 PM If you prefer working from the command line, why not just use something that's oriented that way? I mean, you don't need a language as complex as Pascal to write simple scripts. Try playing with bash or sh or ksh or some other shell scripting language. The thing you're missing in just focusing on the command-line is not the GUI, but the entire Event-Driven ecology. That's what really sets Delphi apart from even simple Pascal. if you don't want to mess with a UI, then consider playing around with back-end services using one of the many REST frameworks that are available for that. Nobody gives two craps about Pascal today. Delphi is still alive and kicking because of the VCL, which is mainly an EVENT-DRIVEN FRAMEWORK. That's how it SUPPORTS such a rich and complex GUI environment. The basic Pascal language and RTL is available to command-line apps, but nothing from the VCL or FMX frameworks are, even though that's where 99% of the VALUE lies. Share this post Link to post
Rollo62 538 Posted yesterday at 07:27 AM Scripts are perhaps not powerful enough or too clumsy to use them easily. Maybe DosCommand is a bridge between both worlds, that works for you and can bring the best of both worlds close together. https://github.com/TurboPack/DOSCommand/blob/master/Demo/Unit4.pas Share this post Link to post
Die Holländer 49 Posted yesterday at 08:30 AM I view console applications not just as user (prompt) programs, but also as tools for performing tasks that just don’t require a GUI. We have numerous console applications that are often started by a task scheduler or installed as services. These programs are hard to write with scripts alone, which is why we use Delphi and its tools and libraries. (such as FireDac, sFTP and the mORMot HTTPs web server). These applications handle all the automated processes and tasks essential for our company. All the code can of course used in other projects for GUI or console applications. Share this post Link to post