I have some good news for you, the future of software development has arrived! Well, to be precise, the next possible big thing in the future of software development is hereā¦ again. What’s next for using Electron with Windows for Windows Application Development?
Table of Contents
Works anywhere, just add RAM
I have this mental block about the name Electron. Iām not entirely sure why it is,w but whenever I try to remember the name of this ubiquitous web framework, my little gray cells shout āEclipseā and, try as I might, I canāt conjure up the correct name at the appropriate moment during the chatty too-and-fro of a webinar.
I think I have a theory though on why this is happening; my unconscious mind is trying to prevent me from crossing over to the dark side to use Electron to create cross-platform applications.
What is wrong with using Electron?
Look, thereās nothing wrong with using Electron as such. Iāve actually used Electron and produced an app which was, in effect a website encapsulated by the Electron framework and runtime. But, that said, it is a voracious eater. It will consume every part of your machineās RAM and CPU resources if left to its own devices. If you donāt believe me just run a quick web search for āelectron problemsā.
The pros of Electron are that it can be a quick route to market. If you have a web app itās not a massive task to wrap that website or web app with the Electron framework. Also, it implements an auto-update system which means you can push out new versions and improvements with fairly low friction.
A web developer is not necessarily an application developer
A couple of problems crop up. Behind the scenes of almost every Electron app is the beast which is Node.js ā bringer of NPM, the Node Package Manager. The NPM is a superb repository of add-ons, components, modules and time-saving Nodestuffs. Electron / Node developers can get a package for almost everything. If youāre a web developer who has some JavaScript knowledge the NPM can allow you to pull in components to save you a ton of work.
Isnāt using NPM a bit like installing Delphi Components?
Well, yes it is. Except with one very specific difference: Delphi is compiled down to native code with an optimizing compiler. If you include 1000 Node packages ā either deliberately due to some form of overzealous optimism, or inadvertently due to one package having a dependency on another which depends on another five which all depend on another six packages ā then you will have 1000 Node packages in your app even if all it does is display a page saying āhello worldā in flashing magenta.
If you do the same in a Delphi app you will get a lot of unnecessary junk included ā but Delphiās compiler and linking mechanism will exclude a massive amount of things you pulled in but donāt actually get used. It canāt totally protect you from yourself and your component-hoarding kitchen-sink ways but it will definitely save you from creating a Gigagbyte app when it only needed a few MB at most.
Low code is the Next Big Thing
Right. Low Code apps. Youāve seen some of them and, yes, they can be great for creating apps usually either by answering questions in a wizard or by dragging and dropping pre-defined visual blocks to pretty much draw the program on the screen like a flow-chart on steroids.
Yes, done right and in narrow fields of implementation, these draw-it-yourself programming languages can be very useful, especially in the educational sector where it can help novices visualize the workings of a programās flow.
We even have a FireMonkey Low Code Wizard for RAD Studio so itās not a totally horrible idea.
But wait a minuteā¦
Is visual development a new thing?
Iām old enough to have been a computer programmer who learned to program in the 1970s and 1980s. I wrote my first for-money application, an advertising text banner, in 1979. It was text because everything was text. No mice, no pointers, no windows, no directories/folders ā no MS-DOS or Windows. I went on to write COBOL for a living and then, later C programs, all done the āhard wayā with Vi, Edit or EdLin (yes, I really do know how to exit VIM). For the first three months as a COBOL developer, we junior programmers had to write out our programs on COBOL coding sheets ā literally pieces of paper written on with a pen. We wore white lab coats because computing was a science and scientists worked in labs. Then we got āterminalsā so we could type the code in ourselves. No more lab coats although we suddenly had to wear three-piece suits since we were now a “business” and business people wore suits.
This is how it was, with little variation, for the next 12 or so years. Seriously, the only āvisual developmentā was a hand-drawn flow-chart.
Microsoft rides to the rescue
Then Visual Basic came along. It was great but was as slow as a slug at a beer festival and compiled into a pseudo-code layer rather than the super-speed of native assembly or C programs. This interpretative nature also generated a problem called āDLL hellā where the runtimes which made tiny Visual Basic programs possible would have multiple versions which were incompatible with one another and gave rise to missing function entry points that were fiendishly difficult to resolve. Also, VB relied a lot on VBX and OCX controls which added functionality, often to do quite ordinary but necessary things missing from the runtime ā but they too could be different from the one expected by your app, frequently in ways which were fatal to your poor program.
Doesnāt that sound a lot like the situation with Electron? It also sounds a little like the early days of Dot Net too: āthis app requires Dot Net Runtime X.Y.Z, download it nowā ā which meant a 500MB download; you could safely start it downloading and go to lunch while it did that.
The internet is just a baby
Your VB program could be really tiny. But that tiny app was actually leveraging a huge monster installation of Visual Basic runtime and lots of VBX/OCX installation artifacts. This was back when modems were considered fast if they went to 56K on a standard telephone line. If you were unlucky your modem was only a 1200/1200 or 2400 speed box. Five megabytes was a slow, tedious and frustrating download, especially if your Mom picked up the telephone to call Auntie Gertrude part way through.
A magazine advert changed my life
Then, one day in 1995, I happened to be looking through a computer magazine (which was actually printed on real paper, ee those were the days) and I saw an advert for this new system called Delphi which would allow you to create your programs by dragging and dropping visual elements onto āformsā ā a bit like how you could in Visual Basic ā except it was based on a blindingly fast optimizing compiler and linker which could produce native code with no requirement for burgeoning runtimes and was, in effect, immune to the DLL hell that had plagued me ā and many 1000s of others ā working with Visual Basic.
I ordered a copy of Delphi 1 the day it was released. I still have the receipt.
Hello world the low code way ā in the 1990s
So, with this new Delphi you had to take some time to learn Pascal. I thought that would be a bit of a hill to climb but it turned out it was not massively different from BASIC or C. In fact it had the ease of use of BASIC with all the professional, close to the metal power of C while avoiding many of the mind-bending esoteric functions of both.
To create a program which showed a basic window with a button on it that said āhello worldā when you clicked on it took one line of written code. Visual Basic was similar, so far so good.
Then I compiled the Delphi app and realized, when running it, that it would launch from anywhere on the computer ā or anyone elseās computer ā without having to install it first.
Back then we didnāt have USB drives. The floppy disk still ruled the world as the tool of choice to take a program you wrote on one computer and install it on another. I could copy the app onto the floppy disk and then take it over to a colleagueās computer and run it from the floppy disk and all this without installing anything AT ALL on his machine. It wasnāt just low code ā it was zero installation too.
You could not do this with a Visual basic program unless the other machine had the Visual Basic runtime installed.
The low code, no install method still works today for Delphi
Wind forwards a couple of decades. Today I have a fairly popular client-server app which is pretty comprehensive for the target market and laden with features. It connects to a MySQL database and āspeaksā to a custom-written (in Delphi, by me) Windows service for data marshalling and licensing.
The application, complete with compiled-in multi-resolution graphic resources, compiled-in direct native MySQL access, encryption, PDF and report preview generation – dripping with features, compiles to a finished app size of 10mb. TEN megabytes.
The server part is only 917kb. Yes, less than a megabyte.
You can run it all from a USB memory stick since it still requires no installation for the client side.
Your modern app is a bloated monster
Compare my ten megabyte Delphi app to some of the new darlings of the low code world, especially Electron, and youāll see that Delphi, the original low code kid, still has plenty of tricks. Itās the same set of tricks it has always had in its repertoire: easy and rapid component-based development, a dizzyingly fast compiler, compiling down to native-level code which produces rock-solid applications that run and keep on running while the operating system and the hardware evolves.
Is Delphi old-fashioned?
Well, RAD Studio Delphi doesnāt stay fixed in the halcyon days of the ā90s technology boom; apart from the obvious modernity of the IDE, RAD Studio adds now the FireMonkey FMX Low Code Wizard to give you a head start on the donkey work, the REST Debugger to keep you current with the modern world of consuming online services, more and more deployment targets such as iOS, Android and Linux and the Web too. The market for third-party components is still strong with something available for almost anything you could ever want. But, better still, the compiler and linker make sure that, unlike poor Electronās Node package list, youāre only pulling in actual code which can be executed, not anything and everything just because itās referenced by nothing more than an include file.
The future of software development
The future of software development looks like it might include some unnervingly accurate āintelligent AIā features such as those in beta at the moment for the Copilot project. Copilot is about trying to guess what code youāre trying to create and then attempt to write it for you based on what the machine learning was trained on, mostly drawn from public repositories.
Itās already run into a little bit of hot water by being a bit too good at regurgitating someone elseās code verbatim and for suggesting license text which turned out to be a perfectly good license but for the wrong context in which the app developer was working.
Will I ever get replaced by an AI programmer wielding machine-learning coding skills? Maybe. Although Iāve heard this said before, over the decades Iāve worked in the industry. The reality is that Iām far more likely to be replaced by outsourcing to some country where the cost of living is sufficiently low that the disparity in what they are prepared to work for is too great for me to compete.
If they use Electron thoughā¦ I predict the customer will come backā¦ eventuallyā¦
RAD Studio Delphi is the fastest and most efficient way to create apps with the minimum of effort. Take your ideas and turn them into reality by downloading a trial today.
Design. Code. Compile. Deploy.
Start Free TrialĀ Ā Ā Upgrade Today
Ā Ā Ā Free Delphi Community EditionĀ Ā Ā Free C++Builder Community Edition
Great article!
The 1970s / early 80s computer looks like an Old Super Pet (or one of the earlier Commadores)!
Sure brings back memories! Next time, don’t forget the original Osborne.
Oh my coding pre-dates even the wonderful Osborne Computer Corp. I had the advantage of my father working as a director for ICL where he was head of 1/3 factory – which during the second world war was the “International Computers and Tabulators” who, in part, built the ‘bombes’ partially designed by Alan Turing et al. I was exposed to computing from a very early age when my dad would bring home scrap “music ruled computer paper” for us to draw on. I learned about coding from discarded punched card decks from the same sources at ICL and, later, Control Data which also hawked around miles of card and punched paper ribbons as Control Dataset – an inspired name drawn from the contemporaneous practice of writing computer programs itself in the 1960s and 1970s. The late 1970s and early 1980s was an absolutely electrifying time to be alive; on the cusp of many great computer and technology discoveries and advancements in semi-conductors. The future is coming and AI will definitely play a part in that somehow with code completion, ‘intelligent’ predictive code correction and the like; but, overall, I think that while the method we use to pour the code into the guts of the computer may change, the underlying art / science / creativity is still going to be a fundamental part of that process.
The early 1980s sure was an exciting time. My wife Sandi and I were actually amongst the first shareware authors. Pc-Sweep helped put us through college in our early years. The original version we wrote in Turbo Pascal in 1982 and then we rewrote it in Desmet C the following year.
We did the user group circuit all over Texas through the 1980s before settling down and starting a company that eventually got bought by Symantec.
Thanks for the trip down memory laneā¦
You should write a book about your experiences Shane. There is a great and increasing demand for posts and books about the early days of computing and your work on shareware is definitely right in the target area that people are interested in. Seriously.
Hello, I came across your Blog , it really explains the topic in detail. Keep up the great work.