The Web vNext

I have been reading a lot about Web development lately, and pondering the future of web development.  For the longest time I shied away from Web development, largely because it was so laborious and frustrating.

I dabbled a bit back when people were using COM objects with VBScript on the server and Javascript on the client in classic ASP pages. Even back then, companies were making software look like Windows applications within the browser (IE).  By today’s standards, those applications look dated, but today’s web SPAs function in a similar manner, although great progress has been made in standardizing browsers, abstracting out their idiosyncrasies using frameworks, and handling variable display sizes.  My current experience is that it’s still harder and more time consuming to develop a good web application, and they are still not as rich as a Windows app IMHO.

That begs the question as to why people are writing applications for the web anyway.  For eCommerce sites, I get it, but for other line of business applications why not throw off the shackles of HTML/CSS and embrace a new UI framework altogether?  Now I know what you’re thinking…..this guy has lost it and wants to re-invent the web which a lot of smart people have worked on for years to make Web 2.0 a reality.  Before you call the white coats, read on…

When a user goes to a web site for any commercial activity they should be ensuring the website has a valid SSL certificate from a trusted authority.  The Internet is a dangerous place these days where web sites may be trying to attack your computer.  We download content from such sites into our sand boxed browser. This is not that much different than downloading a signed application.  We use signed applications all the time now, when using applications on our phones, tablets and desktops from the “app stores”.  The only difference is whether the store owner i.e.: Apple, has reviewed the application testing for malware.  Open source software such as Tortoise Git is often signed as well to ensure users trust that the application they are getting is from the advertised source and is safe to use.  I think it’s safe to say that most people would trust a signed application.

With that premise in hand, why aren’t we all writing signed Desktop apps using REST back ends?  Or if we really want to leverage single source cross platform applications, why not use WASM with a UI framework that allows an application to be written in languages that are typically used for native desktop, and mobile devices such as C#, Delphi, or C++?

The performance of even Javascript is pretty decent.  Many games have been ported to the browser using Javascript transpilers or EmScripten.  WASM allows developers to take this one step closer to the metal (CPU) and skip the run-time parsing and execution of Javascript.  Blazor is a project that does just that, within the confines of HTML/CSS, but also shows the possibility of using WASM with a different presentation framework such as Uno, or Ooui.  Obviously I’m not the only one thinking that a different presentation layer might be overdue in the web space.

One of the advantages of Blazor is to eliminate some of the third party dependencies, making the development stack more reliable, and to use the same technology and tools throughout.  Of course you can learn and use Javascript throughout the entire stack now, or a Javascript transpiler, but without WASM using your development language of choice is not possible.

I would like to see Object Pascal support the entire development stack.  Preferably the same language dialect and core libraries.  Perhaps something similar to Blazor, or maybe FMX targeting the web with WebGL.  All we need is to be able to capture the compiler IR and feed it into the WASM LLVM back end (okay there might be a little more to it than that).  The web is a huge horizontal market that is ripe for disruption and with the right moves, Delphi could grab a chunk of that segment, making the product relevant again.

What do you think is the future of Javascript on the web?  Will it be dethroned at some point by WASM? Is the future of the Web HTML/CSS, a different UI layer, or perhaps a mix depending on the type of web app?  Should I dust off the Delphi .NET compiler to generate MSIL to feed the Mono WASM run-time, or do we need a way to get the current compilers to output LLVM IR?

Maybe it’s just time to call the white coats as pondering all the options can drive you crazy…

6 Responses to “The Web vNext”

  1. Murat Ak Says:

    Hi,

    For many years, i look at for web coding, and i dont like any of them.
    But know there is a good alternative, it is TMS Web Core. I like that, because i can use Object Oriented Pascal code and RTL.

    And there is a another solution WASM for delphi from RemObjects.
    https://blogs.remobjects.com/2018/03/22/delphi-visual-library-on-webassembly-platform/

    But component vendors so important, and now there is no any component i can use with WASM.

    Now for me best solution is TMS Web Core.

    Best Regards

  2. Dennis Says:

    IMHO with the constant rise of JS frameworks like Angular, React, View.js, etc. and suitable backends (often written in JS as well) in combination with improved web request behavior (like http/2) there is no need for WASM anymore.

    If you take a look at one of the mentioned frameworks you’ll notice really comprehensive abstraction and “easy” to use and extendable components. That is way more important than the execution speed advantage that WASM could bring into (or the possibility to write that code with Delphi). The vast majority of the web sites are now browsed with mobile devices with a lot of memory and cpu power, so who cares about size/speed anymore?

    Delphi does not really belong to the web world, and will never be (even if there are currently some implementations that try to fill this “gap”).
    We’re currently building a new front-end for one of our side applications that was written in Delphi - and we’ve chosen a JS framework (View.js) that talks to our REST-Server (of course written in Delphi). It is amazing how easy it is to create stunning front ends with a nice and clear coding structure. And don’t forget how easy it is to find suitable web front-end developers or how easy it is to find youtube tutorials for those frameworks ….

  3. Dennis Says:

    P.S: the last sentence written above is the most important one.
    P.P.S: the REST server isn’t just a simple server, all of the business logic written for the side-add is now included - well, we’ve moved only some units around ;-) and the “application” is just now a front-end only. that works very well, because it’s a business app that required a server component from the beginning (which handles the data and connects to a MS SQL-Server).

  4. Hoppy Package Says:

    You are describing the symptoms that do come with a lock-in which is no longer on the horizon. People simple change direction an think they left the lock-in behind. I think they are mistaken.

    a) Hypertext Transfer Protocol and Hypertext Markup Language are about Hypertext. That’s what the web is all about. Media in a broader sense.

    b) A different aspect is the everlasting search for a technology allowing to run a program under to control of the execution environment or more precisely the execution environment should control the ’script’ or what was called ‘module’ once. ‘Mainframe’ style Application.

    c) Web for global and mobile people. 21st century web and apps.

    Is bloatware really required to host and run top notch applications? I doubt.

    If you don’t try another way you won’t reach out far beyond the first years of the 21st century.

    What is already here today has already been written. An owl’s wisdom.

    Javascript in general is pretty good at serving a) b) c). The whole development process is pretty painless. What will and does already cause pain will be the influence from the media perspective.

    Imo there is no real issue left with any technology from any perspective of software development. In that sense ‘Do what you like’ is the way to go. But don’t forget the Omen.

    The web is not a dangerous place but it’s said to be. Currently the political risk s are bigger than ever before (a)). The Web (b)) is deeply influenced by the need for automation and unintended processing and we experience a strong tendency to handover activities hosted by those offering products or services to their customers and keeping the illusion alive that they care for their customers and protect them from the evil all around. Wizard of Oz.

    If Ozz would have written the one or the other wizard once then maybe Winshock would be the web server of choice today - kidding but …

    I’m personally no longer willing to play governments, IT- and all the other industries game anymore. An industrial providing consumption should not soak up what has been invented in private spheres. This privilege can only enjoy an industrial line providing tools. That’s the point. It’s in the very nature of industrial lines to raise a claim on anything in front of the door of the distribution center. At the moment they have already taken over the consumers and want the private households too.

    Taking customers data for free for example or using open-source libraries and by this stealing from households (also small to mid-sized companies which mostly don’t present a line providing something but a traditional company or business). Hand in hand with this goes, ‘What happens if investments into IT slow down’. Consider this and your choice will be a limited one.

  5. Jon-Lennart Aasenden Says:

    You are aware of Smart Pascal right?
    You can compile object pascal to JS, write node services etc. etc. — what you want have existed for 8 years already :)

  6. Larry Hengen Says:

    @Jon-Lennart Aasenden,

    Yes I am well aware of the existence of SMS. I even mentioned the release of SMS 3.0 in a recent post.

    I think you missed the point of the article. I am advocating for a Pascal Language standard, and the same standard being available across the entire development stack for Web, Mobile and Desktop.

    I think WASM will take over the web in time due to being able to choose your own language and provide better performance. There is currently one offering that provides Pascal across the all stacks and that is from REMObjects. If EMBT doesn’t move on this opportunity I think they will lose this market to REMObjects just like they lost on the CIL compiler.

    As an aside, I would love to read an article on how SMS deals with the loose typing of Javascript and how it compares to TMS WebCore/FPC2JS, and Elevate Web Builder. Why transpile to Javascript when WASM is very likely the future standard?

Leave a Reply