Stories
Slash Boxes
Comments

SoylentNews is people

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: 4, Interesting) by JoeMerchant on Thursday February 10 2022, @03:19AM (16 children)

    by JoeMerchant (3937) on Thursday February 10 2022, @03:19AM (#1220127)

    I just saw something about Witchcraft on Elixr or some such. I've been doing this stuff for money for 31 years now, is there any good reason to keep spinning new languages with cute names every 2 years? I mean, English has evolved over the past 1000 years or so, but it's still basically recognizable as English, at least for the last couple hundred years. So many of the ideas encapsulated in these new names could be impressed on existing languages as refinements and/or extensions - calling it a whole new language seems like the opposite of progress.

    Unless we're still in the Papua New Guinea stage of development development? Hundreds of isolated tribes that don't have regular communication with each other? Shouldn't the advent of StackOverflow be slowing the language evolution the way that phonograph records, radio and TV standardized and crystalized modern language for the last 100 years?

    --
    🌻🌻 [google.com]
    Starting Score:    1  point
    Moderation   +2  
       Interesting=2, Total=2
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 2) by HiThere on Thursday February 10 2022, @04:13AM (3 children)

    by HiThere (866) Subscriber Badge on Thursday February 10 2022, @04:13AM (#1220132) Journal

    IIUC Elixir is a dialect of Erlang, or possibly "front end" would be a better description. And it's not new.

    --
    Javascript is what you use to allow unknown third parties to run software you have no idea about on your computer.
    • (Score: 1, Informative) by Anonymous Coward on Thursday February 10 2022, @09:16AM (2 children)

      by Anonymous Coward on Thursday February 10 2022, @09:16AM (#1220156)

      Elixir is not a dialect of Erlang. They have a couple of fundamental differences that will make the two forever incompatible. But they both use BEAM as their reference implementation's virtual machine. They have a lot of the same benefits and drawbacks because of that and the underlying "feel," for lack of a better word, is similar too. However, there are some large differences. Because Elixir is sort of the child of Erlang and Ruby, it is more flexible in how you write it (And thank goodness for the pipe operator) and is great for web-facing code. Because it has the benefit of hindsight, it also prevents problems that could arise in Erlang before they happen while the changes introduce problems of its own. Erlang, on the other hand, is more versatile because you can use it for more things thanks to its standard library and interfaces without relying on code flexibility to get there. Erlang also has other benefits Elixir doesn't because it was designed for different use cases, particularly in CPU-bound tasks.

      • (Score: 1, Interesting) by Anonymous Coward on Thursday February 10 2022, @12:59PM (1 child)

        by Anonymous Coward on Thursday February 10 2022, @12:59PM (#1220171)

        Erlang also has other benefits Elixir doesn't because it was designed for different use cases, particularly in CPU-bound tasks.

        IIRC, designed with lightweight threads for use in packet switching and routing. Erlang would be a contender for distributed caches and message queues but what is the advantage of BEAM for the use case of Elixir you're making?

        • (Score: 2, Informative) by Anonymous Coward on Friday February 11 2022, @12:13AM

          by Anonymous Coward on Friday February 11 2022, @12:13AM (#1220377)

          Elixir was originally targeted for client/server architectures, for web applications, and similar constructs. Therefore its reference implementation was written with that in mind. The BEAM VM is great for that kind of workload because of its lightweight threads, distributed concurrency and fault-tolerant (let it crash) design, and soft RT capability. It is in many way similar to the "async" mania that swept through other languages. Except this implementation is mature, well-tested, and scales both directions insanely well. The problem is that because Elixir was written with the assumptions underlying those targeted use cases, it suffers in others. One of those where it really suffers is in tasks that are CPU-bound and not IO-bound. That isn't to say that it is forever a problem or completely intractable, but it is the cost-benefit analysis they made when designing it.

          Perhaps I didn't answer your question, so feel free to rephrase it if I didn't.

  • (Score: 2, Insightful) by Anonymous Coward on Thursday February 10 2022, @02:27PM (4 children)

    by Anonymous Coward on Thursday February 10 2022, @02:27PM (#1220193)

    Unless we're still in the Papua New Guinea stage of development development?

    From what I see we're at the stage of trying to build houses, skyscrapers etc on ever changing sand.

    There's a very old parable on building houses on sand vs houses on rock. But hey there's more money to be made building on sand... Heck some even build on poop like PHP or Node.js.

    For example .Net 3.5 SP1 EOLs in Jan 2029 (start Nov 19, 2007). But .Net Core 5 is EOL in May 2022 and .Net Core 6 is EOL on November 8, 2024

    Java 17 (LTS) was available in September 2021 but EOLs in 2029 (premier support only till September 2026).

    • (Score: 0) by Anonymous Coward on Thursday February 10 2022, @03:57PM (3 children)

      by Anonymous Coward on Thursday February 10 2022, @03:57PM (#1220223)

      Oh come on. Java has one of the best backwards compatibility track records of any language out there.

      • (Score: 1, Interesting) by Anonymous Coward on Thursday February 10 2022, @05:28PM (1 child)

        by Anonymous Coward on Thursday February 10 2022, @05:28PM (#1220249)

        That seems to be changing. I have a Java environment spread over servers, desktops and embedded devices. For the first 15 years, everything was fine. Now, with the exploding Java version numbers, I have to worry that the Java versions on the development boxes set (differing based on stable/oldstable) different minimum target levels, third party libraries having to be updated to support the Java on the newest development boxes, hoping compatibility remains on the embedded devices. And then there is the reorg of the Java internals I need to build native parts against.

        • (Score: 0) by Anonymous Coward on Thursday February 10 2022, @06:03PM

          by Anonymous Coward on Thursday February 10 2022, @06:03PM (#1220268)

          Then there's software like Crashplan that deliberately breaks compatibility on unsupported OSes rather than just not support them. There's really no reason why the GUI part of the program needs to be the part that doesn't work across platforms.

      • (Score: 1, Interesting) by Anonymous Coward on Thursday February 10 2022, @11:15PM

        by Anonymous Coward on Thursday February 10 2022, @11:15PM (#1220364)

        Java the language has spectacular backwards compatibility, only a few things have ever been deprecated. (Most famously the Java Web Start in-browser tech.)

        But old Java Runtime Environment / Java Virtual Machine releases were supported for decades. Now Oracle is evolving Java a lot faster, which is fine, but putting the JRE/JVM support cycles at much shorter. So instead of "Install JVM, apply occasional security updates, done." You have to "Install JVM, apply occasional security updates, upgrade JVM, apply occasional security updates, upgrade JVM again...." it's irritating, especially when there are breaking changes between versions. The move between JVM 7 and JVM 8 fixed a long standing Java bug in rounding floating point values, which broke hundreds of our automated tests.

  • (Score: 0) by Anonymous Coward on Thursday February 10 2022, @05:59PM

    by Anonymous Coward on Thursday February 10 2022, @05:59PM (#1220264)

    The nice thing about standards is that there are so many of them to choose from. I'd wager that the issue is partially ego and partially being too lazy to understand how to use the tools that exist. Occasionally, there are situations where the existing languages and tools legitimately can't be made to work reasonably in a given application, but at this point, I'm not sure there's any legitimate role that isn't already filled by something decent.

  • (Score: 0) by Anonymous Coward on Thursday February 10 2022, @06:55PM (5 children)

    by Anonymous Coward on Thursday February 10 2022, @06:55PM (#1220286)

    You wouldn't understand English from 200 years ago, mate!

    • (Score: 2, Informative) by pTamok on Thursday February 10 2022, @07:48PM (4 children)

      by pTamok (3042) on Thursday February 10 2022, @07:48PM (#1220306)

      Really?

      https://en.wikipedia.org/wiki/1821_in_literature [wikipedia.org] - Sir Walter Scott: Ivanhoe
      https://en.wikipedia.org/wiki/1821_in_literature [wikipedia.org] - Percy Bysshe Shelley: Adonais
      https://en.wikipedia.org/wiki/1822_in_literature [wikipedia.org] - Thomas De Quincey: Confessions of an English Opium-Eater

      • (Score: 0) by Anonymous Coward on Friday February 11 2022, @12:00AM (3 children)

        by Anonymous Coward on Friday February 11 2022, @12:00AM (#1220374)

        Even stuff like Chaucer is far overrated in difficulty. A moderately well-read individual will have little trouble, especially if they have some knowledge of Latin or it's descendents.

        • (Score: 0) by Anonymous Coward on Friday February 11 2022, @03:19AM (1 child)

          by Anonymous Coward on Friday February 11 2022, @03:19AM (#1220418)

          Chaucer's works are all transcribed into modern calligraphy/typesetting and translated to a much more modern but still anachronistic tone. Of course they aren't that difficult after someone else does the hard work for you.

          • (Score: 0) by Anonymous Coward on Friday February 11 2022, @03:33AM

            by Anonymous Coward on Friday February 11 2022, @03:33AM (#1220423)

            Sure, if you read shitty modern editions...

        • (Score: 2) by hendrikboom on Sunday February 20 2022, @01:38PM

          by hendrikboom (1125) Subscriber Badge on Sunday February 20 2022, @01:38PM (#1223381) Homepage Journal

          Helps more if you know Dutch.