Thursday, March 28, 2024

Using Semantic Markup Saves Time for Server-side Developers

A basic definition of semantic markup is, according to Digital Web, “markup that is descriptive enough to allow us and the machines we program to recognize it and make decisions about it.” Writing code that is well-structured and semantic makes a developer’s life infinitely less dramatic.


Most developers prefer to write their code neatly, properly structured, and easily recognizable, perhaps even commenting certain sections for easier clarification later on down the road. But as Meitar Moscovitz writes in his blog, “websites are rarely the sole products of front-end developers”.


Moscovitz contends, and is correct, that most projects that involve a lot of heavy coding are a blessing and a curse when it comes to writing a quality front-end codebase without sacrificing well-structured and semantic code even for quality-conscious programmers. As he states, what may seem to be a simple requirement for HTML semantics actually consists of a wide range of coding requirements that are only likely to be considered by one side of the team, rather than the group as a whole.


Moscovitz provides an example in which one of his colleagues wants to use a DIV tag rather than a SPAN tag within some code they were working on. He uses the example to provide an analogy that basically shows the “interconnectedness that markup has throughout many parts of a website’s codebase”.


His contention is that the content should suggest the appropriate element, and that the precision and obsessive correctness, as he calls it, may be inappropriate, annoying or senseless to someone that isn’t aware of the subtelties involved, which in his opinion, is the main reason why developers should promote a separation of concerns when developing applications.


Whether you work as a client-side developer or a server-side developer, the roles intermingle, and often the methodology one uses may conflict with the other to the point of frustration. As Moscovitz points out, “just a little cross-functional education can go a long way towards writing code that’s better for us all. So ask questions, because techniques that help your colleagues are likely to help you, too.” The examples in his blog showcase the intricacies involved between front-end and back-end development projects, and why writing well-structured and semantic code makes the process less of a headache for everyone involved. Massive kudos to Mr. Moscovitz.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Popular Articles

Featured