How are websites formatted?
Mentioned briefly in prior entries, websites are generally formatted with HTML, a markup language to specify how text is divided up, organized, and displayed (CSS is also used, which gives the different divisions of the webpage styles to make it look presentable, but that is out of scope for the discussion). Well, with ReactJS, they have an interestingly similar approach to writing dynamic site markup; JSX.![]() |
| Courtesy of kode-blog.com [3] |
What is JSX?
JSX, standing for JavaScript XML, is a syntax extension of JavaScript developed specifically by the team to allow "React Elements" as legitimate data types. These React elements consist of XML markup that are used in organization. Wait a second; what is XML even? Have we discussed it yet? To be honest, XML has thus far not exactly been brought up. However, XML is very similar to HTML (the previously discussed markup language) both in appearance and (to a lesser extent in the general sense) function, so for the sake of simplicity, you should equate the two at least for know. In the current applications, the XML markups function basically like HTML anyways, like in the example above (if you do want to briefly read up on the differences between XML and HTML, try source 4).Anyways, these elements, when processed, generate XML equivalents in a programmatic fashion with segments that are aided with the aforementioned reactive programming. Essentially, this makes elements easier to manipulate and insert en mass from JavaScript, which bypasses former limitations in many other website developing supplementary languages that would require such elements to be contained in sting format [2].
This approach, while potentially easier and less redundant in many circumstances, likens web development to standard programming more so than it originally was. Admittedly, this can be a legitimate issue for new learners with no prior experience in web development, as learning ReactJS-facilitated development exclusively can give a false impression of or hide vital information about the underlying workings of the website processes (similar to the argument against teaching Python as an introductory language). This can be an issue when being forced to revert to website development tactics - be it for a specific company or a special program's needs - of simpler or completely alternate methodologies without a full grasp of the underlying concepts. This argument does hold and pushes me to say that ReactJS is not a library beginners should use. With that being said, the programming logic's impact on actual web development by professionals is something that cannot be disputed as significant and worthy of due thanks.
So, why does this matter
Who cares? Well, as people try to make complex innovations and conglomerates, they themselves are forced to innovate to make the products actually usable. With freedom to design as they please, many choose to integrate familiar technology while looking for potential strides that could be made to simplify or make more efficient the process. In this scenario, Facebook's developers noticed that continuing to limit elements to string representations would not be ideal for the setup (if nothing else, the markup would be hard to read in a string, haha), so they innovated and created a new way to express it. In the broader sense, innovating new ways of representation with hidden complexity is how computer science exists, and ReactJS's JSX syntax extensions are just a way to do that.Bibliography
Of note, this includes both content that I have used and that which I intend to use for future posts

Comments
Post a Comment