Slash Boxes

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 18 submissions in the queue.
posted by janrinok on Wednesday February 09 2022, @11:08PM   Printer-friendly
from the all-the-better-to-track-you-with-my-dear dept.

Move over JavaScript: Back-end languages are coming to the front-end:

In the early days of networked computing, mainframes did all the heavy lifting: users connected to massive machines with video terminals that could do little more than send and receive text. Then in the 1970s, personal computers came along and made it possible to do serious computing on the client-side as servers handled tasks like authentication and storage in many networks. The rise of the internet in the 1990s swung the pendulum back to the server, with web browsers taking on a role not unlike terminals in the mainframe era.

The client-side made a come back over the past decade as developers built "single-page applications" (SPAs) with JavaScript. But a new crop of tools is sending the pendulum swinging back towards the server.

At the vanguard of these tools is Phoenix, a framework for the programming language Elixir, and a feature called LiveView. Using LiveView and a bit of JavaScript, developers can create browser-based interfaces for real-time applications like chat rooms or Twitter-style status updates. All UI elements are rendered on the server first and sent to the browser, ready-to-display. The only JavaScript required is a small amount of code that opens a WebSockets connection that handles sending input from the browser and receiving refreshed HTML/CSS from the server.

Phoenix isn't the first platform to offer a way for back-end developers to create front-end interfaces—Microsoft's ASP.NET Web Forms for Microsoft .NET existed back in 2002—but it did inspire many new tools. Caldara for Node.js, Livewire for the PHP framework Laravel, and StimulusReflex for Ruby on Rails, to name a few. Microsoft, meanwhile, released a new .NET feature called Blazor Server that modernizes the old Web Forms idea.

"My goal is not to get rid of single-page applications, but to obviate them for a large class of applications," Phoenix creator Chris McCord says.

There is a lot more in the full article.

Original Submission

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by mcgrew on Thursday February 10 2022, @04:37PM (1 child)

    by mcgrew (701) <> on Thursday February 10 2022, @04:37PM (#1220237) Homepage Journal

    Using crappy languages like Javascript directly contributes to the exponentially growing number of vulnerabilities hitting everybody.

    So your answer to crappy insecure languages like javascript on the back end is to move them to the front end? Good luck with that. A crappy language is crappy whether it's on the client or server.

    My sites used to use javascript, I may still use a tiny bit on a couple of pages to tell if it's a phone or a larger screen, but the code I used to need I no longer do, since what I needed javascript for, like mouseovers, is now covered in HTML. It won't be long until I'll be able to get rid of the javascript completely, as HTML itself will likely supplant it in the future. Note that your browser is an app on your phone or computer. Good luck replacing that!

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by ilsa on Thursday February 10 2022, @06:04PM

    by ilsa (6082) on Thursday February 10 2022, @06:04PM (#1220270)

    No, my preference is to take it behind the barn and have it shot.

    My 2nd preference is to at least put it back on the front end because that's where it originated and limits the pool of fail somewhat. The people that code javascript are the same people that think SQL is "too hard".