3 ms·
When you click a link on a web page, it gets routed to a controller action. Thats done because the link was generated with the url: example.com/controller/actio
by Androsynth 14y ago
When you click a link on a web page, it gets routed to a controller action. Thats done because the link was generated with the url: example.com/controller/action. Its not about parsing input, its about routing.
- melvinmt 14y agoIt's the browser who renders anchor tags clickable - if you click on a link in a RSS reader you also get routed.
- randomdata 14y agoHATOES says that your XML/JSON/whatever needs to have those same links. What is the difference between an <a href=""> link in HTML and a { action_url: "" } property in JSON?
- Androsynth 14y agoNothing I suppose. I don't think that html vs json was what MVC's[1] creators had in mind for it, but if the json is rendered in such a way that it has links pointing back to the controller, it is a view. [1] Although were talking about Model 2 here, so thats irrelevant. Come to think of it, this whole discussion is pointless: we're arguing about whether views in a Model 2 architecture are proper MVC views...