{"id":1511,"date":"2017-08-29T15:22:49","date_gmt":"2017-08-29T13:22:49","guid":{"rendered":"http:\/\/borkedcode.com\/wp\/?p=1511"},"modified":"2017-08-29T15:22:49","modified_gmt":"2017-08-29T13:22:49","slug":"why-do-i-choose-delphi","status":"publish","type":"post","link":"https:\/\/www.borkedcode.com\/wp2\/2017\/08\/29\/why-do-i-choose-delphi\/","title":{"rendered":"Why do I choose Delphi?"},"content":{"rendered":"<p>Why?\u00a0 Really, why do I?\u00a0 In a world full of PHP, Java, Visual Studio, Python, Lua, and all these other syntaxes, what is it about Delphi that brings me back time and time again?<\/p>\n<p>First off, let\u2019s be clear \u2013 it\u2019s not an exclusive choice.\u00a0 I still do use Python if I have to code something for a Raspberry Pi, or whatever flavor of C it is hat Arduino sketches are made of.\u00a0 I do a little C# from time to time when I have to work on a project that is written in it.<\/p>\n<p>But why do I choose Delphi when given the opportunity?<\/p>\n<p>A load of people have asked me this question over the years, and although I might waffle a bit on what I say, the answers are generally the same.\u00a0 There are several reasons really, but let\u2019s talk about the most important ones.<\/p>\n<h2>Legibility<\/h2>\n<p>Delphi is easy to read.\u00a0 It\u2019s a Pascal derivative, and Pascal was originally designed for just that purpose \u2013 to be easily read.\u00a0 From a syntactic perspective, it is very close to English, my native language.<\/p>\n<p>Its handling of framework elements is also quite intuitive.\u00a0 \u201cObject.Property := value\u201d is very easy to uptake.\u00a0 Being able to follow sub-objects all the way through the chain in a single line is also quite a simple process, being nothing more than \u201cMyObject.object.object\u2026\u201d and so on.<\/p>\n<p>The editor within Delphi also makes things insanely easy, doing indents for you, syntax-highlighting in your code, and one of the (if not the) best code-completion systems available in the world.\u00a0 Being able to collapse procedures and methods within the code also goes a long way towards making it very easy on the eyes.<\/p>\n<h2>Speed<\/h2>\n<p>Delphi is fast.\u00a0 Really, really fast.\u00a0 In the days when it first was released, a fast compiler was a major coup in marketing terms \u2013 regular C and C++ compilers could take hours to build relatively simple Windows apps\u2026and Delphi could do them in <em>seconds<\/em>.\u00a0 Borland used to brag that while most programmers in C++ were afraid to touch the compile command, Delphi users compiled constantly just to do syntax checking.<\/p>\n<p>Today, a fast compiler is not so unique any longer, but Delphi is still quick as hell.\u00a0 You never get tired of speed, I guess, and I am loathe to give it up.\u00a0 I know when I do a full build of my app I won\u2019t have to go get a coffee or something just to pass the time.<\/p>\n<h2>Smarts<\/h2>\n<p>Delphi\u2019s IDE contains a host of useful debugging tools, all bound into the IDE.\u00a0 Value inspectors, call stack, all the traditional stuff you\u2019d expect from a dev tool, plus something a little strange and fantastic:\u00a0 the ability to step line-by-line through your code in a fashion usually reserved only for interpreted code.<\/p>\n<p>Add to this conditional breaks, memory-specific commands, being able to attach to running processes, there\u2019s a ton of things here to help you identify what\u2019s wrong with your code.\u00a0 To top it all off, you can even trace your debugging back into the code that ships with the frameworks in Delphi, just in case there\u2019s an issue with those sources.<\/p>\n<h2>Logic<\/h2>\n<p>I didn\u2019t realize this when I first started working with Delphi, but somehow the logic of it just worked out almost perfectly.\u00a0 How things are done in Delphi is an extremely well-thought-out design, that follows a very solid, stable pattern.<\/p>\n<p>Object orientation, as much of a clich\u00e9 as that might be, is just done right in Delphi.\u00a0 Java always pissed me off because Sun couldn\u2019t figure out how to get their terminology straight \u2013 in their lingo, \u201cclass\u201d refers to both the blueprint for creating the object and the instances of the object themselves.\u00a0 In Delphi, a class is just that \u2013 a class.\u00a0 It\u2019s not an instance.<\/p>\n<p>Objects created in the Delphi framework also follow good encapsulation rules \u2013 a combo box is just a combo box.\u00a0 It\u2019s not an edit box, it\u2019s not a grid, it\u2019s just a combo box.\u00a0 Same goes for a query object, or a field, etc.\u00a0 Elements in your app do what they should, and only what they should.<\/p>\n<p>There\u2019s also things like how it handles properties of objects.\u00a0 Under normal circumstances, an object that is created in other languages\/platforms needs to be initialized (have all its properties set), or not accessed until it is.\u00a0 Delphi self-initializes objects as a part of their makeup \u2013 every object created in Delphi has a \u201cconstructor\u201d method in which the author is expected to instantiate necessary sub-objects and initialize variables.\u00a0 Although authors outside of Delphi\u2019s sphere might create objects with bad constructors, this rule has been followed almost religiously within Delphi\u2019s authorship.<\/p>\n<p>What this means to the regular developer is that when they create an instance of an object, it keeps code to a minimum \u2013 letting the developer focus more on their app, than on the setup of their controls.<\/p>\n<p>And that\u2019s how it should be.<\/p>\n<h2>Corba<\/h2>\n<p>Delphi added CORBA support in the late \u201890s and\u2026oh, who the fuck am I kidding?\u00a0 I despise CORBA.\u00a0 It\u2019s one of the worst ideas to add to Windows programming since WindowsME.\u00a0 I just threw it in here to see if you were still reading J.<\/p>\n<h2>Components<\/h2>\n<p>Components are the little pre-packaged bits of code that show up in your tool box (called the \u201cTool Palette\u201d) in Delphi.\u00a0 There are several hundred that ship with Delphi, and those are probably enough to get the job done on whatever app you are building.\u00a0 If not, there are <em>thousands upon thousands<\/em> more available on the net.\u00a0 Chances are, if you need something done, someone\u2019s done it in Delphi.<\/p>\n<h2>Deployment<\/h2>\n<p>Deploying apps in some language platforms can be a real chore.\u00a0 Installing a .NET app, for example, requires the entire .NET framework to be installed on the host machine.\u00a0 Generally not a problem, as most Windows machines already have it, but because we\u2019re in the business of writing software you have to check to make absolutely certain that everything you need for run time is present, and if it isn\u2019t, make sure it gets installed before you run your app.<\/p>\n<p>In Delphi, odds are that unless you included something exotic like a third-party reporting engine, or maybe you\u2019re writing a DataSnap-enabled n-tier program, there\u2019s going to be just one file:\u00a0 your program executable.\u00a0 Even if you do have some extra fancy stuff, those will include a very minimal file count (DataSnap, for instance, only requires one extra library to accompany your app).\u00a0 Delphi really makes deployment a breeze.<\/p>\n<h2>Data<\/h2>\n<p>Delphi, since its inception, has been great at handling databases of many stripes.\u00a0 In its current incarnation, it supports something like 100+ data sources straight out of the box (Architect version).\u00a0 From Excel to Teradata to MS SQL, you can get there from here with Delphi.<\/p>\n<h2>Multiple Platform Targets<\/h2>\n<p>When I was in the thick of things in \u201999-, \u201cCross Platform\u201d was a big selling point for us that sadly didn\u2019t make a lot of money for us.\u00a0 We released Kylix (Delphi for Linux) and the reception was a bit lackluster (I could go into the why and how, but I don\u2019t want to talk bad about execs who aren\u2019t here to defend themselves).<\/p>\n<p>Today, though, mobiles are making huge leaps forward in their capacity as a computing device, and \u201ccross platform\u201d doesn\u2019t just mean linux \u2013 it includes Android, IPhone, and more than a few other systems which have shown their talents as computing devices.<\/p>\n<p>And Delphi can program for them.<\/p>\n<p>That\u2019s a BIG plus in my book.\u00a0 You can\u2019t really get that from other tools, and certainly not ones with such a solid and useful development environment or lengthy background.<\/p>\n<h2>Designers and Two-Way Development<\/h2>\n<p>\u201cTwo-Way Development\u201d is a feature that goes way back in Delphi \u2013 it used to be called something a little different, but I can\u2019t recall specifically what it was \u2013 it\u2019s the ability to program one\u2019s UI both visually through a designer, and in text using the editor.<\/p>\n<p>Delphi\u2019s designers (the palettes on which you \u201cdraw\u201d your forms and other visible elements) have always been cleaner and more close-to-real than its competition, which cuts down on the \u201cGarrr, that thing is still three pixels off!\u201d moments.\u00a0 I really appreciate anything that saves me tedium like that.<\/p>\n<p>As well, the two-way nature of how the designer works (if you want to see what I\u2019m talking about, create a form in Delphi and throw a few controls on it \u2013 then hit Alt+F12) is super-useful when you want a quick breakdown of how that form is really laid out.\u00a0 It\u2019s great for very crowded spaces, or ones with many controls on them overlaid on top of one another.\u00a0 Using text mode, you can find the control you want fast, and see in an instant what its properties are.<\/p>\n<h2>Summary<\/h2>\n<p>Look, I could go on and on with a multitude more reasons why I consider Delphi a superior tool to any other on the market today (and really, it is superior \u2013 there simply isn\u2019t anything that stacks up against it).\u00a0 It\u2019s simply better at doing what it\u2019s made to do.<\/p>\n<p>It\u2019s also a bit of a \u201csecret weapon\u201d for me.\u00a0 When I get pulled to do a job, I bring Delphi out.\u00a0 Not just because it\u2019s good \u2013 but because <em>it helps me be good<\/em>.\u00a0 I know I can do far better with Delphi than someone equal in skill to me using something like Visual Studio.\u00a0 It\u2019s simply a better tool.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why?\u00a0 Really, why do I?\u00a0 In a world full of PHP, Java, Visual Studio, Python, Lua, and all these other syntaxes, what is it about Delphi that brings me back time and time again? First off, let\u2019s be clear \u2013 &hellip; <a href=\"https:\/\/www.borkedcode.com\/wp2\/2017\/08\/29\/why-do-i-choose-delphi\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,41,15,17,20,26,30],"tags":[],"class_list":["post-1511","post","type-post","status-publish","format-standard","hentry","category-business","category-development","category-it","category-pc-stuff","category-programming","category-software","category-work"],"_links":{"self":[{"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/posts\/1511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/comments?post=1511"}],"version-history":[{"count":0,"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/posts\/1511\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/media?parent=1511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/categories?post=1511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.borkedcode.com\/wp2\/wp-json\/wp\/v2\/tags?post=1511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}