Hacker News new | past | comments | ask | show | jobs | submit login

Why can't anybody talk about the fact that HTML was not designed for being dynamic?

Isn't there any format that is a real alternative to HTML, which is truly interactive, lighter than the DOM, use text as a mediu, is multi usage and platform agnostic, can use whatever scripting language, and be easily rendered?

It's not another new format, it's just that a new format is needed to make things simpler.

I have zero patience when it comes to learn angular and its framework model thing. I don't want framework, I want formats and protocols.

I don't even know gopher but something new and fresh and different is really needed. Maybe as long as it's used in a controlled environment for internal/pro software.




HTML wasn’t designed to be dynamic but it certainly evolved to be, and personally I don’t think it’s that bad per se, but modern frameworks such as Angular and React have added so many unnecessary layers of complexity, that most developers have to reason about and work with several layers of abstraction just to make simple things work. There isn’t a real alternative because all the popular modern browsers only fundamentally understand HTML, and have been evolving and refining this over the past three decades or so. What would be nice is to have a new markup that is natively rendered and handled by the browser and that behaves similar to the document/page model everyone is used to but with built-in persistence, session handling, and dynamic rendering with a very simple and intuitive API. Obviously we have all of these already in one form or another but it’s all just hacked-together HTML/JS/CSS under the hood. Edit: minor corrections because mobile devices suck


Whenever I build something on the web, I can't help but feel like I'm dealing with a word processor. A very advanced one, but nevertheless still a word processor at its heart. Coming from native apps, I despise the idea of text just being out there without a TextView or something.

I also miss Flash.


That’s exactly what it feels like. A word processor distorted into an application development platform. With nearly 30 years of technical debt as well.

This is becoming untenable. The web has only gotten more and more difficult for novice users and developers alike to publish onto. That spells doom for the web in the long run.

I wish we had a clear path out of this trap.


I know exactly what you’re talking about from when I transitioned to web dev, but I feel that much less these days with TypeScript (done well) and VS Code. It’s actually a pretty decent experience even if it does feel like a bit of a facade over the top. Once you’ve got all your setup and dependencies sorted of course…


Same here, that is why when coding Web apps, I gladly take the back seat, and although I tend to rant about WebAssembly, I am grateful for it bringing Flash like development back.


Have you tried htmx? Maybe HTML wasn't designed to be dynamic, but IMO htmx does a great job extending it to provide interactivity in a way that feels natural and simple.


This is on point. The frameworks will always remain crippled due to the underlying platform. Of all the things in the Web Landscape, WebAssembly seemed like a practical move towards what you are speaking about. You can compile Rust/Golang/C++ into a "Web Binary", which in turn can be shipped realtime to clients. However, there's a long way to go, before WebAssembly works as a smooth container environment with better APIs for enhancing the user/dev experience for dynamic apps.


No markup format will support interactivity well, you need a full scripting language with all of the standard features.

I don’t think it’s possible to couple the interactivity and visual layout in a single language and have it make sense. We can certainly do better than JavaScript, HTML and CSS but I think there will still need to be at least two languages to describe layout and interactivity.


Sounds like hyperscript. Look at this hypothetical PyGtk example:

  i = 1
  def click(event):
    i += 1

  g.Window(
    g.Frame(title=“Hello”,
      g.VBox(
        spacing=10,
        g.Label(
          “i = %d” % i,
          expand=True
        ),
        g.Button(“click me”,
          click=click,
        )
      )
    )
  )
Desktop frameworks could do this for decades instead of Glide XMLs or manual setup, but they didn’t.


Nobody cares that you can build up a DOM differently, that's decades old. What matters is: how do changes behave? Your example shows nothing of the complications of lifecycles or state-render loops.


Respectfully, that isn’t decades old.

The example above is brief due to forum limitations, so yes, it doesn’t include lifecycles or the whole implementation of a rendering loop. But the context of that comment was using one or more languages for building interactive hierarchies of widgets, and not the topic you brought up, so it didn’t even have to.


Yes and no. That you can build a hierarchy with Element(attrs, children) where attrs may include callbacks is really decades old. Plain JS does it, react and angular do, and also a million template languages.

The question is, how can we not end up in a spaghetti ball? Your scripting style alone brings nothing to the table.

I would look up to something like Elm, which does answer OP's question.


Qooxdoo: https://qooxdoo.org/

It's a no-html, widget only web framework that's been going for at least 10 years.


Java Swing is decades old (1998?) and does everything you list above. Was even embeddable as a browser applet in all major browsers at the time.


Every swing tutorial out there starts with a good old:

  c = new Container()
  w = new Widget()
  c.add(w)
  w.addActionListener(
    …200 bytes of a functor boilerplate…
  )
Also I don’t know java well, but variable/keyed arguments and closures like in python do not exist there, to my knowledge.

Am I missing something, or maybe you meant something else?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: