Academic task… First we were told to generate a set of static .html
files showing election results in various administrative divisions. Then we were told to "modernize" this by using Django templates. Fair enough, I can see the benefits of such approach.
But then we were told to further "mordernize" this by making the app "RESTful". As far as I can tell this means that the server may only expose an API that responds to requests by sending clients raw data in the JSON format; the client, which is a static HTML+CSS+JS site, must receive this JSON and then dynamically construct the webpage on the browser side with JavaScript.
Since I’ve sadly missed a few lectures, when this must’ve been explained, could anyone explain to me what are the benefits of such an approach? Because I must say I can only see drawbacks:
- Users with disabled JavaScript will be unable to view the page.
- Correct me if I’m wrong, but AFAIK the contents of such a site will hardly be able to be indexed by Google.
- It will be impossible for users to bookmark the election results in a particular division. Instead, each time they visit the side, they’ll have to click their way through to make JavaScript load the results from that particular division. Or deploy a Selenium bot that does this for them.
- It breaks back/forward browser buttons.
.Understanding web pages better
– onkkno May 17 '17 at 06:52