Home > Delphi, OP4JS, Quartex Pascal > Smart Pascal, nodeJS and the big picture

Smart Pascal, nodeJS and the big picture

We are standing in front of a revolution in software development. The wave has just begun to arise, and already we can see where this is going and what the impact will be. No, I’m not talking about a biblical prophecy or clairvoyance. I don’t need tarot cards or an astrologer to tell me where the future is and what it will look like — I know, because I have been a part of a team that is paving the way for the Object Pascal community, so that we can surf those waves rather than drown.

At the moment we live in a world where there are real languages and fake languages. We call the fake languages scripting engines, and they come in all shapes and sizes – with great variety in what they have to offer and the eco-systems they were designed to live in. Some script engines live in the command prompt, some in the web server and others are not so picky and can exist almost anywhere.

But with great variety comes conflicts (a paradox for sure, since more options should mean less to argue about), and with conflict otherwise knowledgable and outstanding people  waste their time in pointless arguments. Bickering and slander each other over what is presumably their favorite development suite as an excuse to troll their opponents so they feel better about themselves; typically without knowing the least bit about each other, nitpicking on superficial differences that are skin deep. But while the great majority of us were busy with buttons and pins — something was brewing in the darker corners of the internet.

As a Delphi developer, have you spent a few minutes thinking about what nodeJS actually means for you? How will nodeJS impact your life as a software engineer? How will it affect your life 10 years down the line?

Let me shed some light over what is about to take place in the world of programming.

At the moment we create the majority of our applications using native languages. All of these languages have dependencies on locally compiled libraries or operative systems files in order to function, and naturally you need real software (like C++ builder, Delphi or FPC) to build these things. The supremacy of real languages over scripting languages is of course undisputed at this level, but on another level, the level of the “user experience” and the realities of networking, the laws of physics are turned on their head and your present skill set reduced to ashes.

So the world of programming as we know it is about to change. Completely and utterly. In a very short time.

Where all are blind, rules a one eyed king

Write once, host anywhere

Write once, host anywhere

Imagine writing your next Delphi application in two steps. First, the server – where you isolate database connectivity, your storage API and basically all the mission critical and boring stuff that we simply have to write, even under ordinary, native Delphi programming.

Having isolated this in a server, be it a win32 service, a com factory or just an ordinary RPC server (like a Remobjects server or a Delphi SOAP service) you move on to the next step. Namely the user interface.

So all the database logic, file access and user-identity stuff, which includes login, access rights and personal preferences is now isolated in one part of your solution, while the main form, dialogs and “program” is in another. Your main user interface simply calls your service or server whenever it needs data or anything to display, and as such your GUI is totally segregated from the code that does mission critical processing.

Nothing new under the sun you say? This sounds like a normal “remote procedure call” client/server setup right? Just like Delphi has done for years via SOAP, COM, Datasnap and a wide variety of component packages. Or perhaps a more direct parallel in preferable in this case: how Visual Basic applications used to be built, with near hopeless dependency on ActiveX and COM in order to function.

Is this what is coming I hear you say? Well yes, but not like you think. The above was only the parallel to describe how you compartmentalize an application into two sections. The reality is that the next generation of software allows you to write both sides of the coin just like the parallel – but it lives completely in the cloud (!) And I mean completely. Platform independent in the true sense of the word, non proprietary (no ownership), fully portable and consumable from every device capable of running a HTML5 engaged browser.

The implications of the browser and server speaking the same language is monumental. Let me explain further.

Embracing the future

Building an application 4-8 years from now will be more about cherry picking online services and architecture will be (read: is already) a matter of coupling services together in a meaningful way. The value of a product will be in its code (as always) and the services you provide, which will be mostly –if not completely, JavaScript based.

In other words: game over, the mother of all scripting languages is JavaScript. Unless a beard seeking missile is launched for each and every individual with the skill set to device and implement a JavaScript virtual machine; eradicating advanced software from the face of the earth – there is not a chance in hell that any other “browser friendly alternative scripting engine” can catch up with it.

Flash is dead, VB Script is dead, PL-SQL is a joke and Java as a secure language, handcuffed as it has been for a while now, is tied to the firing-post. I will happily play the role of the prophet and say that PHP and JSP will be eroded out of the statistics of valuable server technologies within a timeframe of 10-14 years. They will still exist, but their user base will be minuscule and impotent; they wont even show up in the charts.

What we face now is a technology that enables us to architect the complete technical service layer, both the server, the database layer — as well as the user interface and experience. All of it from the same language (and project group in your favorite HTML5 authoring tool). This is what the future is all about. And this is what kids today learn as their fundamental computing experience. Kids nowadays don’t spend hours fiddling with assembler or basic like we did, they build enterprise level websites that in Delphi would cost a fortune to realize.

And that is what nodeJS does. This is where HTML5 and Javascript comes into its own right. It allows you not only to write the GUI of an application via clever JavaScript and HTML5 code, it allows you to write the complete server architect from scratch using JavaScript as the only language.

THAT is what’s lurking around the corner. Nothing technologically new. But the scale of this is unprecedented. This happens world-wide.

And I havent even talked about Smart TV’s yet and the new widget marked that has the potential to do a “Napster/Pirate bay” on the television broadcasting companies of the world.

Seeing the big picture yet?

Run at server

Run at server

Let’s move on to connect some dots. Ever noticed those C# tags [RunAt=”server”] ? They exist in Delphi as well but sadly Embarcadero never used them for anything as substantial as web development. What it does is that the descriptor informs the compiler that the following function should execute on the server, and not the client. So when you build the code the compiler generates two files rather than one (talking ASP.NET here by the way).

But the ASP technology is quickly getting outdated. nodeJS delivers what IIS/ASP.net is presently delivering — but without the bolted down, handcuffed to Microsoft dependency. NodeJS blows it apart and allows YOU to define your own protocols, security, transport channels and server activity.

Now let me ask you: How do you compete in a marked like that with a native Win32/64 – OSX compiler?

You don’t. You’re not even a candidate. Hence … an Object Pascal to JavaScript compiler would come in handy right?

Lest we forget

Real languages will never go away. The rise of cloud computing, cloud applications and fully abstracted network entities – they wont affect your Delphi investment or your C++ skills. But they will affect you in the sense that unless you are able to deliver cloud based applications — applications that cannot by their very nature include any native elements (no dll’s, no win32/64 or OSX binaries) — then chances are that you will see a drop in job offerings and contract work in the near future. We have to adapt faster than this.

But we can turn our mistakes into assets by simply taking advantage of the tools readily available today. Tools that have been custom-made for Delphi developers to gradually enrich their toolbox. And it’s actually very, very exciting and fun!

Smart Mobile Studio

Cloud apps will work anywhere

Cloud apps will work anywhere

Hopefully I have opened your eyes a bit to what is coming just around the corner, and you have more appreciation for what nodeJS and the JavaScript revolution represents.

This is why I created Smart Mobile Studio to begin with, because I knew that this was coming, the factors leading to this were just to great to ignore. Google (Chrome OS) and Mozilla (Firefox OS) are already pushing mobile operative systems based on HTML5. Now what language do you think those operative systems run? Delphi?

I also wanted to retain and protect our knowledge of object pascal – and at the same time give Delphi developers a bridge from the present reality  — into the new reality of 100% abstract portable cloud applications. We might not like the new reality where JavaScript out-performs native Delphi graphically, but that is – at the end of the day, the reality as it is.

But what we can do is to invest some time in learning what is around the corner, protect out language – which ultimately is where our value as developers exist.

Why do you think Google, Facebook and Microsoft are battling over online identity management? All the “log in with Facebook” or “log in with google” — because the company that controls online identity will be the passport holders for software merchants and credit card transactions in the future.

And no matter what you create in the coming years, being able to validate a person’s identity online will be worth billions. Think active directory on a global scale and you get the idea.

The future is near, be prepared

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: