re: Is div still a div? VIEW POST


The way I think about the difference in web development today is there has been a sharp split in how web technologies are used:

  1. Web Pages
  2. Web Applications

A web page should be focusing on using semantic markup that is easily machine-readable for use cases such as SEO, caching, and accessibility. A web application should have all the characteristics of any application, which includes being built from highly-cohesive components/classes/functions/etc, that tightly encapsulate some sub-set of application functionality.

The way I look at it, I don't care if JSX or any XML-based UI abstraction outputs non-sematic tags - unless I need semantic tags. For example, if I'm building a game, I don't care if my sprites are divs, spans, or any other tag - all that matters is there a DOM element that can be programmatically manipulated. If I'm building a SPA with ADA requirements, however, that's an entirely different situation.

Where this get's a bit complicated is when you have a blended application with the concerns of both a web page and a web application. So far, and I haven't seen a good generalized way to tackle this, and the furthest the conversation has gotten is server-side rendering for SPA initial loading. We'll need to see how this plays out over the next few years, but eventually, I'm sure we'll settle on a general set of best-practices.

code of conduct - report abuse